Public key encryption
Public key cryptography
A Public Key Encryption Scheme {eKp :Kp ∈Κ} and {dKs :Ks ∈Κ}
has the the following property:
eKp can be public information!
Advantage:
Disadvantage
PKI application
One way function
A function f: X → Y is called a one-way function if
∀ x ∈ X:
1. Computing f(x) is „easy“,
2. Computing f -1(y) is „hard“ or „infeasible“
Example: modular cube roots
It is easy to compute f(x), but computingf -1(y)is infeasible
Discrete exponentiation
Discrete exponentiation: h(x):= gx mod p
x so that y = gx mod p.
For a judicious choices of parameters p and g the DLP is difficult to solve and discrete exponentiation is a one-way function.
Discrete exponentiation is a useful primitive in the construction of cryptographic schemes but it is too slow for many applications.
trapdoor functions
A trapdoor one-way function is a one-way function f where, given extra information (the trapdoor information) it is feasible to computef -1:
Given y ∈ Img(f), find an x ∈ X such that f(x) = y
Example 1:
- Select primes p = 48611 and q = 53993
Computing modular cube roots (f-1) is also easy if p and q are known (basic number theory)
Example 2:
RSA fundamentals
Example: φ(10) = 4 since 1, 3, 7, 9 are relatively prime to 10
1. For p a prime, φ(p) = p-1
3. φ (p⋅ q)=(p-1) ⋅ (q-1)
RSA
1. Choose large primes p and q
2. Let n = p ⋅ q
3. Choose a random encryptionexponent e such that 1 < e < φ(n), and e is relatively prime to φ(n)
φ(n) = (p-1) * (q-1)
4. Derive the decryption exponent d = e-1modφ(n)dise’s inverse (see Euler)
5. Kp= (n,e) and Ks= (n,d)
RSA System:
RSA System:
eKp(x) =xe modn and dKs(c)=cd modn
Consider:
Then:
x ed mod n
= xk⋅ φ(n)+1mod n
= x⋅xk⋅φ(n) modn
= x ⋅ 1 mod n
= x
RSA summary
Public and private keys (e,n) and (d,n) are derived from two secret prime numbers
Plaintext message is treated as a (large!) binary number
Encryption is exponentiation
To break the encryption, one must be able to factor large numbers
Decrpytion uses the trapdoor information d:
RSA: examples of real life pitfalls 1
RSA encryption: c = xe mod n
Plaintext: encoded as a natural number x < n
Simple encoding of short plain text as (very) small x
RSA: examples of real life pitfalls 2
RSA encryption: c = xe mod n
Assume that x is 64 bit session key: 0 < x < 264
• Build table c/1e, c/2e, .. 2/234 e (234 operations)
for x2 = 0, …, 234 test if x2e is in table (34 * 234 operations)
• Total attack time << 264
RSA encryption is homomorphic:
• RSA(m1 m2) = RSA(m1) RSA(m2) (mod n)
Chosen ciphertext attack to learn cipher text cm = RSA(m) for some random m
Elliptic curves cryptosystems
Y = kG (that is, Y is G added k times to itself), find the integer k.
(This problem is known as the elliptic curve discrete logarithm problem)
Elliptic curves for cryptography
Cryptographic algorithms based on the discrete logarithm problem can be transformed into elliptic curve algorithms
PKI Trade offs
Public Key systems are computationally more expensive than symmetric systems
There is a formal rationale of security
A principal needs one private key and one public key
Digital Signatures
Protect authenticity of documents ‘signed by A’.
More precisely, a cryptographic mechanism for associating
documents with verification keys
A has a public verification key and a private signature key
A procedure is required for B to get an authentic copy of A’s public key
A has to protect the signature key and be sure that the key is only used as intended
Encryption with public key
Digital Signature
Electronic Signature vs Digital Signature
Digital signature: mathematical evidence linking a document to a public key
Electronic signatures: a security service for associating documents with legal persons
Certificates are not necessary for verifying digital signatures, verification keys are
Digital signature misconceptions
Verification is decryption with the public key (as stated in X.509)
A signature binds the signer A to the document
Digital signatures are legally binding
Non-repudiation
Non-repudiation: a technical term introduced to distinguish digital signatures from symmetric key authentication services (MAC), where the verifier has the key for generating the MAC
Calling digital signatures “irrefutable evidence” creates the erroneous impression that they cannot be repudiated in court
The legal system does not have the concept of “irrefutable evidence”
Certificates
Today: a certificate is a signed document binding a subject (or “entity”) to other information; subjects can be people, keys, names,…
Certification Authorities