Skip to main content
added 1 character in body
Source Link
Maarten Bodewes
  • 94.5k
  • 13
  • 165
  • 319

We assume the usual definitions; public key $(n,e)$ and private key $(n,d)$. From the public key, we cannot find the private key without factoring or breaking the RSA problem. Of course in practice, the private key contains more than $(n,d)$. IIt contains $n,e,d, p, q, d_p,d_q,d_{inv}$. The values $d_p,d_q,d_{inv}$ are used for CRT based calculation that can speed up modular exponentiation up to 4-times. Note that, a decryption can still run if we only $(n,d)$.

We assume the usual definitions; public key $(n,e)$ and private key $(n,d)$. From the public key, we cannot find the private key without factoring or breaking the RSA problem. Of course in practice, the private key contains more than $(n,d)$. I contains $n,e,d, p, q, d_p,d_q,d_{inv}$. The values $d_p,d_q,d_{inv}$ are used for CRT based calculation that can speed up modular exponentiation up to 4-times. Note that, a decryption can still run if we only $(n,d)$.

We assume the usual definitions; public key $(n,e)$ and private key $(n,d)$. From the public key, we cannot find the private key without factoring or breaking the RSA problem. Of course in practice, the private key contains more than $(n,d)$. It contains $n,e,d, p, q, d_p,d_q,d_{inv}$. The values $d_p,d_q,d_{inv}$ are used for CRT based calculation that can speed up modular exponentiation up to 4-times. Note that, a decryption can still run if we only $(n,d)$.

polish
Source Link
kelalaka
  • 49.5k
  • 12
  • 118
  • 205

Yes, there is. The $e$ has chosen small with intentionally. We don't use the public key as the private key and private key as the public key. The name already suggests that; public and private!

An attacker who knows the public modulus can decrypt easily. However, you can start choosing an arbitrary large random $e$ than calculating the private exponent $d$.

We assume the usual definitions; public key $(n,e)$ and private key $(n,d)$. From the public key, we cannot find the private key without factoring or breaking the RSA problem. Of course in practice, the private key contains more than $(n,d)$. I contains $n,e,d, p, q, d_p,d_q,d_{inv}$. The values $d_p,d_q,d_{inv}$ are used for CRT based calculation that can speed up modular exponentiation up to 4-times. Note that, a decryption can still run if we only $(n,d)$.

TheWell, there is a big conceptual problem here, you don't get someone private key to send the message to them, you get their public key. Assume they swapped them before release, then the result, of course, will not be the same since $e\neq d$. IfNow, you can try the common public keys.

Also, if we assume that you have given the public modulus and public-key than it is the usual textbook RSA problem and that has many problems. To mitigate this we use padding schemes like se PKCS#1 v1.5 padding or Optimal Asymmetric Encryption Padding (OAEP), Prefer OAEP, PKCS#1 v1.5 has many attacks and hard to implement correctly.

Yes, there is. The $e$ has chosen small. An attacker who knows the public modulus can decrypt easily. However, you can start choosing an arbitrary large random $e$ than calculating the private exponent $d$.

We assume the usual definitions; public key $(n,e)$ and private key $(n,d)$. From the public key, we cannot find the private key without factoring or breaking the RSA problem.

The result, of course, will not be the same since $e\neq d$. If we assume that you have given the public modulus and public-key than it is the usual textbook RSA problem and that has many problems. To mitigate this we use padding schemes like se PKCS#1 v1.5 padding or Optimal Asymmetric Encryption Padding (OAEP), Prefer OAEP, PKCS#1 v1.5 has many attacks and hard to implement correctly.

Yes, there is. The $e$ has chosen small with intentionally. We don't use the public key as the private key and private key as the public key. The name already suggests that; public and private!

An attacker who knows the public modulus can decrypt easily. However, you can start choosing an arbitrary large random $e$ than calculating the private exponent $d$.

We assume the usual definitions; public key $(n,e)$ and private key $(n,d)$. From the public key, we cannot find the private key without factoring or breaking the RSA problem. Of course in practice, the private key contains more than $(n,d)$. I contains $n,e,d, p, q, d_p,d_q,d_{inv}$. The values $d_p,d_q,d_{inv}$ are used for CRT based calculation that can speed up modular exponentiation up to 4-times. Note that, a decryption can still run if we only $(n,d)$.

