Questions tagged [rsa]

An asymmetric (e.g. public-key) cryptosystem, based on modular exponentiation with big exponents and modulus. RSA can be used both for signature and encryption with proper paddings.

Filter by
Sorted by
Tagged with
1
vote
1answer
148 views

Security of RSA cryptosystem variant

A variant of RSA cryptosystem is given as following: $$N=p*q$$ $$ed=1 \space \space mod \space \space (p^r-1)(q^r-1)$$ $$c= m^e \space \space mod \space \space N $$ $$m= c^d \space \space mod \space \...
0
votes
0answers
43 views

Will a list of all prime numbers upto certain number of bits compromise crytopgraphic algorithms based on prime factorization? [duplicate]

I understand that many cryptographic algorithms depend on the difficulty of large prime factorization. Will a list of all prime numbers upto certain number of bits make it easy for an attacker to ...
0
votes
0answers
12 views

Encrypted RSA Private KEY - What is this? [migrated]

I'm new on cryptography and I have so many trouble to understand a lot of things. On my screen, I use Openssl to generate RSA private key and I use DES3 to encrypt this private key. Then I type my ...
1
vote
0answers
40 views

RSA: Given (N,e,d+p,c) how to solve [closed]

Given (N, e , d+p, c). Is it possible to get m? details: ...
6
votes
0answers
128 views

RSA like trapdoor permutations in Discrete logarithm

In RSA, given only $(n,e)$, where $n =pq$ and $e$ is the public exponent, it is hard to find $p$ and $q$. It also seems hard to find $d$. So we came up the RSA conjecture that is RSA defines a ...
2
votes
2answers
239 views

Why random number used in RSA padding but not in AES?

I noticed that people use a random number in the RSA-OAEP padding scheme to avoid deterministic encryption. But in pkcs#7 people just use the padding size rather than some random bits. Doesn't it make ...
0
votes
0answers
20 views

How does RSA blind signature calculation works?

I am having a struggle calculating (ii) and (iii), Can anybody help me with the calculation? RSA blind signature algorithm: Given two prime numbers: $p=11$ and $q=3$ The message to be signed is: $M=6$ ...
4
votes
0answers
90 views

Source of very large prime numbers

The RSA cryptosystem makes use of $n=pq$ where $p, q$ are large prime numbers. With quantum computing, factorization might become easier, so it will probably be useful to use much much bigger $p$, $q$ ...
1
vote
1answer
67 views

Which RSA keys are actually attacked In practice?

I understand that it is important to check how hard it is to attack RSA keys, but I assume at some key size attackers would not even try. Real attacks are carried out by exploiting mistakes in the ...
0
votes
0answers
24 views

RSA encryption. Does message have to be coprime to n? [duplicate]

If I understand correctly, for RSA to work we need the message(cleartext) M $\in Z_n$ and gcd(M,n)=1. That is M coprime to n. This is to fulfil the requirement for Eulers theorem. How does RSA make ...
0
votes
0answers
24 views

Chaining signatures of different parties

My question might be quite beginner, so please pardon my ignorance :) So, assume there are 10 parties, each with their own keypairs. There is a message $M$ that is passed from one party to the next. ...
0
votes
1answer
61 views

Can I use ECC for encryption/decryption, just like RSA?

I'm familiar with RSA for asymmetric encryption. I also understand it's only supposed to encrypt small amounts of data (smaller than the key) so for encrypting arbitrary data I would typically ...
1
vote
2answers
157 views

What is the size of a 1024-bit RSA cipher compared to its plaintext?

Let's assume we encrypt a 50000 bit plaintext with 1024-bit RSA and public exponent $e$ = 3: How big will its cipher be? When we increase the exponent to let's say $e$ = 216 + 1 = 65537, how big will ...
0
votes
0answers
22 views

How to perform encryption/decryption in a RESTful system? [migrated]

I'm not a crypto/security expert and have designed an architecture for encryption/decryption. I'm not sure if its full proof and want to know what people use as industry standard? I'm trying to ...
4
votes
4answers
879 views

Could a fixed RSA encryption be used instead of a salt to prevent rainbow table attacks?

It's common to use a salt before hashing a password in order to prevent an attack by rainbow tables. Would it also work to encrypt the password for instance by RSA encryption - by a permanent RSA ...
-1
votes
0answers
48 views

Why are RSA and ECDSA sign and verification time different?

I would like to know why ECDSA signs faster than how it verifies? On the other hand, why RSA verifies faster than how it signs?
4
votes
2answers
128 views

RSA - Is $e = d$ a problem?

