3 ms·
The special thing about the private key is that if you have the private key you can also derive the public key from it. Meanwhile if you only have the public ke
by wongarsu 2y ago
The special thing about the private key is that if you have the private key you can also derive the public key from it. Meanwhile if you only have the public key you can't derive the private key.
Hence you always use the private key for decrypting or for signing. But other than switching which key to use signing and encrypting are the same thing
- cius 2y agoI think some of this is starting to come into focus. It appears the way these keys are commonly stored necessitates careful treatment after generation. For instance, if this reference is accurate, an RSA private key in PKCS#1 includes the p and q prime factors on which the whole security of the key pairs depends, so you certainly would not want to mix up the files: https://crypto.stackexchange.com/a/79606 https://crypto.stackexchange.com/a/79606