Lecture 09
Lecture 09
1 Introduction
Last time, we defined public-key encryption and covered the Diffie-Hellman key agreement
protocol. Here, we will instantiate public-key encryption, in particular we will see the RSA
encryption (invented by Rivest, Shamir and Adlemant in late 80s). We will also cover digital
signatures in the public-key setting. The core idea behind RSA’s encryption is a notion
called ”trapdoor permutations”.
2 Trapdoor Permutations
The main idea behind a trapdoor permutation, π : {0, ..., N-1} → {0, ..., N-1}, is that π
is a bijection that is easy to compute and hard to invert without the trapdoor. Formally,
we have a key generation algorithm (similar to PKE) that works as follows. When we run
Gen(1n ) (for security parameter n ≈ log N ) we obtain the following.
Find ek = π(·) and dk = π −1 (·) for permutations π(·), π −1 (·) such that:
• To encrypt: pick r, s ∈ {0, ..., N − 1} at random and send [π(r), s, hr, si ⊕ b], where
hr, si is defined to be ⊕ni=1 ri · si
• To decrypt: first apply π −1 to π(r) to get back r, then compute hr, si and xor the result
with hr, si ⊕ b to get back the bit b.
The Goldreich-Levin theorem (Theorem 7.5 in Katz and Lindell) states that for the above
scheme, if π is a one-way permutation, then for all poly-time adversaries, A, Prr,s [A(s, π(r)) =
hr, si] ≤ 21 + neg(n). Therefore, the above method of encrypting one bit is actually CPA
What about a that is not prime relative to N ? The argument above shows that if a
is prime relative to N , then aed = π −1 (π(a)) = 1, but for a trapdoor permutation, we need
this to hold for all a ∈ {0, 1}0, . . . , N − 1. Interestingly, it can be shown that for the case of
N = pq, and if gcd(a, N ) = p or q, then aed = π −1 (π(a)) = 1 holds as well. (In problem set
we will discuss why we would be fine even if this would not happen for such a that is not
prime relative to N , simply because there are few of them, and picking a at random will not
be like that for 1 − negl(n) probability).
How to actually encrypt? As we discussed above, the most native way of using RSA
trapdoor permutations for encryption and decryption, which uses me mod N as encryption
of m ∈ {0, . . . , N − 1} and cd mod N for decryption of c. But as we also saw above,
using Goldreich-Levin’s method or ideal hash functions, we can still use RSA as a trapdoor
permutation, in a randomized way, and do the encryption and decyprtion properly.
The goal of an adversary in a security game designed around Example 4.1 would be to
forge a signature such that they could generate a pair (m, t) that passes the Vrf vk (m, t) = 1
equation. This could happen while the adversary gets to see a bunch of correct signatures on
various messages signed by Alice, so to model this, we design a security game such that, the
Challenger possesses a private signature key that is unknown to the adversary. The adversary
has access to a public verification key and the ability to request keys from a Signing Oracle
for a message. The probability of an adversary win should be negligible.
2. Adversary receives vk, and can ask polynomially many messages to be signed m1 , . . . , mk
and it receives t1 = Signsk (m1 ) . . . , tk = Signsk (mk ).
Definition 4.2. We call a signature scheme S = (Gen, Sign, Vrf) secure, if for all poly(n)-
time adversary n, the probability of winning in the security game above is at most negl(n).
• To generate the keys, we generate a pair of permutation and its inverse (trapdoor)
using the generation algorithm for TDPs. Namely, we obtain π, π −1 , and let the public
verification key vk be π(·) (description of permutation) and the private key signing key
sk be π −1 (·) (the descryption fo the trapdoor).
• To verify the message and tag, (m, t), accept if and only if π(t) = m
References
[BR95] Mihir Bellare and Phillip Rogaway. Optimal asymmetric encryption. pages 92–111,
1995.