Jump to content

Cryptography

From Wikiversity
(Redirected from Topic:Cryptography)
Four rotor German naval Enigma machine on display at Bletchley Park.

Cryptography (sometimes known as cryptology) is the mathematical and computational study of information security; in particular the study of methods used to transmit information securely between two or more parties, unreadable by unauthorized eavesdroppers. Cryptography finds many applications in the modern world, e.g. protecting online logins, smart card protocols, email privacy, confidential documents, and so on.

Fundamentals

[edit | edit source]

Usually, to protect information from being revealed, a person will attempt to render the information unreadable by anyone without some secret information. This process is called encryption. The original data is usually called the plaintext, while the resulting scrambled data is usually called the ciphertext. The secret information can take the form of a password, a number, a file, etc. and is usually called the key (as it can "unlock" the ciphertext).

Any authorized party should be able to, given a ciphertext and its secret key, reconstruct the original information, in a process known as decryption. This allows several parties to transmit information securely using a shared secret key. There are many different methods to perform encryption, varying widely in simplicity and security. These methods are usually called ciphers.

Much of cryptography is also devoted to the opposing field of cryptanalysis, the act of trying to "break" a cipher so that encrypted information can be retrieved, using only part or none of the secret key, by an adversary. The continuous feedback between cryptographers, who develop ciphers, and cryptoanalysts, who break them, has led to the development of many advanced and secure ciphers used today.

There is also some confusion between codes and ciphers. A code is a symbol, whether it be a letter or a symbol, which stands for a word, not a letter. A cipher is a symbol which stands for a letter.

Caesar Ciphers

[edit | edit source]

Concept and Mechanism

[edit | edit source]

The Caesar cipher is one of the simplest and most widely known encryption techniques. It is a type of substitution cipher where each letter in the original message (plaintext) is replaced by a letter some fixed number of positions down the alphabet.

  • The number of positions shifted is called the key or shift.
  • If the shift reaches the end of the alphabet, it wraps around back to the beginning.
  • For example, with a shift of 1, 'A' becomes 'B', 'B' becomes 'C', and 'Z' wraps around to become 'A'.

Cryptanalysis and Vulnerabilities

[edit | edit source]

The Caesar cipher offers virtually no communication security and can be broken easily even with ciphertext-only attacks.

  • Brute Force: The cipher has an extremely small keyspace. Because there are only 25 possible shifts in the English alphabet, an attacker can simply test every single possible shift until a readable plaintext emerges.
  • Frequency Analysis: In any given language, certain letters appear more frequently than others. In English, 'E' is the most common letter, followed by 'T', 'A', and 'O'. Because a Caesar cipher does not mask the underlying letter frequencies (a monoalphabetic substitution), an attacker can count the frequency of characters in the ciphertext. If the most common character in the ciphertext is 'H', the attacker can reliably guess that 'H' corresponds to 'E', revealing a shift of 3.
  • Pattern Recognition: Short words and predictable sentence structures (like "THE", "AND") retain their distinct character patterns, providing immediate clues to the shift value used.

Classifications

[edit | edit source]

Cryptography can be classified into the following areas:

  • Classical - before the 20th century, simple substitution and transposition ciphers played major roles
  • Modern - mechanized and digitized cryptography came into existence in the 20th century
  • Key exchanges - Public Key and Quantum cryptography
    • Diffie-Hellman key exchange and RSA in the last few decades has enabled mass secure transmissions and internet transactions
    • Quantum Cryptography - As quantum computers come into existence, algorithms and protocols are fast being developed for this new platform.

Post-Quantum Cryptography (PQC)

[edit | edit source]

Post-Quantum Cryptography (PQC) refers to the development of cryptographic systems for classical computers that are secure against analysis and attacks by quantum computers.[1]

Quantum Threats to Modern Cryptography

[edit | edit source]

Modern public-key cryptography relies heavily on mathematical problems that are computationally infeasible for classical computers, but vulnerable to quantum algorithms:

  • Shor's Algorithm: Formulated by Peter Shor in 1994, this polynomial-time quantum algorithm can efficiently solve both integer factorization and the discrete logarithm problem (including elliptic-curve discrete logarithms).[2] As a result, widely deployed asymmetric cryptosystems such as RSA, Diffie–Hellman (DH), and Elliptic Curve Cryptography (ECC/ECDSA) provide no long-term security against a cryptanalytically relevant quantum computer (CRQC).[3]
  • Grover's Algorithm: A quantum search algorithm formulated by Lov Grover in 1996 that provides a quadratic speedup for searching unsorted databases.[4] For symmetric ciphers (such as AES) and cryptographic hash functions (such as SHA-256), Grover's algorithm effectively halves the bit security against brute-force attacks (e.g., $n$-bit security is reduced to $\frac{n}{2}$ bits). This threat is mitigated on classical systems simply by increasing key lengths (e.g., transitioning from AES-128 to AES-256).[5]

Primary Mathematical Approaches to PQC

[edit | edit source]

Post-quantum algorithms rely on hard mathematical problems that remain intractable for both classical and quantum computing paradigms:

  1. Lattice-Based Cryptography: Relies on the hardness of high-dimensional geometric lattice problems, such as the Shortest Vector Problem (SVP) and the Learning With Errors (LWE) problem.[6] Lattice schemes provide efficient implementations for both public-key encryption and digital signatures.
  2. Code-Based Cryptography: Based on the hardness of decoding an arbitrary linear error-correcting code (such as the classic McEliece cryptosystem, introduced in 1978).[7]
  3. Hash-Based Signatures: Uses one-way hash functions combined with Merkle tree structures (e.g., LMS, XMSS, and SPHINCS+) to construct stateless or stateful digital signatures with minimal security assumptions.[8]
  4. Isogeny-Based & Multivariate Cryptography: Involves computing maps between elliptic curves (isogenies) or solving systems of multivariate quadratic polynomial equations over finite fields.[5]

