Advanced Topics in Cryptography
Advanced Topics in Cryptography
Lecture 5
Rengarajan Aravamudhan
Morgan Kleene
Lecturer: Jonathan Katz Scribe(s):
Nan Wang
Aaron Zollman
Although Bidder 2 has no idea what was bid (he doesn’t even know his own bid!), he is still
able to outbid bidder 1 by a factor of α.
The following system for verifying credit cards is also malleable. A user has a credit card
number C1 , C2 , C3 , ..., C48 (where each Ci represents one bit) which is encrypted, bit-wise,
with the merchant’s public key pk and sent to the merchant as follows:
The merchant then immediately responds ACCEPT or REJECT, indicating whether the
credit card is valid. Now, an adversary need not decrypt the message to recover the credit
card: consider what happens if the first element of the above ciphertext is replaced by
Epk (0) (which an attacker can compute since the public key is available!) — if the message
is accepted by the merchant, the first bit of the credit card must be zero; if rejected, it is
one. Continuing in this way, the adversary learns the entire credit card number after 48
such attempts.
These two examples motivate the concept of malleability [4]. Informally, an encryption
scheme is malleable if, given an encryption C of some message M , it is possible to construct
a different ciphertext C ′ decrypting to some “related” message M ′ . Non-malleability pre-
cludes the attacks shown above (in particular). Attacks that are thematically similar to
the ones given above have been implemented [2], although they are much more complicated
than the above examples.
This motivates the development of stronger notions of security preventing the above
attacks. It turns out that non-malleability is (for the cases of interest here) equivalent [1]
5-1
to a security property which is simpler to define called security against chosen-ciphertext
attacks. We may further consider security against non-adaptive chosen-ciphertext attacks
(CCA1) or security against adaptive chosen-ciphertext attack (CCA2); we define both of
these now.
Definition 1 [IND-CCA2] An encryption scheme is secure against adaptive chosen-
ciphertext attacks (CCA2) if the following is negligible for all ppt adversaries A:
2 Zero-Knowledge Proofs
Toward our eventual goal of designing encryption schemes secure against chosen-ciphertext
attacks, we define a class of exchanges for which it holds that one party is able to convince
another that he holds some information without revealing the information itself. We first
review what kinds of computation we consider feasible and then discuss the actual exchanges
that have been devised.
2.1 NP-Completeness
The kinds of computations that can be carried out efficiently are typically considered to
be those that can be done in polynomial time. We consider computational problems as
the recognition of a set of strings, referred to as a language. We say a Turing machine M
accepts a language L if: x ∈ L ⇔ M (x) outputs “accept”. We let a “1” signify acceptance.
There are two sets of computational problems which are of special importance. The
first is the set of languages that can be decided in polynomial time, denoted P . Formally,
a language L is in P if there exists a Turing machine M which takes at most p(|x|) steps
for some polynomial p (where |x| denotes the length of its input string x), and accepts if
and only if x ∈ L. The class N P is the set of languages for which there exist proofs of
membership that can be checked in polynomial time. Formally, a language L is in the class
N P if there exists a polynomial-time Turing machine M 1 such that:
A wx of this sort is called a witness for x. One can think of this as an efficiently-verifiable
“proof” that x ∈ L.
Intuitively, if we can use a solution to problem A to solve problem B it seems as if
problem A is in some sense “(at least) as hard as” problem B. This is formalized by the
notion of a polynomial-time reduction between two languages. We say that language L1 is
1
By convention, the running time of a Turing machine taking multiple inputs is measured as a function
of the length of its first input.
5-2
poly-time reducible to language L2 if there exists a function f : {0, 1}∗ → {0, 1}∗ such that:
(1) f is computable in polynomial time, and (2) x ∈ L1 if and only if f (x) ∈ L2 . We will
sometimes abbreviate this by writing L1 ≤p L2 . Note that if L1 ≤p L2 and L2 ∈ P (i.e., L2
can be decided in polynomial time) then L1 can be decided in polynomial time using the
following algorithm: Given a string x, compute x′ = f (x) and then decide whether x′ ∈ L2 .
Similarly, if L1 ≤p L2 and L2 ∈ N P then L1 ∈ N P as well.
There are languages which, in a certain sense, are “the hardest languages” in N P in
the sense that all problems in N P are poly-time reducible to them. These problems are
called N P complete. Note that if an N P -complete problem could be shown to be in P , then
all of N P would be in P , by the discussion above. A classic example of an N P -complete
language is satisfiability (i.e., given a boolean formula does there exist an assignment of
truth values to variables such that the formula evaluates to true). There are a variety of
other well-known N P -complete problems; the ones we will encounter in this class are:
• Hamiltonian Cycle: This is the lnaguage { G : G is a graph which contains a Hamilton
cycle }. (A Hamiltonian cycle is a cycle in which each vertex appears exactly once.)
5-3
this now for the case of non-interactive proofs (where there is additionally a common random
string available to both parties), and later in the course we will formalize it for interactive
proofs. See [3, 5] for more details.
Definition 2 A pair of ppt algorithms2 (P, V ) is a non-interactive zero-knowledge (NIZK)
proof system for a language L ∈ N P if:
Completeness For any x ∈ L (with |x| = k) and witness w for x, we have:
h i
Pr r ← {0, 1}poly(k) ; π ← P (r, x, w) : V (r, x, π) = 1 = 1.
In words: a random string r is given to both parties. P is given r, x, and the witness
that x ∈ L, and produces a proof π which he sends to V . The verifier, given r, x, and
π, decides whether to accept or reject. The above just says that if x ∈ L and everyone
is honest, then V always accepts.
/ L then ∀P ∗ (even all-powerful P ∗ ), the following is negligible (in |x| = k):
Soundness If x ∈
h i
Pr r ← {0, 1}poly(k) ; π ← P ∗ (r, x) : V (r, x, π) = 1 .
Zero-knowledge There exists a ppt simulator S such that for all x ∈ L (with |x| =
k, the security parameter) and any witness w for x, the following distributions are
computationally indistinguishable:
1. {r ← {0, 1}poly(k) ; π ← P (r, x, w) : (r, x, π)}
2. {(r, π) ← S(x) : (r, x, π)}.
♦
The last condition restricts the information V may obtain from P . Intuitively, it says that if
V has “learned” anything from interacting with P he could also have learned it by himself,
using the polynomial-time simulator S.
References
[1] M. Bellare, A. Desai, D. Pointcheval, and P. Rogaway. Relations Among Notions of
Security for Public-Key Encryption Schemes. Crypto ’98.
[2] D. Bleichenbacher. Chosen Ciphertext Attacks Against Protocols Based on the RSA
Encryption Standard PKCS. Crypto ’98.
[3] M. Blum, P. Feldman, and S. Micali. Non-interactive Zero-Knowledge and its Applica-
tions. STOC ’88.
[4] D. Dolev, C. Dwork, and M. Naor. Nonmalleable Cryptography. SIAM J. Computing
30(2): 391–437, 2000.
[5] O. Goldreich. Foundations of Cryptography, vol. 1: Basic Tools. Cambridge University
Press, 2001.
2
Here, we require that P run in probabilistic polynomial time as well, since we are going to eventually
want to use P to construct efficient cryptographic protocols!
5-4