Well, there is a big conceptual problem here, you don't get someone private key to send the message to them, you get their public key. Assume they swapped them before release, then the result, of course, will not be the same since $e\neq d$. Now, you can try the common public keys.

Also, if we assume that you have given the public modulus and public-key than it is the usual textbook RSA problem and that has many problems. To mitigate this we use padding schemes like se PKCS#1 v1.5 padding or Optimal Asymmetric Encryption Padding (OAEP), Prefer OAEP, PKCS#1 v1.5 has many attacks and hard to implement correctly.

polish
Source Link
kelalaka
  • 49.5k
  • 12
  • 118
  • 205

In RSA we start with choosing a security parameter $\lambda$ where today we need $\lambda>2048$ i.e. we need at least 2048-bit modulus, key-size recommendations.

We can start with finding two distinct large primeprimes $p,q$$p \text{ and }q$ such that $n= p\cdot q$

For the public modulus $e$ and private modulus $d$ we start to choose $e$ small so that, at least the one side uses a fast calculationcan use faster calculations. The other parameter, $d$ will be largebig number and we need it to be a big number due to the Wiener's attack.

We need to choose an $e$ so that $\gcd(e,\phi(n)) = 1$ where $\phi(n)=(p-1)(q-1)$. The usual choices are small prime $e$ like $\{3,5,17,257,\text{ or }65537 = 2^{(2^4)}+1 = F_4\}$ that guarantees small number of modular exponentiation and squarings. (Carmichael lambda $\lambda$ is a better choice instead of $\phi$)

Another approach is first choosing $e$ than the primes $p \text{ and }q$, this can guarantee to choose a specific $e$.

Once we choose $n=pq,e$ we are ready to calculate the private exponent $d$ which can be found using ext-gcd algorithm where $e\cdot d \equiv 1 \bmod \phi(n)$

This was the usual approach and one can see that there is a great difference between $e$ and $d$.

is there something that differs in the process of encryption with any of these two keys.

Yes, there is. The $e$ has chosen small. An attacker who knows the public modulus can decrypt easily. However, you can start choosing an arbitrary large random $e$ than calculating the private exponent $d$.

the "breaker" doesn't know any of the keys

In this case, the attacker must be able to find the public modulus. If he sees more than one ciphertext, he can figure about it. If a small modulus is not used, this is an extra problem. However, this is not the usual RSA or more generally, public-key cryptosystem. Maybe you need symmetric encryption?

Is the only difference between the public and private is that the private can generate public keys but the public key can not generate private?

We we assume the usual definitions; public key $(n,e)$ and private key $(n,d)$ yes. From the public key, we cannot find the private key without factoringfactoring or breaking the RSA problemRSA problem.

If I want to encrypt with the private or the public key the result is the same, the encryption is passing by the same steps and then results in a difficult breakable encrypted output?

The result, of course, will not be the same since $e\neq d$. If we assume that you have given the public modulus and public-key than it is the usual textbook RSA problem and that has many problems. To mitigate this we use padding schemes like se PKCS#1 v1.5 padding or Optimal Asymmetric Encryption Padding (OAEP), Prefer OAEP, PKCS#1 v1.5 has many attacks and hard to implement correctly.

Final note: we don't use RSA for encryption, we prefer to use Hybrid Encryption and for which RSA-KEM is used as ana Key Encapsulation Mechanism. The other usage of RSA is the digital signature and this time RSA is used with RSA-PSS

And noteremember that RSA Signing is Not RSA Decryption!

In RSA we start with choosing a security parameter $\lambda$ where today we need $\lambda>2048$ i.e. we need at least 2048-bit modulus, key-size recommendations.

We can start with finding two distinct large prime $p,q$ such that $n= p\cdot q$

For the public modulus $e$ and private modulus $d$ we start to choose $e$ small so that, at least the one side uses a fast calculation. The other parameter, $d$ will be large.

We need to choose an $e$ so that $\gcd(e,\phi(n)) = 1$ where $\phi(n)=(p-1)(q-1)$. The usual choices are small prime $e$ like $\{3,5,17,257,\text{ or }65537 = 2^{(2^4)}+1 = F_4\}$ that guarantees small number of modular exponentiation and squarings.

Another approach is first choosing $e$ than the primes, this can guarantee to choose a specific $e$.

Once we choose $n=pq,e$ we are ready to calculate the private exponent $d$ which can be found using ext-gcd algorithm where $e\cdot d \equiv 1 \bmod \phi(n)$

This was the usual approach and one can see that there is a great difference between $e$ and $d$.

