News for hackers. Stuff that matters.
Re:Show HN: Ruroco – like port knocking, but better by wongarsu on Friday August 23, 2024 @09:25AM (#41328818)
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

Re:Show HN: Ruroco – like port knocking, but better by cius on Friday August 23, 2024 @10:27AM (#41329321)
I 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