Skip to main content

Short note: public key cryptography

Short answer

Public-key cryptography uses a public key for encryption and a private key for decryption; only the private key can decrypt. RSA (n=pq, C=P^e mod n) enables secure key exchange and digital signatures without prior secret sharing. It is slower than symmetric ciphers, so often used to exchange session keys.

Write a short note on public key cryptography.

Public-key (asymmetric) cryptography uses a pair of mathematically related keys: a public key E known to everyone, and a private key D kept secret by the owner. What one key encrypts, only the other can decrypt. It was proposed by Diffie and Hellman (1976); RSA (Rivest, Shamir, Adleman, 1978) is the best-known algorithm.

Requirements

  1. D(E(P)) = P.
  2. It is extremely hard to find D from E.
  3. E cannot be broken by a chosen-plaintext attack.

Working (confidentiality)

 Sender                          Receiver
 P --[encrypt with receiver's  --> C --[decrypt with
      PUBLIC key]                       own PRIVATE key]--> P

RSA outline

  1. Choose two large primes p, q; n = p × q; z = (p−1)(q−1).
  2. Choose e coprime with z; find d with e·d ≡ 1 (mod z).
  3. Public key = (e, n); private key = (d, n).
  4. Encrypt: C = Pᵉ mod n. Decrypt: P = Cᵈ mod n.

Uses and comparison

  • Key exchange, digital signatures (sign with private key, verify with public key), secure web (SSL/TLS).
  • Advantage: no secret key needs to be shared; disadvantage: much slower than symmetric ciphers, so it is used to exchange a session key for a symmetric cipher.

✓ Answer checked by Claude Opus 5.5 (high effort)

All Operating System chapter 8 questions →