0

This is a fast question. I know about asymmetric encryption and I know that you can use the private key to decrypt whatever is encrypted with the public key. I know too that having the Private key I can generate the public one associated to it.

Here is my question: Is there any crypto algorithm to generate a pair of keys so I can't generate the public one having the private?

I would like to know if there is something like

Private(ciphertext) = Encrypted

Public(Encrypted) = ciphertext

Public(ciphertext) = Encrypted2

Private(Encrypted2)= ciphertext

And without generating the public from the private.

Thank you very much

Ryan Fold
  • 181
  • 1
  • 3
  • 14

2 Answers2

0

The RSA algorithm relies on the difficulty of factoring the product of two prime numbers. Two large, arbitrary, prime numbers p and q are used generate each private-public key pair. Given either only the private key or the public key, it is computationally difficult to find the other key without the prime numbers p and q. However, we do not p and q in order to apply either the public or the private key to a text.

Joshua
  • 2,431
  • 15
  • 23
0

You can't conclude that because you have a private key then you can generate the public key. Take RSA as an example - here you can't deduct one of the keys in a key pair from the other - and which one is picked as the private key, and which is picked as the public key is random.

However, when storing the keys the private key file usually includes a copy of the public key as well (or enough information to recreate it).

Ebbe M. Pedersen
  • 7,250
  • 3
  • 27
  • 47