Cryptography & Public Key Algorithms
Cryptography is the practice and study of techniques for secure communication in the presence of adversarial behavior. Modern public-key cryptography revolutionized digital security by eliminating the need to share secret keys beforehand.
Cryptography [1] is derived from the Greek words kryptós (hidden) and gráphein (to write). It encompasses mathematical techniques that enable secure data transmission, authentication, and integrity verification. In the digital age, cryptography forms the backbone of secure communications, financial transactions, identity management, and privacy-preserving systems.
The field has evolved from classical substitution ciphers to complex mathematical frameworks grounded in number theory, algebraic geometry, and computational complexity. The advent of public-key cryptography in 1976 marked a paradigm shift, solving the key distribution problem that had constrained symmetric systems for decades.
Early cryptographic methods relied on secrecy of the algorithm rather than secrecy of the key. Julius Caesar used a shift cipher, while the Vigenère square introduced polyalphabetic substitution. During World War II, mechanical devices like the Enigma and Lorenz ciphers demonstrated the power of electromechanical encryption.
Theoretical foundations were established by Claude Shannon in 1949, who formalized concepts of perfect secrecy and information entropy [2]. However, practical secure communication required a breakthrough in key exchange. This arrived with the Diffie–Hellman key agreement and the RSA algorithm, both published in the late 1970s.
Symmetric Cryptography
Symmetric encryption uses a single shared secret key for both encryption and decryption. Algorithms like AES, ChaCha20, and 3DES are highly efficient and widely used for bulk data encryption. However, they suffer from the key distribution problem: communicating parties must securely exchange the key beforehand, which becomes unscalable in large networks.
Asymmetric Cryptography
Asymmetric, or public-key cryptography, uses mathematically linked key pairs: a public key (shared openly) and a private key (kept secret). Data encrypted with the public key can only be decrypted with the corresponding private key, and vice versa for digital signatures. This eliminates the need for prior secret exchange and enables scalable secure communication.
Core Mathematical Principle
Public-key systems rely on one-way functions with trapdoors: operations that are computationally easy to perform in one direction but infeasible to reverse without specific secret information. Examples include integer factorization and discrete logarithms.
A typical public-key protocol involves three phases:
- Key Generation: An algorithm produces a public/private pair from random seeds.
- Encryption/Signature: The sender uses the recipient's public key to encrypt data or verify a signature.
- Decryption/Verification: The recipient uses their private key to recover the plaintext or validate authenticity.
The security does not depend on hiding the algorithm (Kerckhoffs's principle) but on the computational hardness of deriving the private key from the public key.
RSA (Rivest–Shamir–Adleman)
Based on the difficulty of factoring large composite integers. The public key consists of a modulus n = p × q and exponent e; the private key uses d such that ed ≡ 1 (mod φ(n)). RSA remains widely deployed in TLS, PGP, and digital certificates, though key sizes of 2048–4096 bits are now standard to resist modern factorization attacks.
Elliptic Curve Cryptography (ECC)
Utilizes the algebraic structure of elliptic curves over finite fields. The hardness stems from the Elliptic Curve Discrete Logarithm Problem (ECDLP). ECC provides equivalent security to RSA with significantly smaller key sizes (e.g., 256-bit ECC ≈ 3072-bit RSA), making it ideal for constrained devices and mobile protocols. Curve25519 and secp256k1 are prominent standards.
Diffie–Hellman Key Exchange
Enables two parties to establish a shared secret over an insecure channel. Based on the computational Diffie–Hellman problem, it forms the foundation of many authenticated key exchange protocols like ECDH and DHE, which provide forward secrecy when combined with ephemeral keys.
While the mathematical foundations of public-key cryptography are robust, real-world security depends on implementation quality, key management, and threat modeling. Common vulnerabilities include:
- Poor randomness: Predictable key generation compromises the entire system.
- Side-channel attacks: Timing, power, or electromagnetic leakage can reveal private keys.
- Protocol flaws: Incorrect padding, missing authentication, or downgrade attacks.
- Quantum threats: Shor's algorithm can break RSA and ECC on sufficiently large quantum computers, driving research into post-quantum cryptography (PQC).
Industry standards like NIST's PQC standardization process are actively migrating toward lattice-based, code-based, and multivariate schemes to ensure long-term resilience.
Public-key cryptography underpins modern digital infrastructure:
- Transport Layer Security (TLS): Secures web traffic, email, and messaging via certificate-based authentication and ephemeral key exchange.
- Digital Signatures: Enable code signing, document authentication, and blockchain transaction validation.
- Identity Management: SAML, OpenID Connect, and WebAuthn rely on asymmetric keys for secure authentication.
- Secure Messaging: Signal Protocol combines ECDH and X25519 for end-to-end encryption with forward secrecy.
The widespread adoption of public-key cryptography has been one of the most significant enablers of the digital economy, allowing trust to be established without physical proximity or prior relationships.
References & Further Reading
- Stinson, D. R. (2006). CryptographMcGraw-Hill.
- Shannon, C. E. (1949). "Communication Theory of Secrecy Systems". Bell System Technical Journal, 28(4), 656–691.
- Diffie, W., & Hellman, M. (1976). "New Directions in Cryptography". IEEE Transactions on Information Theory, 22(6), 644–654.
- Rivest, R. L., Shamir, A., & Adleman, L. (1978). "A Method for Obtaining Digital Signatures and Public-Key Cryptosystems". Communications of the ACM, 21(2), 120–126.
- Koblitz, N. (1987). "Elliptic Curve Cryptosystems". Mathematics of Computation, 48(177), 203–209.
- National Institute of Standards and Technology (NIST). (2024). Post-Quantum Cryptography Standardization Process. FIPS 203–205.