0
votes

In RSA,

I understand that if a data is encrypted using public key, corresponding private key can be used to decrypt it and vice versa. But :

Data encrypted using public key can be decrypted using same public key?

Data encrypted using private key can be decrypted using same private key?

This property is same for other public key algorithms too?

1
I'll leave it be, but this is not really a programming question, maybe try the beta crypto.stackexchange.com next time?Maarten Bodewes

1 Answers

3
votes

Data encrypted using public key can be decrypted using same public key?

No. That would defeat the purpose, because everyone knows the public key.

Data encrypted using private key can be decrypted using same private key?

No. That would defeat the purpose, because then you cannot send anyone an encrypted message (without knowing their private key, which by definition you don't).

Symmetric cryptography does work this way, though. There is only a single secret key, that you can use to encrypt your files before you put them on Dropbox, or that you can share with your friend to send messages that only the two of you can read.

Also, in some public key systems, it is possible to derive the public key from the private key (not the other way around, of course). But this does not really change the principle (because the public key is known to the owner of the private key anyway).

This property is same for other public key algorithms too?

The definition of public key cryptography is that there is a key pair, consisting of a private half and a public half, one of them being used to create the message, the other to read them.