is there something that differs in the process of encryption with any of these two keys.

Yes, there is. The $e$ has chosen small. An attacker who knows the public modulus can decrypt. However, you can start choosing an arbitrary large random $e$ than calculating the private exponent $d$.

the "breaker" doesn't know any of the keys

In this case, the attacker must be able to find the public modulus. If he sees more than one ciphertext, he can figure about it. If a small modulus is not used, this is an extra problem. However, this is not the usual RSA or more generally, public-key cryptosystem. Maybe you need symmetric encryption?

Is the only difference between the public and private is that the private can generate public keys but the public key can not generate private?

We we assume the usual definitions; public key $(n,e)$ and private key $(n,d)$ yes. From public key, we cannot find the private key without factoring or breaking the RSA problem.

If I want to encrypt with the private or the public key the result is the same, the encryption is passing by the same steps and then results in a difficult breakable encrypted output?

The result, of course, will not be the same since $e\neq d$. If we assume that you have given the public modulus and public-key than it is usual textbook RSA problem and that has many problems. To mitigate this we use padding schemes like se PKCS#1 v1.5 padding or Optimal Asymmetric Encryption Padding (OAEP), Prefer OAEP, PKCS#1 v1.5 has many attacks and hard to implement correctly.

Final note: we don't use RSA for encryption, we prefer to use Hybrid Encryption and for which RSA-KEM is used as an Key Encapsulation Mechanism. The other usage of RSA is the digital signature and this time RSA is used with RSA-PSS

And note that RSA Signing is Not RSA Decryption!

In RSA we start with choosing a security parameter $\lambda$ where today we need $\lambda>2048$ i.e. we need at least 2048-bit modulus, key-size recommendations.

We can start with finding two distinct large primes $p \text{ and }q$ such that $n= p\cdot q$

For the public modulus $e$ and private modulus $d$ we start to choose $e$ small so that, at least the one side can use faster calculations. The other parameter, $d$ will be big number and we need it to be a big number due to the Wiener's attack.

We need to choose an $e$ so that $\gcd(e,\phi(n)) = 1$ where $\phi(n)=(p-1)(q-1)$. The usual choices are small prime $e$ like $\{3,5,17,257,\text{ or }65537 = 2^{(2^4)}+1 = F_4\}$ that guarantees small number of modular exponentiation and squarings. (Carmichael lambda $\lambda$ is a better choice instead of $\phi$)

Another approach is first choosing $e$ than the primes $p \text{ and }q$, this can guarantee to choose a specific $e$.

Once we choose $n=pq,e$ we are ready to calculate the private exponent $d$ which can be found using ext-gcd algorithm where $e\cdot d \equiv 1 \bmod \phi(n)$

This was the usual approach and one can see that there is a great difference between $e$ and $d$.

is there something that differs in the process of encryption with any of these two keys.

Yes, there is. The $e$ has chosen small. An attacker who knows the public modulus can decrypt easily. However, you can start choosing an arbitrary large random $e$ than calculating the private exponent $d$.

the "breaker" doesn't know any of the keys

In this case, the attacker must be able to find the public modulus. If he sees more than one ciphertext, he can figure about it. If a small modulus is not used, this is an extra problem. However, this is not the usual RSA or more generally, public-key cryptosystem. Maybe you need symmetric encryption?

Is the only difference between the public and private is that the private can generate public keys but the public key can not generate private?

We assume the usual definitions; public key $(n,e)$ and private key $(n,d)$. From the public key, we cannot find the private key without factoring or breaking the RSA problem.

If I want to encrypt with the private or the public key the result is the same, the encryption is passing by the same steps and then results in a difficult breakable encrypted output?

The result, of course, will not be the same since $e\neq d$. If we assume that you have given the public modulus and public-key than it is the usual textbook RSA problem and that has many problems. To mitigate this we use padding schemes like se PKCS#1 v1.5 padding or Optimal Asymmetric Encryption Padding (OAEP), Prefer OAEP, PKCS#1 v1.5 has many attacks and hard to implement correctly.

Final note: we don't use RSA for encryption, we prefer to use Hybrid Encryption and for which RSA-KEM is used as a Key Encapsulation Mechanism. The other usage of RSA is the digital signature and this time RSA is used with RSA-PSS

And remember that RSA Signing is Not RSA Decryption!

Source Link
kelalaka
  • 49.5k
  • 12
  • 118
  • 205
Loading