Asymmetric Cryptography Summary

Asymmetric Cryptography

  • Ciphers Taxonomy:
    • Symmetric (one key)
    • Asymmetric (two keys)
      • Stream
      • Block
  • Asymmetric Ciphers: Encryption and decryption keys are different.
    • Keys are related, but deriving one from the other is computationally infeasible.
    • Each participant needs a key pair (private and public).
    • Also known as public key cryptography.
    • Security depends on:
      • Algorithm strength
      • Key size
      • Confidentiality of the private key.

Key Distribution

  • Key distribution is simpler than symmetric ciphers.
  • Each participant:
    • Creates an asymmetric key pair.
    • Publishes the public key.
    • Keeps the private key secret.
  • If there are nn participants, nn key pairs are needed.
  • Ways to obtain public keys:
    • Directly from the owner.
    • Website.
    • Public keyserver.

Confidentiality Using Asymmetric Ciphers

  • To send a confidential message to Bob, Alice:
    1. Needs Bob's public key.
    2. Encrypts the message using Bob's public key.
    3. Sends the ciphertext to Bob.
  • Bob recovers the message using his private key.
  • Anyone knowing Bob's public key can encrypt messages for him; only Bob can decrypt them.
  • Analogy: Bob's public key is like an unlocked padlock he gives out; his private key is the key to that padlock.
  • Process:
    1. Bob creates a public/private key pair.
    2. Alice gets Bob's public key.
    3. Alice encrypts her message using Bob's public key.
    4. Alice sends the ciphertext to Bob.
    5. Bob decrypts the ciphertext using his private key.
  • Notation:
    • Encryption: C=E(P,KRpub)C = E(P, KR_{pub})
    • Decryption: P=D(C,KRpriv)P = D(C, KR_{priv})
    • KRpubKR_{pub} (Recipient's public key) used for encryption
    • KRprivKR_{priv} (Recipient's private key) used for decryption

Real-World Usage

  • Reporting vulnerabilities or communicating with news reporters where confidentiality is needed but a shared secret key for symmetric encryption is unavailable.
  • Organizations provide a public key for asymmetric encryption.

ElGamal Cryptosystem

  • Relies on the difficulty of discrete logarithms.
  • Designed for encryption, not key agreement, unlike Diffie-Hellman.
  • Ciphertext is twice the length of the plaintext.
  • Ciphertext is randomized.
    • multiple encryptions produce different ciphertexts.
  • System parameters pp and gg (same as Diffie-Hellman).
  • Alice:
    1. Picks random integer aa as private key
    2. Publishes public key: K<em>A</em>Pub=gamodpK<em>{A</em>{Pub}} = g^a mod p
  • Bob (to encrypt message mm):
    1. Encodes mm as a number
    2. Picks random integer rr and computes: grmodpg^r mod p, (K<em>A</em>Pub)r=garmodp(K<em>{A</em>{Pub}})^r = g^{ar} mod p, and m×garmodpm \times g^{ar} mod p
    3. Sends ciphertext (grmodp,m×garmodp)(g^r mod p, m \times g^{ar} mod p)
  • Alice (to recover message):
    1. Computes shared secret: (gr)a=garmodp(g^r)^a = g^{ar} mod p
    2. Recovers m=(m×garmodp)/(garmodp)m = (m \times g^{ar} mod p) / (g^{ar} mod p)

RSA Cryptosystem

  • Based on the difficulty of factoring large integers using modular arithmetic.
  • Used for encryption (confidentiality) and digital signatures (integrity, authentication).
  • Breaking RSA is as hard as factoring the modulus.
  • Key Generation:
    • Choose two large primes pp and qq.
    • Calculate n=pqn = pq.
    • Choose public exponent ee (where e > 1 and (p1)(q1)(p-1)(q-1) have no common factors).
    • Calculate private exponent dd using secret knowledge of pp and qq.
    • Public key is (n,e)(n, e). Private key is dd.
  • Encryption:
    1. Encode plaintext as integers: 1mn1 \leq m \leq n
    2. Encrypt: c=memodnc = m^e mod n
  • Decryption: m=cdmodnm = c^d mod n
  • Key sizes: 1024, 2048, 4096 bits.

Elliptic Curve Cryptography

  • Uses algebraic group defined on points on an elliptic curve.
  • Based on Elliptic Curve Discrete Logarithm Problem.
  • Smaller key size and ciphertext size compared to RSA for the same security level.
  • AES Key Size (Symmetric key) | RSA Key Size | Elliptic curve Key Size
    • <80 | 1024 | 160-223
    • 128 | 3072 | 256-383
    • 192 | 7680 | 384-511
    • 256 | 15360 | 512+

Hybrid Cryptosystems

  • Asymmetric ciphers simplify key distribution.
  • Combination:
    1. Asymmetric cipher encrypts a short message.
      • A randomly chosen shared secret key for a symmetric cipher.
    2. Symmetric cipher encrypts the bulk data with that key.

Summary

  • Asymmetric cryptography uses key pairs (private and public).
  • Solves the key distribution problem.
  • Can provide confidentiality.
  • Asymmetric ciphers are slower than symmetric.
  • Hybrid systems combine the advantages of both.