Public-Key Cryptography
Module 2 of Cryptography
The Key Exchange Problem
Before public-key cryptography, secure communication required sharing a secret key through a secure channel.
The paradox: To communicate securely, you need to share a key securely. But if you had a secure channel, why do you need encryption?
The Breakthrough: Asymmetric Cryptography
Key pair:
- Public key: Share with everyone
- Private key: Keep absolutely secret
Magical property:
- What one key encrypts, only the other can decrypt
- Knowing the public key doesn't reveal the private key
Digital Signatures
Signatures prove:
- Authentication: The message came from the key owner
- Integrity: The message wasn't modified
- Non-repudiation: The signer can't deny signing
How It Works
Signing (with private key):
signature = sign(message, private_key)
Verification (with public key):
valid = verify(message, signature, public_key)
Key Takeaways
- Public-key crypto uses key pairs: Public (share freely) + Private (keep secret)
- Private key = Identity: Whoever has it controls the funds
- Digital signatures prove ownership without revealing the private key
- Key management is critical: You are your own bank