Asymmetric Cryptography
Cheat sheet · https://pcornel.dk/topic.php?topic=4696
Answer
Asymmetric cryptography uses a key pair — a public key anyone may have and a private key kept secret — for encryption, key exchange and digital signatures. RSA and elliptic-curve algorithms are the common families.
Remember
- The private key must never leave its owner.
- RSA needs at least 2048 bits; ECC gives the same strength with shorter keys.
- Asymmetric crypto is slow, so it usually protects a symmetric session key.
First checks
openssl genpkey -algorithm ED25519 -out key.pem— generate keyopenssl pkey -in key.pem -noout -text— inspectssh-keygen -l -f— /.ssh/id_ed25519.pub~SSH key fingerprint and type
Verify in this order
key pair → sign/verify or key agreement
Where it usually breaks
First mismatch in key/secret generation → storage/rotation → trust/certificate validation → protocol negotiation → cryptographic operation → peer/application verification; preserve identity/policy/pre-state before mutation.
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=4696