modern-cryptography
Installation
SKILL.md
Modern Cryptography: ECC, Key Exchange, and Post-Quantum Security
The bedrock of secure communications (TLS, SSH, VPNs) relies on asymmetric cryptography for key exchange and digital signatures. The landscape is shifting from traditional RSA to Elliptic Curve Cryptography (ECC) and, imminently, to Post-Quantum Cryptography (PQC).
Elliptic Curve Cryptography (ECC)
ECC provides equivalent security to RSA but with significantly smaller key sizes, resulting in faster computations and lower bandwidth requirements.
- Mathematical Basis: ECC is based on the algebraic structure of elliptic curves over finite fields. The security relies on the Elliptic Curve Discrete Logarithm Problem (ECDLP): Given a base point $G$ on the curve and a point $P$ such that $P = kG$ (where $k$ is a scalar), it is computationally infeasible to determine the private key $k$ given only $P$ and $G$.
- Public/Private Keys:
- Private Key ($d$): A randomly selected integer.
- Public Key ($Q$): A point on the curve, calculated as $Q = d \times G$ (scalar multiplication).
- Standard Curves: Curve25519 (developed by D. J. Bernstein) is highly favored for its performance and resistance to timing attacks, heavily utilized in modern TLS 1.3 and WireGuard. NIST curves (e.g., P-256, P-384) are also ubiquitous.
Elliptic Curve Diffie-Hellman Ephemeral (ECDHE)
ECDHE is the standard key exchange mechanism in modern protocols, providing Perfect Forward Secrecy (PFS). PFS ensures that even if long-term private keys are compromised in the future, past session keys cannot be derived.