40 years of secret key exchange

by Luca De Feo

Rentrée des Masters Jacques Hadamard

September 8-9, 2016. Paris Saclay.

The beginnings of public key cryptography

Cryptography, helping lovers since 2000 BC

O Romeo, Romeo! wherefore art thou Romeo? Deny thy father and refuse thy name; Or, if thou wilt not, be but sworn my love, And I’ll no longer be a Capulet.

Confidentiality: Has Tybalt seen the message?

Authenticity: Is the message really from Juliet?

Integrity: Is the message exactly what Juliet meant to send?

and: Secret sharing, homomorphic encryption, multiparty computation, plausible deniability, anonimity, proofs of knowledge, proofs of work, …

Secret key (symmetric) cryptography

Romeo and Juliet have met in the Capulet’s orchard. Upon falling in love, they have agreed on a secret key S.

It was the nightingale, and not the lark, That pierced the fearful hollow of thine ear;                           ↓ S   Lw#zdv#wkh#qljkwlqjdoh#dqg#qrw#wkh#odun# Wkdw#slhufhg#wkh#ihduixo#kroorz#ri#wklqh#hdu                           ↓ S-1   It was the nightingale and not the lark That pierced the fearful hollow of thine ear

The birth of public key (asymmetric) cryptography

The modern day Romeo and Juliet have only met on Tinder. They want to share their most intimate secrets in a confidential way, but the Internet is fraught with pirates, hackers, governments, and tech-savvy Italian moms wanting to spy on their messages.

Can Romeo and Juliet establish a common secret by chatting on a public channel without having ever met before in person?

1976: New directions in cryptography

Our modern day Romeo and Juliet: W. Diffie and M. Hellman

We stand today on the brink of a revolution in cryptography. The development of cheap digital hardware has freed it from the design limitations of mechanical computing and brought the cost of high grade cryptographic devices down to where they can be used in such commercial applications as remote cash dispensers and computer terminals. In turn, such applications create a need for new types of cryptographic systems which minimize the necessity of secure key distribution channels and supply the equivalent of a written signature. At the same time, theoretical developments in information theory and computer science show promise of providing provably secure cryptosystems, changing this ancient art into a science.

The Diffie-Hellman key exchange protocol (abstract version)

Let be a finite cyclic group, noted multiplicatively, generated by an element .

Romeo   Juliet
Picks at random;   Picks at random;
Computes ;   Computes ;
Computes   Computes

Ok, is a common something. But is it a secret?

Lady Capulet is spying on Romeo and Juliet’s conversation:

How can she recover ?

Let’s see an example with .

Hard problems

Let be a cyclic group of order .

Discrete logarithm

Let , the discrete logarithm is the unique integer such that .

Discrete logarithm problem (DLP)
Given , find .
Computational Diffie-Hellman problem (CDH)
Given , find such that .

Security reductions

Obviously: CDH → DLP (if you can solve DLP, you can solve CDH);

Conjectured: DLP → CDH.

Computational security

We cannot hope discrete logarithm to be unsolvable for any group. But we can hope it to take VERY LOOONG to solve.

Cost of secret generation

Square-and-multiply exponentiation algorithm:

  • recursive calls;
  • one or two group operations at each call.

Total cost: group operations.

We say that DLP (or CDH) is hard in if no algorithm solves it in polynomial time in .

And if you know a little about complexity theory:

… But we can still conjecture that DLP is hard for some groups…

The classical Diffie-Helman protocol

Let be a prime, the modular integers form a finite field, also written .

Denote by the multiplicative group of units of .

That is all elements of , except , with group operation given by multiplication.

If has a large prime factor, the DLP in seems to be hard!

An example.

Capulet in the middle

It is easy to prove that if CDH is hard, then the Diffie-Hellman key exchange is secure against passive adversaries.

However, if Lady Capulet can intercept messages on Tinder and manipulate them…

Romeo   Lady Capulet   Juliet
Picks at random;   Picks at random;   Picks at random;
Computes ;   Computes ;   Computes ;
Computes   Computes    
    Computes   Computes

Public key encryption

Instead of an ephemeral key, Juliet has a long term secret key anyone can use to send her private message.

Public key encryption system

Key pair
A pair (public key, secret key),
is publicly known (published on Juliet’s Tinder profile).
Encryption algorithm
Inputs: public key and a message ;
Output: a cyphertext .
Decryption algorithm
Inputs: secret key and a cyphertext ;
Output: the message .

Security properties:

First ever encryption protocol: RSA (Rivest, Shamir, Adleman 1977)

From Diffie-Hellman to PK encryption: the El Gamal protocol (1985)



Input: Public key , a message ;

  1. Pick random ;
  2. Compute ;
  3. Compute (shared secret);
  4. Compute ;

Output: The cyphertext .


Input: Secret key , a cyphertext ;

  1. Compute (shared secret);
  2. Compute ;

Output: The message .

CDH hard ⇒ El Gamal is secure


But how does Juliet know that the message is really from Romeo?

Public key signature system

Key pair
A pair (public key, secret key),
is publicly known (published on Romeo’s Tinder profile).
Signature algorithm
Inputs: secret key and a message ;
Output: a signature .
Verification algorithm
Inputs: public key , a message , a signature ;
Output: OK if , FAIL otherwise.

Security property:

Signatures are hard:

Schnorr signatures



Input: Secret key , a message ;

  1. Pick random ;
  2. Compute ;
  3. Compute ;
  4. Compute ;

