Cramer-Shoup1998 Chapter APracticalPublicKeyCryptosyste PDF
Cramer-Shoup1998 Chapter APracticalPublicKeyCryptosyste PDF
1 Introduction
In this paper, we present and analyze a new public key cryptosystem that is
provably secure against adaptive chosen ciphertext attack (as defined by Rackoff
and Simon [20]). The scheme is quite practical, requiring just a few exponenti-
ations over a group. Moreover, the proof of security relies only on a standard
intractability assumption, namely, the hardness of the Diffie-Hellman decision
problem in the underlying group.
The hardness of the Diffie-Hellman decision problem is essentially equivalent
to the semantic security of the basic E1 Gamal encryption scheme [12]. Thus,
with just a bit more computation, we get security against adaptive chosen cipher-
text attack, whereas the basic E1 Gamal scheme is completely insecure against
adaptive chosen ciphertext attack. Actually, the basic scheme we describe also
requires a universal one-way hash function. In a typical implementation, this can
be efficiently constructed without extra assumptions; however, we also present
a hash-free variant as well.
While there are several provably secure encryption schemes in the literature,
they are all quite impractical. Also, there have been several practical cryptosys-
tems that have been proposed, but none of them have been proven secure under
standard intractability assumptions. The significance of our contribution is that
it provides a scheme that is provably secure and practical at the same time.
There appears to be no other encryption scheme in the literature that enjoys
both of these properties simultaneously.
14
Semantic security, defined by Goldwasser and Micali [14], captures the intuition
that an adversary should not be able to obtain any partial information about
a message given its encryption. However, this guarantee of secrecy is only valid
when the adversary is completely passive, i.e., can only eavesdrop. Indeed, se-
mantic security offers no guarantee of secrecy at all if an adversary can mount
an active attack, i.e., inject messages into a network or otherwise influence the
behavior of parties in the network.
To deal with active attacks, Rackoff and Simon [20] defined the notion of
security against an adaptive chosen ciphertezt attack. If an adversary can inject
messages into a network, these messages m a y b e encryptions, and the adversary
may be able to extract partial information about the corresponding cleartexts
through its interactions with the parties in the network. Rackoff and Simon's
definition models this type of attack by simply allowing an adversary to obtain
decryptions of its choice, i.e., the adversary has access to a "decryption oracle."
Now, given an encryption of a message--the "target" ciphertext--we want to
guarantee that the adversary cannot obtain any partial information about the
message. To achieve this, we have to restrict the adversary's behavior in some
way, otherwise the adversary could simply submit the target ciphertext itself
to the decryption oracle. The restriction proposed by Rackoff and Simon is the
weakest possible: the adversary is not allowed to submit the target ciphertext
itself to the oracle; however, it may submit any other ciphertext, including ci-
phertexts that are related to the target ciphertext.
A different notion of security against active attacks, called non-malleability,
was proposed by Dolev, Dwork, and Naor [9]. Here, the adversary also has ac-
cess to a decryption oracle, but his goal is not to obtain partial information
about the target ciphertext, but rather, to create another encryption of a dif-
ferent message that is related in some interesting way to the original, encrypted
message. For example, for a non-malleable encryption scheme, given an encryp-
tion of n, it should be infeasible to create an encryption of n + 1. It turns out
that non-malleability and security against adaptive chosen ciphertext attack are
equivalent [10].
A cryptosystem secure against adaptive chosen ciphertext attack is a very
powerful cryptographic primitive. It is essential in designing protocols that are
secure against active adversaries. For example, this primitive is used in proto-
cols for authentication and key exchange [11,10, 2] and in protocols for escrow,
certified e-mail, and more general fair exchange [1, 92]. The practical importance
of this primitive is also highlighted by the adoption of Bellare and Rogaway's
OAEP scheme [4] (a practical but only heuristically secure scheme) as an internet
encryption standard and for use in the SET protocol for electronic commerce.
There are also intermediate notions of security, between semantic security
and adaptive chosen ciphertext security. Naor and Yung [19] propose an attack
model where the adversary has access to the decryption oracle only prior to
obtaining the target ciphertext, and the goal of the adversary is to obtain par-
tial information about the encrypted message. Naor and Yung called this type
15
Previous Work
Provably Secure Schemes. Naor and Yung [19] presented the first scheme prov-
ably secure against lunch-time attacks. Subsequently, Dolev, Dwork, and Naor
[9] presented a scheme that is provably secure against adaptive chosen ciphertext
attack.
All of the previously known schemes provably secure under standard in-
tractability assumptions are completely impractical (albeit polynomial time),
as they rely on general and expensive constructions for non-interactive zero-
knowledge proofs.
Outline of paper
In w we review the basic definitions that we need for security and intractability
assumptions. In w we outline our basic scheme, and in w we prove its security.
In w we discuss some implementation details and variations on the basic scheme.
16
2 Definitions
On the one hand, if the Diffie-Hellman decision problem is hard, then the
group element h r could be replaced by a random group element without changing
significantly the behavior of the attacker; however, if we perform this substitu-
tion, the message m is perfectly hidden, which implies security.
Note that the basic E1 Gamal scheme is completely insecure against adaptive
chosen ciphertext attack. Indeed, given an encryption (u, e) of a message m, we
can feed the (u, g. e) to the decryption oracle, which gives us g. m.
18
2.3 Collision-resistant H a s h F u n c t i o n s
3 T h e Basic Scheme
Xl,~2,Yl,Y2, Z ~ Zq
are computed. Next, a hash function H is chosen from the family of universal
one-way hash functions. The public key is (gl, g2, c, d, h, H), and the private key
is ( X l , x 2 , Y l , y 2 , z ) .
Encryption. Given a message m E G, the encryption algorithm runs as follows.
First, it chooses r E Zq at random. Then it computes
The ciphertext is
uXl+•IO•.#X2"•y20•
1 ~2 = V.
If this condition does not hold, the decryption algorithm outputs "reject"; oth-
erwise, it outputs
m =
19
We first verify that this is an encryption scheme, in the sense that the de-
cryption of an encryption of a message yields the message. Since ul -- g~ and
us = g~, we have
21 2~ r21 r 2 2 = C r.
Ul U2 = gl gs
Likewise, "1
" ~1.~sy2 = d r and u~ = h r Therefore, the test performed by the decryp-
tion algorithm will pass, and the output will be e/h r = m.
4 Proof of Security
To prove the theorem, we will assume that there is an adversary that can
break the cryptosystem, and that the hash family is universal one-way, and show
how to use this adversary to construct a statistical test for the Diflie-Hellman
decision problem.
For the statistical test, we are given (gl, gs, ul, us) coming from either the
distribution 1%or D. At a high level, our construction works as follows. We build
a simulator that simulates the joint distribution consisting of adversary's view in
its attack on the cryptosystem, and the hidden bit b generated by the generated
oracle (which is not a part of the adversary's view).
We will show that if the input comes from D, the simulation will be nearly
perfect, and so the adversary will have a non-negligible advantage in guessing
the hidden bit b. We will also show that if the input comes from 1%, then the
adversary's view is essentially independent of b, and therefore the adversary's
advantage is negligible. This immediately implies a statistical test distinguishing
1%from D: run the simulator and adversary together, and if the simulator outputs
b and the adversary outputs b', the distinguisher outputs 1 if b -- b', and 0
otherwise.
We now give the details of the simulator. The input to the simulator is
(gl, gs, ul, us). The simulator runs the following key generation algorithm, using
the given gl, gs. The simulator chooses
ZI,X2,Yl,Y2,Zl,Z2 q Zq
c = g l21 g222 , d = ~1
,~/11,~/2
u2
Z l Z2
, h = gl g2 9
The simulator also chooses a hash function H at random. The public key that the
adversary sees is (gl, g2, c, d, h, H). The simulator knows (xl, x2, Yl, Y2, zl, z2).
20
Note that the simulator's key generation algorithm is slightly different from
the key generation algorithm of the actual cryptosystem; in the latter, we essen-
tially fix z2 = O.
The simulator answers decryption queries as in the actual attack, except that
it computes m = e/(u~'u~2).
We now describe the simulation of the encryption oracle. Given too, m l , the
simulator chooses b E {0, 1} at random, and computes
e ~ "t&
_ .1~ 1"tb_2z 2"llbb,
-- Ol -~- H(Ul,U2,e), v : a'Xl+Yl~"'=2"~'Y2(~
`*1 `*2 '
and outputs
(ul,us,e,v).
That completes the description of the simulator. As we will see, when the
input to the simulator comes from D, the output of the encryption oracle is a
perfectly legitimate ciphertext; however, when the input to the simulator comes
from It, the output of the decryption oracle will not be legitimate, in the sense
that loga~ ul ~ logg2 u2. This is not a problem, and indeed, it is crucial to the
proof of security.
The theorem now follows immediately from the following two lemmas.
Consider the joint distribution of the adversary's view and the bit b when
the input comes from the distribution D. Say ul = g[ and u~ = g~.
It is clear in this case that the output of the encryption oracle has the right
distribution, since u =x z u 2= 2 = cr, ,-1Yl,"*s
Y2 = d r, and u z,1 u z22 = hr; indeed, these
equations imply that e = mbh r and v = crd ra, and a itself is already of the
right form.
To complete the proof, we need to argue that the output of the decryption
oracle has the right distribution. Let us call (ul, i us,
, e ,, v t ) E G 4 a valid ciphertext
and
log d = Yl + wy2. (2)
These two equations come from the public key. The output from the encryption
oracle does not constrain P any further, as the hyperplane defined by
logv = r z l + wrx2 + aryl + arwy2 (3)
contains 7) .
N o w suppose the adversary submits an invalid ciphertext (u't,u'2,v', d) to
the decryption oracle, where log u~ = rl and log u~ = wry, with rl ~ r~. The
decryption oracle will reject,unless P happens to lieon the hyperplane 7{ defined
by
logv' = r~xl +wr~x2 + a ' r ~ y l + a ' r2wyg.,
' (4)
where c~' = H(ul, u~, e'). But it is clear that the equations (1), (2), and (4) are
linearly independent, and so 7/intersects the plane 7) at a line.
It follows that the first time the adversary Submits an invalid ciphertext,
the decryption oracle rejects with probability 1 - 1/q. This rejection actually
constrains the point P, puncturing the plane 7~ at a line. Therefore, for i =
1, 2,..., the ith invalid ciphertext submitted by the adversary will be rejected
with probability at least 1 - 1/(q- i+ 1). LFrom this it follows that the decryption
oracle rejects all invalid ciphertexts, except with negligible probability.
L e m m a 2. When the simulator's input comes from It, the distribution of the
hidden bit b is (essentially) independent from the adversary's view.
Let ul = g~l and u2 = g~Or2. We may assume that rl # r2, since this
occurs except with negligible probability. The temma follows immediately from
the following two claims.
Claim 1. If the decryption oracle rejects all invalid ciphertexts during the attack,
then the distribution of the hidden bit b is independent of the adversary's view.
To see this, consider the point Q = (Zl,Z2) E Z 2. At the beginning of the
attack, this is a random point on the line
logh = zl + wz2, (5)
determined by the public key. Moreover, if the decryption oracle only decrypts
valid ciphertexts (u~, u~, e', v'), then the adversary obtains only linearly depen-
dent relations r ' l o g h : r'zl + r'wz2 (since (u~)Z~(u~) z2 = g lr'zx g2r'z2 = hr').
Thus, no further information about Q is leaked.
Consider now the output (ul, u2, e,v) of the simulator's encryption oracle.
We have e = e rob, where e = u zl
9 1 u 2z2. Now, consider the equation
loge = r l z l + wr2z2. (6)
Clearly, (5) and (6) are linearly independent, and so the conditional distribution
of e--conditioning on b and everything in the adversary's view other than e - -
is uniform. In other words, e is a perfect one-time pad. It follows that b is
independent of the adversary's view.
22
Claim 2. The decryption oracle will reject all invalid ciphertexts, except with
negligible probability.
As in the proof of Lemma 1, we study the distribution of P = (xl, x2, Yl, Y2) E
Zl, conditioned on the adversary's view. LFrom the adversary's view, this is a
random point on the line l: formed by intersecting the hyperplanes (1), (2), and
det
(100 0 )
0 1
rl wr2 ~rl
w
o~wr2
= w2(r2 - rl)(r~ - r~)(a - a') ~ 0.
r[ wrl 'wrl
Thus, 7/intersects the line s at a point, from which it follows (as in the proof of
Lemma 1) that the decryption oracle rejects, except with negligible probability.
Case S. ~tu'1, u'2, e '~, ~ (ul,u2,e) and a' = a. We argue that if this happens
with nonnegligible probability, then in fact, the family of hash functions is not
universal one-way~a contradiction. Note that if we made the stronger assump-
tion of collision resistance, there would be essentially nothing to prove, but with
the weaker universal one-way assumption, an argument is needed. We use the
adversary to break the universal one-way hash function as follows. We modify
the encryption oracle in the simulator, so that it outputs (ul, u2, e, v) as before,
except that now, e E G is simply chosen completely at random. Up until such
time that a collision occurs, the adversary's view in this modified simulation
is statistically indistinguishable from the view in the original simulation, and
so the adversary will also find a collision with nonnegiigible probability in the
modified simulation. But the argument (ul, u2, e) to H is independent of H, and
in particular, we can choose it before choosing H.
In this section, we briefly discuss some implementation details and possible vari-
ations of the basic encryption scheme.
23
We choose a large prime p such that p - 1 = 2q, where q is also prime. The group
G is the subgroup of order q in Z~. We restrict a message to be an element of the
set ( 1 , . . . , q), and "encode" it by squaring it modulo p, giving us an element in
G. We can recover a message from its encoding by computing the unique square
root of its encoding modulo p that is in the set ( 1 , . . . , q).
For the hash function, one could use a function like SHA-1, or possibly some
keyed variant, and make the appropriate collision-resistance assumption. How-
ever, it is only marginally more expensive to do the following, which is based
only on the hardness of discrete logarithms in G. Say we want to hash a bit
string to an integer mod q. Write the bit string as a sequence ( a l , . . . ,ak), with
each ai E { 0 , . . . , q - 1). To define the hash function, choose h l , . . . , h k in G
at random. The hash of ( a l , . . . ,ak) is then the least non-negative residue of
• 1... fi~h E Z;, where the sign is chosen so that this value is in ( 1 , . . . , q).
This hash function is collision resistant, provided computing discrete loga-
rithms in G is hard. To see this, note that from a collision, we obtain a nonzero
sequence ( a l , . . . ,ak) rood q such that
h~ * . . . h ~ u E { 1 , - 1 } N G = {1}.
We can actually eliminate the hash function H from the scheme, so that the
security can be based strictly on the Diffie-Hellman decision problem for an
24
arbitrary group G. Suppose the strings we need to hash in the original scheme
are of the form ( a l , . . . , a k ) , where 0 < ai < p. In the modified scheme, we
replace the group element d in the public key by d l , . . . ,dk. For 1 < i < k, we
have di = ~l"wl~w2~2, where Yil and yi2 are random elements of Zq included in the
secret key. When encrypting, we compute
k
v -~ cr II d~ it,
i=1
l] ~- ~I ~2
Using the same proof techniques as for the basic scheme, it is straightforward
to prove that this modified version is secure against adaptive chosen ciphertext
attack, assuming the Diffie-Hellman decision problem in G is hard.
To achieve security against lunch-time attacks only, one can simplify the basic
scheme significantly, essentially by eliminating d, yl, Y2, and the hash function
H. When encrypting, we compute v = cr, and when decrypting, we verify that
23 ~--- xl x2
Ul U2 9
Acknowledgments
We would like to thank Moni Naor for his very useful comments on an earlier
draft of this paper, and in particular, for pointing out that a universal one-way
hash function is sufficient to prove the security of our basic scheme, and for
suggesting the hash-free variant in w
References
1. N. Asokan, V. Shoup, and M. Waidner. Optimistic fair exchange of digital signa-
tures. In Advances in Cryptology-Eurocrypt '98, 1998.
2. M. Bellare, R. Canetti, and H. Krawczyk. A modular approach to the design
and analysis of authentication and key exchange protocols. In 30th Annual ACM
Symposium on Theory of Computing, 1998.
3. M. Bellare and P. Rogaway. Random oracles are practical: a paradigm for designing
efficient protocols. In First A CM Conference on Computer and Communications
Security, pages 62-73, 1993.
4. M. Bellare and P. Rogaway. Optimal asymmetric encryption. In Advances in
Cryptology--Crypto '94, pages 92-111, 1994.
5. M. BeUare and P. Rogaway. Collision-resistant hashing: towards making UOWHFs
practical. In Advances in Cryptology-Crypto '97, 1997.
25