Public key cryptography (PKC) uses a key pair, a public key and a private key, rather than a single shared secret key. It is based on Number Theory, not substitution-permutation networks, and is asymmetric.
Motivation
- Key distribution
Symmetric cryptography requires either a pre-shared key or a trusted key distribution center (KDC), which must itself be trusted with confidentiality. - Digital signatures
Electronic documents need a signature scheme that is easy to sign and verify, but difficult to forge, with universal verifiability.
Discovery
- Whitfield Diffie worked in a “reportorial style”, combining interviews with others and his own thinking about the problem.
- He developed the concept of digital signatures first, which led him to the broader concept of public key cryptography.
- He considered the public key property, that the encryption key can be made public, the most remarkable aspect of the discovery.
PKC Framework
A key pair’s public key is known to everyone. The private key is known only to its owner. Given the public key and the algorithm, it is computationally infeasible to derive the private key.
- Confidentiality
Sender encrypts with the receiver’s public key. Only the receiver, holding the private key, can decrypt. - Authentication
Signer encrypts a fingerprint (authenticator) of the message with their private key. Anyone can verify it using the signer’s public key. The authenticator must be infeasible to forge without changing the message.
Groups over Finite Sets
Number-theoretic PKC computes over finite groups, since infinite groups () are unusable for computation.
The group of integers modulo : .
The subgroup of relatively prime to , excluding 0 by convention.
If is prime, every nonzero element of is coprime to , so .
The order of a group is its number of elements. , and for prime , .
Example: , removing multiples of the prime factors 2 and 5 from .
Euler’s Totient Function
The number of positive integers less than relatively prime to . Denoted by .
- for prime .
- for distinct primes .
Fermat’s Theorem
For prime and positive integer not divisible by :
Euler’s Theorem
Generalizes Fermat’s theorem to any modulus. For relatively prime:
For (distinct primes) and :
The coprime condition is mandatory. When it fails the theorem gives nothing. For , , so cannot be assumed and the reduction must be done another way.