Output: The signature .


Input: Public key , a message , a signature ;

  1. Compute ;
  2. Compute ;

Output: OK if , FAIL otherwise.

Final remarks

Modern day key exchange

Generic attacks on DLP

Let be a cyclic group of order , let be a generator.

DLP: Given , find .

Baby-step/giant-step, Pollard Rho

Idea: look for collisions of the form

then .


Suppose , by the Chinese remainder theorem

Complexity: , where is the largest factor of .

Sub-exponential algorithms for finite fields

Index calculus

Smooth element

We say that an integer is -smooth if it is the product of primes .

General index calculus

Input: , Output: .

  1. Choose a smoothness basis ;
  2. Choose a field generator ;
  3. Compute the discrete logs base of all elements of :

    • Collect enough relations of the form

    • Put them in a matrix, use linear algebra to find each discrete log;

  4. Rewrite and as products of elements of ;

Output: .

Index calculs variants

Secrity levels

It is usually assumed that unfeasible amounts of computation start at elementary operations.

For good measure

Security level Ideal DLP over Elliptic curve DLP NSA recommendation
80 160 1024 160  
96 192 1536 192  
112 224 2048 224  
128 256 3072 256 SECRET
192 384 7680 384 TOP SECRET
256 512 15360 512  

Key lenghts (in bits) for given security level.

Elliptic curves

Projective space

Let be a field, the projective space is the set of all lines in passing through the origin.

Equivalently, it is the set of triples

up to the equivalence relation

Elliptic curves

An elliptic curve over a field (of characteristic ) is the set of projective solutions of an equation

with , with a distinguished point (the point at infinity ).

Group law

The chord and tangent law

Let’s work out some examples

Hasse’s theorem


Let be an elliptic curve defined over a finite field , then the number of rational points of is bounded by


Key exchange in a post-quantum world

History of computers

  Computer science Physics
1642 Blaise Pascal’s mechanical calculator  
1687   Isaac Newton’s Philosophiæ Naturalis Principia Mathematica
1821   André Ampère’s theory of electrodynamics
1822 Charles Babbage’s difference engine  
1837 Charles Babbage’s analytical engine  
1842 Ada Lovelace writes the first computer program  
1854   Lord Kelvin’s On the Dynamical Theory of Heat
1871   Maxwell’s and Clausius statistical thermodynamics
1873   James C. Maxwell’s Treatise on Electricity and Magneitsm
1900   Max Planck’s black body radiation law
1905   Albert Einstein’s special relativity
1911   Niels Bohr’s atomic model
1912   Henri Poincaré Sur la théorie des quanta
1916   Albert Einstein’s general relativity
1926   Erwin Schrödinger’s equation.
1927   Werner Heisenberg’s uncertainity principle
1935   Einstein-Podolsky-Rosen quantum entanglement (spooky action at a distance)
1939 Konrad Zuse’s electromechanical computers  
1943 Max Newman’s Colossus  
1946 ENIAC  
1947 Transistors  
1952 Integrated circuits  
1964   John S. Bell’s inequalties
1980   Quantum computing (Yuri Manin, Richard Feynman, …)
1994   Peter Shor’s factoring algorithm
2??? First quantum computer  

Quantum computing

Classical computers
Quantum computers

Quantum cats




Two or more qubits can become entangled, also called a superposition state.


Spooky action at a distance (EPR)

  • Entanglement can be carried over long distances;
  • Tested experimentally over hundreds of km;
  • …very hard to maintain for a long time even locally, though.

Quantum circuits

Quantum gates
Quantum circuits

The most dangerous quantum circuit ever

Quantum Fourier transform (QFT)

Peter Shor’s period-finding algorithm

RSA is dead. Diffie-Hellman is dead

Or is it?

Post-quantum cryptography

Slides at http://defeo.lu/talks/yacc-27-09-12.pdf


  1. W. Diffie, M. Hellman, New Directions in Cryptography. IEEE transactions on Information Theory, 1976.

  2. R.L. Rivest, A. Shamir, L. Adleman, A method for obtaining digital signatures and public-key cryptosystems Communications of the ACM, 1978.

  3. T. El Gamal, A public key cryptosystem and a signature scheme based on discrete logarithms. Advances in cryptology, 1984.

  4. C.P. Schnorr, Efficient signature generation by smart cards. Journal of cryptology, 1991.

  5. A. Joux, Algorithmic cryptanalysis. CRC Press, 2009.

  6. R. Barbulescu, P. Gaudry, A. Joux, E. Thomé, A heuristic quasi-polynomial algorithm for discrete logarithm in finite fields of small characteristic. EuroCrypt, 2014.

  7. S. Galbraith, Mathematics of Public Key Cryptography. Cambridge University Press, 2012.

  8. M.A. Nielsen, I.L. Chuang, Quantum Computation and Quantum Information. 10th Anniversary Edition. Cambridge University Press, 2011.

  9. A. Rostovtsev, A. Stolbunov, Public-Key Cryptosystem Based on Isogenies. IACR Cryptology ePrint Archive, 2006.

  10. D. Jao, L. De Feo, Towards quantum-resistant cryptosystems from supersingular elliptic curve isogenies International Workshop on Post-Quantum Cryptography, 2011.

  11. L. De Feo, D. Jao, J. Plût, Towards quantum-resistant cryptosystems from supersingular elliptic curve isogenies. Journal of Mathematical Cryptology, 2014.

Fork me on GitHub