Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Diffie-Hellman as public key cryptosystem

Diffie-Hellman as public key cryptosystem

Most People know ElGamal as a Diffie-Hellman-based public key cryptosystem. But internally ElGamal uses a symetric cypher using multiprecision arithmetic. So why not using an efficient symetric cipher instead.

Simon DotOrg

July 08, 2013
Tweet

More Decks by Simon DotOrg

Other Decks in Programming

Transcript

  1. Diffie-Hellman as Public-Key Introducing a public-key cryptosystem based on Diffie-Hellman

    key-exchange (maybe a relaxed generalized ElGamal algorithm)
  2. Diffie-Hellman key exchange given(G , p) a=random() A=Ga mod p

    (G , p , A) b=random() B=Gb mod p K= Ab mod p (B) K =Ba mod p Alice Bob
  3. Diffie-Hellman key exchange given(G , p) a=random() A=Ga mod p

    (G , p , A) b=random() B=Gb mod p K= Ab mod p (B) K =Ba mod p Alice Bob ( p ,a)
  4. A more advanced Usecase of Diffie-Hellman given(G , p) a=random()

    A=Ga mod p (G , p , A) b=random() B=Gb mod p K 1 =Ab mod p (B) K 1 =Ba mod p c=random() C=Gc mod p K 2 =Ac mod p (C) K 2 =Ca mod p
  5. A more advanced Usecase of Diffie-Hellman given(G , p) a=random()

    A=Ga mod p (G , p , A) b=random() B=Gb mod p K 1 =Ab mod p (B) K 1 =Ba mod p c=random() C=Gc mod p K 2 =Ac mod p (C) K 2 =Ca mod p DH can create multiple shared secrets using the same secret
  6. Creating a public key cryptosystem Aside the Diffie-Hellman primitives, we

    need a symetric encryption function crypt(key ,message)=ciphertext
  7. Creating a public key cryptosystem Aside the Diffie-Hellman primitives, we

    need a symetric encryption function given(G , p) a=random() A=Ga mod p Pub=(G , p , A) Priv=( p ,a) And we need to define, what the public/private key is crypt(key ,message)=ciphertext
  8. Sumary of the cryptosystem crypt(key ,message)=ciphertext decrypt(key ,ciphertext)=message The given

    symetric cipher: The key-pair generation given(G , p) a=random() A=Ga mod p Pub=(G , p , A) Priv=( p ,a) (G , p , A)=Pub b=random() B=Gb mod p K=Ab mod p c=crypt(K ,m) C=(B ,c) The encryption algorithm encrypt(Pub,m)=C (B ,c)=C ( p ,a)=Priv K=Ba mod p m=decrypt(K ,c) The encryption algorithm decrypt(Priv,C)=m
  9. How the encryption would look like given(G , p) a=random()

    A=Ga mod p Pub=(G , p , A) Priv=( p ,a) Pub=(G , p , A) b=random() B=Gb mod p K=Ab mod p c=crypt(K ,m) C=(B ,c) K=Ba mod p m=decrypt(K ,c) Alice Bob Priv=( p ,a)
  10. Whats about ElGamal? ElGamal is a subset of the cryptosysten

    i showed, wich uses a specific symetric encryption algorithm crypt(K ,m)=(K∗m)mod p decrypt( K , c)=(K−1∗m)mod p
  11. So why not ElGamal? Like RSA and some other common-use

    Public-Key encryptions ElGamal uses numerics for encryption. This is Inefficient and not that secure like full-featured symetric ciphres.