I was reading Certificate, Key, and Trust Services Concepts
from ios developer library. In this article when i read this line “Data encrypted with the private key can be decrypted only with the public key, and vice versa.”.
i was stuck. how this can be possible?
I think Data encrypted with the public key can be decrypted with the private key.
Is this typo or am i missing something?
The encryption operation is same as the decryption operation.
Most public key encryption relies on the fact that same operation with the two keys produces the plain text again.
So using them in wrong order will still give back the original data.
But encrypting with private key means that everyone will be able to decrypt it – as the the decryption is done with public key. Almost certainly not what you want! 🙂
However using the keys in reverse, is what’s done in digital signatures. So not entirely useless. 🙂