I'm working on small RSA project in university. At this moment I have done this: An array of prime numbers is generated from selected range. $p$ and $q$ selected randomly from this array $n$ ...
0
votes
1answer
116 views

Hash function construction

I recently studied a Hash function and its security requirement. I have studied that simple hash construction from XOR is weak. My question is, based on Xor property the following Hash based on RSA Mi&...
1
vote
2answers
63 views

Is it safe to use RSA multiple times

Assuming I have multiple symmetric keys on specific machine(more than 10000 probably), can I use the same rsa key to encrypt all of those keys? I'm a bit concerned from a situation where multiple ...
0
votes
1answer
46 views

best padding scheme for RSA

So i came across three padding scheme for RSA: PKCS1, PSS and OAEP. My intention here is to encrypt a file using AES key. then, encrypt the AES key with the RSA key and save the encrypted AES key ...
3
votes
1answer
60 views

Repeated modular square roots to recover original base

I'm given a large prime $p$ and $c \equiv m^e \pmod p$, and $e = 2^{64}$. Typical RSA rules don't apply here, since $\phi(p) = p - 1$ is even, and $e$ is a power of two, so they share a common factor, ...
0
votes
0answers
41 views

RSA trap door permutation does not hold for all text Xs? [duplicate]

The RSA trapdoor permutation as I understand goes like this, choose $N$ such that $N= p*q$ where $p$ and $q$ are large random primes. Therefore $N$ is NOT prime choose integers $e, d$ such that $e \...
0
votes
1answer
129 views

Encryption and decryption of Request and response for REST API

I am working on encryption/decryption for the rest API. The client here can be mobile,desktop,web browsers,etc and all the requests will be made to a https endpoint. The main goal here is that the ...
0
votes
2answers
88 views

Is RSA secure enough to protect bitcoin private keys? [duplicate]