NIST Standardized PQC Algorithms

[edit | edit source]

In August 2024, the United States National Institute of Standards and Technology (NIST) finalized its first set of post-quantum standards through Federal Information Processing Standards (FIPS):[9][10][11]

Standard Primary Algorithm Cryptographic Category Underlying Hard Problem
FIPS 203 ML-KEM (formerly CRYSTALS-Kyber) Key Encapsulation Mechanism (KEM) Module Learning With Errors (M-LWE)
FIPS 204 ML-DSA (formerly CRYSTALS-Dilithium) Digital Signature Module Learning With Errors (M-LWE) / Short Integer Solution (M-SIS)
FIPS 205 SLH-DSA (formerly SPHINCS+) Stateless Digital Signature Security of Cryptographic Hash Functions

"Harvest Now, Decrypt Later" Threat

[edit | edit source]

A primary operational concern driving early PQC migration is the **Harvest Now, Decrypt Later (HNDL)** attack vector.[9] Adversaries intercept and store encrypted data transmissions today with the intent of decrypting them in the future once quantum hardware capable of running Shor's algorithm becomes operational. This creates an immediate risk for data requiring long-term confidentiality (such as trade secrets, financial ledgers, and government intelligence).[1]

References

[edit | edit source]
  1. 1.0 1.1 National Institute of Standards and Technology. (2024). Post-Quantum Cryptography Standardization. NIST Computer Security Resource Center.
  2. Shor, P. W. (1994). "Algorithms for quantum computation: discrete logarithms and factoring." IEEE 35th Annual Symposium on Foundations of Computer Science, pp. 124–134. doi:10.1109/SFCS.1994.365700.
  3. Barker, E., & Dang, Q. (2020). "Recommendation for Stateful Hash-Based Signature Schemes." NIST Special Publication 800-208, National Institute of Standards and Technology.
  4. Grover, L. K. (1996). "A fast quantum mechanical algorithm for database search." Proceedings of the 28th Annual ACM Symposium on Theory of Computing (STOC), pp. 212–219. doi:10.1145/237814.237866.
  5. 5.0 5.1 Bernstein, D. J., Buchmann, J., & Dahmen, E. (Eds.). (2009). Post-Quantum Cryptography. Springer-Verlag. ISBN 978-3-540-88701-0.
  6. Regev, O. (2009). "On lattices, learning with errors, random linear codes, and cryptography." Journal of the ACM, 56(6), Art. 34. doi:10.1145/1568318.1568324.
  7. McEliece, R. J. (1978). "A Public-Key Cryptosystem Based On Algebraic Coding Theory." DSN Progress Report, 42-44, pp. 114–116.
  8. Merkle, R. C. (1989). "A Certified Digital Signature." Advances in Cryptology — CRYPTO '89 Proceedings, Lecture Notes in Computer Science, vol 435, pp. 218–238. Springer.
  9. 9.0 9.1 NIST. (2024). FIPS 203: Module-Lattice-Based Key-Encapsulation Mechanism Standard. National Institute of Standards and Technology. doi:10.6028/NIST.FIPS.203.
  10. NIST. (2024). FIPS 204: Module-Lattice-Based Digital Signature Standard. National Institute of Standards and Technology. doi:10.6028/NIST.FIPS.204.
  11. NIST. (2024). FIPS 205: Stateless Hash-Based Digital Signature Standard. National Institute of Standards and Technology. doi:10.6028/NIST.FIPS.205.


Additional Study

[edit | edit source]
[edit | edit source]

Offsite Courses

[edit | edit source]

With Video Lectures

[edit | edit source]
  • Cryptography I, Dan Boneh, Stanford University (Coursera)
  • Cryptography II, Dan Boneh, Stanford University
  • Applied Cryptography, Dave Evans, University of Virginia

Without Video Lectures

[edit | edit source]
  • Modern Cryptology, William Cherowitzo, University of Colorado
  • Introduction to Cryptography, Yehuda Lindell, Bar-Ilan University
  • Foundations of Cryptography, Yehuda Lindell, Bar-Ilan University
  • Intuitive Advanced Cryptography, Nguyen Thoi Minh Quan

Readings and learning media

[edit | edit source]

Videos

[edit | edit source]

Lessons

[edit | edit source]

Additional Study

[edit | edit source]

Offsite courses

[edit | edit source]

With video lectures

[edit | edit source]
  1. Cryptography I, Dan Boneh, Stanford University, 2014
  2. Cryptography II, Dan Boneh, Stanford University, 2014
  3. Applied Cryptography, Dave Evans, University of Virginia (self paced course on Udacity)

Without video lectures

[edit | edit source]
  1. Modern Cryptology, William Cherowitzo, University of Colorado, Spring 2012.
  2. Introduction to Cryptography, Yehuda Lindell, Bar-Ilan University, 2013.
  3. Foundations of Cryptography, Yehuda Lindell, Bar-Ilan University, 2014.
  4. Intuitive Advanced Cryptography, Nguyen Thoi Minh Quan.
[edit | edit source]

See also

[edit | edit source]
  • openssl implementation of the TSL cryptographic protocol
  • [[Category:Computer science]] [[Category:Information technology]] [[Category:Mathematics]] [[Category:Cryptography]]