Co6GC: Introduction to Provable Security

Welcome to the first post in COSIC’s Guide to Crypto! In this series, researchers from COSIC will be informally writing about different concepts in cryptography. Our aim is to introduce the reader to these concepts with explanations, illustrations and examples; so let’s get started!

Introduction to Provable Security

At risk of stating the obvious, in cryptography provable security consists in constructing mathematical proofs of the security of algorithms under certain assumptions. These enable us to say something along the lines of “breaking the secrecy of encryption algorithm \(E\) is as hard as solving the very hard computational problem \(P\)”. More formally, these proofs establish logical arguments that tie together definitions of schemes, security properties and hardness assumptions.

The motivation for providing proofs is that, if we define the powers of an adversary precisely, and then prove that any of its attacks can be turned into a solution for a hard problem, then we gain confidence in the theoretical security of the scheme in question. We call this reducing the security of the scheme to a hard problem. That is, to achieve its goals, the adversary must attack either the implementation of the scheme (in software or hardware) or the hard problem to which the scheme is reduced. (A caveat: we sometimes make other assumptions in these proofs, and these can hide other attack avenues; but this is for a later discussion.)

This post aims to provide an introduction to provable security in the context of modern cryptography. We will first present the different kinds of definitions that come together within proofs and then present what a notion of security looks like. This will be illustrated with a simple example in a later post.

Algorithms

The first thing to define are the objects that we work with, i.e. the schemes and protocols. Since these are algorithms, we need to define what their inputs and outputs are.

For example, an encryption scheme consists of three algorithms: \(\mathsf{Keygen}\), \(\mathsf{Enc}\) and \(\mathsf{Dec}\). \(\mathsf{Keygen}\) takes as input some parameters and outputs a key. The encryption algorithm \(\mathsf{Enc}\) then takes this key, together with a message (plaintext) and possibly some randomness, and computes a ciphertext. Finally, the decryption algorithm Dec takes in a ciphertext together with a key and outputs a plaintext (or possibly a failure error). This defines what an adversary will be trying to attack.

Already we can prove simple properties, such as correctness. This is the notion that a scheme behaves as expected. In the case of encryption schemes, we prove that “for any key from \(\mathsf{Keygen}\), any message encrypted by \(\mathsf{Enc}\) under that key is decrypted correctly by \(\mathsf{Dec}\) using that same key”.

Adversaries

Next we define what kind of adversaries we defend against. Here there are several orthogonal dimensions to consider.

  1. Runtime. We first consider whether we deal with unbounded adversaries, or with some which can only execute polynomially many possibly randomised steps (i.e. a probabilistic polynomial-time (PPT) adversary). The first is much stronger, and completely unrealistic; it nevertheless allows to define notions such as perfect secrecy. The second is more realistic and the one most often used in practice-oriented proofs of security. The rest of this post considers only PPT adversaries.
  2. Goals. We also define what an adversary is trying to achieve. In the case of encryption it could aim to either recover the plaintext behind a given ciphertext (called a “one-way” (OW) challenge), or learn one bit of information from a ciphertext encrypting one of two possible messages (called an “indistinguishability” (IND) challenge). Here the adversary chooses \( m_0 \) and \( m_1 \) and is given \( c = \mathsf{Enc}(m_b) \) for some unknown \( b \) that it then has to guess. In the case of signature schemes, adversaries aim to produce forgeries: valid signatures for messages that were never signed by the legitimate owner of the key. Schemes that resist such attacks are called “existentially unforgeable” (EUF).
  3. Powers. Finally we define whether an adversary has any powers which can help it in achieving its goal. For encryption schemes this could be an encryption oracle which receives plaintexts from the adversary and returns legitimate ciphertexts formed using the key in question. This is called a “chosen plaintext attack” (CPA) as the adversary can see encryptions of any messages it chooses. We also consider giving adversaries access to a decryption oracle which receives ciphertexts and return plaintexts, or errors, resulting from the decryption under the key in question. This is then called a “chosen ciphertext attack” (CCA) and resistance against it is the current required standard of any serious encryption scheme.

Hard reliable stuff

After defining what adversaries are trying to attack, what they try to achieve and what help they can have, we turn to hard computational problems. Under the right parameters, these are assumed to be intractable for PPT algorithms and therefore a very good source of security guarantees. (Note that hard computational problems do not provide security against unbounded adversaries. For this, one should turn to information-theoretic cryptography.)

There is a subtle but important point that arises here: these hard problems are only assumed to be hard for PPT algorithms, they are not provably so. For most of them, including the two we present below, there are decades of mathematical research that have tried, and failed, to come up with efficient (non-quantum) algorithms to solve them. This gives us a very solid foundation on which to base our trust. Ultimately, however, provable security is only secure as long as these problems remain hard.

The discrete logarithm problem (DLP) is a classic such hard problem used in cryptography. Given a description of a mathematical group \( G \), one of its generators \( g \), and an element \( h = g^a \) (in multiplicative notation), this problem consists in finding the value of \(a\). There are groups for which this is easy, such as \( \mathbb{Z}_p^+ \), for any integer \( p \), with generator \( 1 \). Indeed given any integer \( k \), the (additive) discrete logarithm of \( k \) with base \( 1 \) is trivially \( k \) itself. But there are others where this is not the case, such as subgroups of \( \mathbb{Z}_p^\ast \) with \( p \) a prime, or groups of points on certain elliptic curves.

Other hard problems in the same family include the computational Diffie–Hellman (CDH) problem and the decisional Diffie–Hellman (DDH) problem. In the first, one is given \( (G, g, g^a, g^b) \) and has to return the group element \( g^{ab} \). In the second, one is given \( (G, g, g^a, g^b, h) \) and must decide whether \( h = g^{ab} \) or not. Both of these have been used to guarantee the security of many schemes in cryptography including one we will see in a later post.

With the invention of Schor’s quantum algorithm for computing discrete logarithms in quantum polynomial time, these “hard” problems will become easy once a sufficiently powerful quantum computer is built. For this reason, research in cryptography has recently focused on using alternative hard problems based on different areas of mathematics. Among others, these include lattices, supersingular isogenies, systems of multivariate quadratic equations and codes, and will be the subject of other posts in this series.

Putting it all together

Finally, we put together the three components decribed above to formulate security theorems. These take the following form.

A scheme \( S \) is secure against any adversary running in \( T \) time, aiming for goal \( G \) with powers \( O \), assuming that the computational problem \( P \) is hard for \( T \)-time adversaries.

In the case of encryption schemes, we often see something along the lines of:

The encryption scheme \( E = (\mathsf{Keygen}, \mathsf{Enc}, \mathsf{Dec}) \) is IND-CCA secure against any PPT adversary under the assumption that problem \( P \) is hard.

This is then proven by constructing something called a security reduction. This reduction places itself between the adversary against the scheme and the hard computational problem. Its purpose is to show that any PPT adversary that can make use of an encryption and decryption oracle (generic CCA implies access to both) to learn at least 1 bit of information from a ciphertext (IND) can efficiently be turned into an algorithm to solve problem \( P \). If the assumption that \( P \) is a hard problem holds, then such theoretical adversaries are not possible, and we say that the security of \(E\) reduces to the hard problem \(P\). This way we obtain a strong security guarantee for our scheme.

Further reading

For readers further interested in formal foundations of cryptography, we recommend Katz and Lindell’s Introduction to Modern Cryptography; more information can be found here.