Suppose my very trusting friend has a bitcoin private key with a large balance (let's say $1B USD worth of Bitcoin) and wishes to keep a backup copy with me as a trustee. He doesn't want to transfer ...
1
vote
2answers
162 views

In RSA, why would we ever want to find the values of p and q if we already know phi(n)?

I'm studying RSA for the first time, and I know that $p$ and $q$ must be kept secret because with them we can calculate $\phi(n)$, which then lets us calculate the private key $d$. So $p$, $q$, and $\...
0
votes
1answer
45 views

Why is an RSA public key BITWRAP-ed in ASN.1 DER encoding?

While playing around with creating an RSA public key, and decoding it using a home brew ASN.1 decoder, I ran into the fact that the public key is BITWRAP-ed. BITWRAP seems to be an OpenSSL modifier, ...
2
votes
1answer
59 views

Signature Generation Time vs Verification Time

When comparing the RSA-PSS signature algorithm with an elliptic curve based algorithm such as EdDSA, it is clear that signature verification takes less time for RSA than for EdDSA. For signature ...
1
vote
0answers
89 views

How to decrypt c when phi(n) and e are not relatively prime [duplicate]

I have read multiple websites to see what would happen with RSA when $\phi(n)$ and $e$ are not relatively prime, but no one has discussed it. Can someone explain how to decrypt $c$ if $\phi(n)$ and $e$...
1
vote
1answer
60 views

Using first, say, 50 letters from a public key as user identifier?

I am making a messaging system where users are identified by their public keys. It doesn't matter which friendly username they have, so I'm not going to prompt them to choose one. Each user will ...
8
votes
2answers
1k views

Is there a pseudo message that will encrypt and decrypt correctly if one of the primes is a pseudo prime in RSA

For prime number generation, one can use a probabilistic prime number generation algorithm like the Miller–Rabin primality test that will yield a composite as a probable prime with probability $\frac{...
6
votes
1answer
60 views

Adapting RSA Timing Attack for Square And Multiply from right-to-left vs left-to-right

I'm trying to reconstruct the fairly well-known RSA timing attack by Kocher. I'm working with simulated timing data, so I have completely noise-free "measurements". My attack is successful ...
1
vote
1answer
129 views

How the message is decrypted in an RSA chosen ciphertext attack when it's a modulo?

During the last stage of decryption of a chosen ciphertext attack we are left off with this equation $$c = m \cdot t \pmod n$$ Removing all exponents like $d$ and $e$ where $c$ is the decrypted ...
0
votes
1answer
64 views

Signature generation using hash function

I want to generate a valid signature for a message using the below algorithms: Hash function: $H(x) = (x+3) \bmod 10$ (I am unable to understand the given parameter for hash function and how am I ...
4
votes
0answers
119 views

Where is RSA-KEM used as of 2020?

RSA-KEM is introduced by Yuliang Zheng and Jennifer Seberry 1992, Practical Approaches to Attaining Security against Adaptively Chosen Ciphertext Attacks and compared the security against OAEP ...
1
vote
1answer
79 views

How RSA-OAEP decrypt a Symmetric Key message?

In an RSA-OAEP encrypted symmetric Key (AES for example) message. The message is then decrypted by the other party when R is a Random Number That other party doesn't know about. so How it can retrieve ...
3
votes
1answer
49 views

Proving that RSA encryption function with non-square free modulus is not a permutation

Here is a backgroung for the question on hand. While studying RSA I came up to the question about what happens if $p$ and $q$ involved in modulus computation are not actually primes? There is already ...
2
votes
1answer
864 views

What are the smallest possible RSA private and public keys?

I'm trying to understand what the smallest possible RSA public and private keys are. When using $p = 2, q = 3$, the encryption function doesn't encrypt. So I have to shift one prime to get $p = 3, q = ...
1
vote
1answer
97 views

Cracking RSA with small plaintext

I read a CTF writeup about cracking 4 primes RSA numbers from here: Given $p, q, r,$ and $p+q+r$ are prime numbers. The challenge encrypts the flag with a modulus $N=(p∗q∗r)∗(p+q+r)$ and gives the ...
3
votes
1answer
89 views

How much information do I leak if I upload multiple ciphertexts with cleartext overlaps?

Suppose that $t_1, t_2, \ldots, t_n$ are my clear texts. Suppose that for any $(i,j) \in \{1,2,\ldots,n\}^2$, $t_i$ and $t_j$ only differ in, say, the 1st $m$-many characters. Finally, suppose that I ...
2
votes
1answer
68 views

FIPS 140-2 compliance and RSA encryption

I remember reading that the RSA algorithm was only permitted for encryption when used to encrypt a symmetric key (essentially leading to hybrid encryption). However, reading through Annex A: Approved ...
6
votes
3answers
200 views

Would asymmetric cryptography be feasible in World War II?

Assuming people in the forties would have known asymmetric cryptographic methods like RSA, would they have been able to make sensible use of them? There were no real electronic computers at the time, ...
2
votes
0answers
108 views

Can I use RSA as hash function?

My end goal is to have an encryption function $e$ and a hash function $H$ such that for all m we have: $$H(e(m)) = e(H(m))$$ This would work if we use RSA encryption along with RSA "hash", ...
0
votes
1answer
46 views

Choosing UWP encryption algorithms

I've just come across the large variety of encryption ciphers available in the UWP WinRT API, both symmetric and asymmetric. I'm trying to figure out which are commonly seen as the most favourable ...
7
votes
0answers
184 views

In RSA, given public key $(n,e)$ and $d^e\bmod n$, can we factor $n$?

Given an RSA public key $(n,e)$ and the textbook-RSA encryption $c$ of a valid matching private exponent $d$, computed as $c\gets d^e\bmod n$:  can we factor $n$ ? Assume $n,e,d$ are per PKCS#1v2.2. ...
1
vote
2answers
156 views

With RSA or ECC, if I encrypt my private key with my public key, is there a way to recover my private key?

Is there an algorithmic, mathematical, technical or implementation "hack" to recover the private key or is it definitively encrypted without any particular mathematical property, like any ...
1
vote
1answer
134 views

How to compute $m$ value from RSA if $phi(n)$ is not relative prime with the $e$?

Here is some information we got : We know the value of $n$, with size $1043$. We know the value of $p$ (size $20$) and $q$ (size $1023$) as the factors. $e = 65537.$ $\varphi(n)$ = $(q-1)(p-1)$ When I ...
-1
votes
1answer
59 views

How to recover RSA messages if they are padded with spaces?

I have a message m="hunter". Let's say we pad it with 2 spaces from the left making the final message as ...
0
votes
0answers
28 views

RSA PADDING WITH e=3 [duplicate]

I have a ciphertext which has been padded with spaces from left the message is 31 bytes long and e = 3 how can I recover the message with python code .
4
votes
1answer
91 views

Consequence of $p\bmod e=2$ in RSA prime generation

When generating a prime $p$ for use in an RSA modulus with public exponent $e$, it is necessary that $\gcd(p-1,e)=1$. When $e=3$, and since $p$ is a large prime, that implies $p\bmod e=2$. Assume an ...
2
votes
2answers
429 views

RSA: How close d should be to n, given default public exponent e = 65537

For small public exponent e, private exponent d should be less than but close to modulus n. Is there any particular test, applied in common implementations, to verify that? If so, what would be the ...

1
2 3 4 5
44