Notes - MCS
Applied Cryptography
Notes - MCS
Applied Cryptography
  • Applied Cryptography
  • Classical (Symmetric) Cryptography
    • Terminology
    • The Players
    • Use Cases
    • Information-Theoretic Security
    • Computational Security
    • Cryptanalysis
    • Practical Approaches
    • Cryptographic Robustness
    • Ciphers
      • Mono-Alphabetic
      • Polylphabetic
    • Rotor Machines
    • Stream Ciphers
  • Modern Symmetric Cryptography
    • Types
    • Symmetric Ciphers
    • Symmetric Block Ciphers
    • Feistel Networks
    • DES (Data Encryption Standard)
    • AES (Advanced Encryption Standard)
    • Stream Ciphers
    • Uniform Random Access
    • Linear Feedback Shift Register (LFSR)
  • Cipher Modes
    • Deployment of (Symmetric) Block Ciphers
    • Stream Cipher Modes
    • Security Reinforcement
  • Cryptographic Hashing
    • Digest functions
    • Rainbow Tables
    • Message Authentication Codes (MAC)
    • Authenticated Encryption
    • Encryption + Authentication
  • RSA & Related Subjects
    • Modular Arithmetic
    • Fast Modular Multiplication
    • The Extended Euclid's Algorithm
    • Linear Maps
    • Fermat's Little Theorem
    • Chinese Remainder Theorem
    • Fermat's Little Theorem
    • Modular Exponentiation
    • Multiplicative Order
    • The Discrete Logarithm Problem
    • Primality tests
    • The Diffie-Hellman Key Exchange Protocol
    • ElGamal Public Key Cryptosystem
    • The Rivest-Shamir-Adleman Cryptosystem
    • Finite Fields
    • Elliptic Curves
    • Diffie-Hellman using elliptic curves
    • Can we do RSA-like things with elliptic curves?
    • The discrete logarithm problem for elliptic curves
    • Secret sharing
    • Quadratic Residues
    • Zero-Knowledge proofs
      • One of two oblivious transfer
      • Coin flipping
      • Zero-knowledge proofs of identity
    • Homomorphic encryption
  • Asymmetric Key Management
    • Design Principles
    • Exploitation of private keys
    • Distribution of public keys
    • Public key (digital) certificates
    • Key pair usage
    • Certification Authorities (CA)
    • Certification Hierarchies
    • Refreshing of asymmetric key pairs
    • Certificate revocation lists (CRL)
    • Validity of signatures
    • Distribution of public key certificates
    • Time Stamping Authority (TSA)
    • PKI (Public Key Infrastructure)
  • Digital Signatures
    • Fundamental Approach
    • Signature Schemes
    • Key Elements
    • The document to sign
    • The signature date
    • The identity of the signatory
    • Optional elements of a digital signature
    • Algorithms
    • RSA signatures
    • ASN.1 digest algorithm prefixes
    • Digital Signature Standard (DSS)
    • Blind Signatures
    • Chaum Blind Signatures
    • Qualified electronic signature
      • Signature devices
    • PKCS #11
    • Microsoft Cryptographic API (CAPI)
    • Long-Term Validation (LTV)
    • LTV Advanced Electronic Signatures (AdES)
Powered by GitBook
On this page
  1. RSA & Related Subjects

ElGamal Public Key Cryptosystem

Last updated 1 year ago

  1. Alice and Bob agree on a large prime number ppp and on an element ggg of Fp∗\mathbb{F}^*_pFp∗​ with a large prime order.

  2. Alice chooses a private key aaa, with 1<a<p−11 \lt a \lt p-11<a<p−1, and publishes A=gamodpA = g^a mod pA=gamodp.

  3. Bob chooses a random ephemeral key kkk.

  4. He uses Alice's public key AAA to compute c1=gkmodpc_1 = g ^k modpc1​=gkmodp and c2=mAkmodpc_2 = mA^kmodpc2​=mAkmodp, where mmm is the plaintext.

  5. He then send (c1,c2)(c_1,c_2)(c1​,c2​) to Alice.

  6. To recover the plaintext mmm, Alice computes m=(c1a)−1c2modpm = (c^a_1)^{-1}c_2modpm=(c1a​)−1c2​modp. This works because (c1a)−1c2=g−akmgak=mmodp(c^a_1)^{-1}c_2 = g ^{-ak}mg^{ak} = m mod p(c1a​)−1c2​=g−akmgak=mmodp.

  7. An eavesdropper has to find kkk from c1c_1c1​ (discrete logarithm problem).

  8. A middle-man can easily manipulte c2c_2c2​; for example, to replace mmm by 2m2m2m all that is necessary is to replace c2c_2c2​ by 2c2modp2c_2 mod p2c2​modp.

  9. This public key cryptosystem, implemented exactly as above, has some security problems.