Original Release Date: 4/25/2018
In our technology-driven world, keeping personal information safe from prying eyes is becoming increasingly important. Thankfully, for the everyday user, cryptography is widely implemented, and we can be confident that only intended recipients can view sensitive information. Anyone who has ever sent an e-mail, used online banking, purchased something with Bitcoin, or entered a password into their computer has undoubtedly used cryptography to safeguard their information. The tiny padlock next to the URL in web browsers serves as verification that you are interacting with a website that has a valid SSL/TLS certificate that has been digitally signed by a trusted certificate authority. In other words, any communication with that website is encrypted.
Cryptography is often described as the science and art of secret codes. Historically, this was true; however, as increasingly complex codes were broken, mathematicians and computer scientists sought to add formality and rigor to the field. The textbook Introduction to Modern Cryptography defines cryptography as “the study of mathematical techniques for securing digital information, systems, and distributed computations against adversarial attacks.”
This definition helps to capture the breadth of what the field aims to do. Nowadays, modern cryptography is not just used for encrypting messages; it has a number of purposes, including:
Cryptography can be broadly broken down into two categories: private (symmetric) key cryptography and public (asymmetric) key cryptography. Now, let’s suppose Alice and Bob want to communicate.
One interesting practice that is widely accepted is Kerckhoffs's principle, which states that cryptographic algorithms should be secure even if everything – barring the secret key – is made public. This seems counter-intuitive at first glance, but a deeper look will help clarify this concept. Remember that little green padlock that is displayed beside the URL in your web browser? If you click on the padlock and select view certificate, the digital certificate details can be viewed, including the type of algorithm used and your public key.
Making the details of the algorithm freely available allows for public scrutiny and peer review. If researchers and industry professionals have not been able to break a cryptosystem over the course of several decades, then we can be reasonably confident in its security. Current public key cryptography is based on the assumption that certain problems are computationally hard. For example, we do not yet have an efficient algorithm for factoring a number into its prime factors using classical computers. Prime numbers are numbers that are indivisible, meaning they can only be divided by 1 and themselves.
Ex. 2, 3, 5, 7, etc.
Factoring a number into two prime components is relatively easy when the numbers are small.
Ex. 15 = 3 * 5, 161 = 7*23
However, as the numbers grow larger, finding prime factors becomes increasingly difficult and may take several lifetimes to solve. Other problems similarly used for their computational hardness include the RSA Problem, Decisional Diffie-Hellman, and the Discrete Logarithm Problem. As such, we can take comfort in the fact that, even if the cryptosystem’s algorithm is public knowledge, our sensitive data is safe!
Taking Precautions:
Computer scientists who study cryptography are often concerned with developing new cryptosystems and mathematically proving that they are secure. Just because a cryptographic scheme is provably secure in theory, correctly implementing it in practice is extremely important. For example, Cipher Block Chaining (CBC) mode is a way of encrypting variable length messages. The scheme for CBC requires that we use a random starting value known as an initialization vector (IV). However, if one were to use CBC-MAC, a similar-in-concept scheme for authenticating messages, then it is important to not use a random IV. In fact, using a random IV for CBC-MAC is not secure. Sometimes, seemingly innocuous changes can render an otherwise secure system unsecure. This small case study demonstrates the importance of using best practices when implementing cryptography at home or on the job. Never take “short-cuts” or change any aspect of the cryptographic algorithm without first ensuring the integrity of the system.
Additional Resources: