Let n be an RSA modulus, with e and d the public and private exponents
respectively. Let k = dlog256 ne be the byte length of n and let B = 28(k¡1). 2
Assume an attacker knows the public key (n; e) and has access to an oracle
that for any chosen ciphertext x indicates whether the corresponding plaintext
y ´ xd (mod n) is less than B or not | returning y < B" or y ¸ B". For
the last assumption to hold it is su±cient for the oracle to distinguish a failure
in the integer-to-octets conversion (in which case y ¸ B" is returned) from any
subsequent failure, e.g. of the integrity check.
The attacker wishes to determine the plaintext m ´ cd (mod n) corre-
sponding to a captured ciphertext c. The basic step is to choose a multiple f
and send fe ¢ c (mod n) to the oracle. This ciphertext corresponds to the plain-
text f ¢ m. 3 The oracle indicates if this is in the range [0;B) or (B; n) modulo
n, thus providing a mathematical relationship about m that reduces the range
(or ranges) in which it must lie. The aim is to reduce this range with successive
oracle queries until just one value is left | m.
The approach of the attack described in this paper is to choose values of f
such that the range where f ¢ m could lie spans exactly one boundary between
a region where f ¢ m < B (mod n) and a region where f ¢ m ¸ B (mod n).
The oracle response narrows the range to one of these regions.
Initially we know m 2 [0;B), as all valid messages are in this range by
construction. One point to note is that since m < B there is always a multiple
of m that lies in any region of width B. For instance, for any integer i there is
always some integer f such that f ¢ m 2 [in; in + B).
The following attack assumes 2B < n. This assumption will usually be sat-
is¯ed as RSA moduli are typically chosen to be exact multiples of 8 bits long
making n between 128 and 256 times larger than B. Situations where this as-
sumption does not hold are discussed toward the end of this section.
Step 1: Try multiples of 2; 4; 8; : : : 2i; : : : in turn until the oracle returns ¸ B".
For each multiple f1 the possible values of f1 ¢ m span a single boundary point
at B.
1.1 We know m 2 [0;B). Let f1 = 2.
1.2 So f1 ¢ m 2 [0; 2B). Try f1 with the oracle, i.e. send fe
1 ¢ c (mod n).
2 Any number less than B encoded into k octets will start with a `00'h octet.
3 (fe ¢ c)d ´ fed ¢ cd ´ f ¢ m (mod n)
1.3a If the oracle indicates < B":
This implies f1 ¢ m 2 [0;B), so 2f1 ¢ m 2 [0; 2B).
Set f1 Ã 2f1 and go back to step 1.2.
1.3b If the oracle indicates ¸ B:
This implies f1 2 [B; 2B) for a known (even) multiple f1. Rephrasing this
gives f1
2 ¢ m 2 [B
2 ;B) for a known multiple f1
2 . Now move to the next step.
Step 2: Start with a multiple f2 such that f2 ¢ m is just less than n + B for
the maximum possible m. Keep increasing this multiple until the oracle returns
< B". For each multiple f2 the possible values of f2 ¢m span a single boundary
point at n.
2.1 We have f1
2 ¢ m 2 [B
2 ;B). Let f2 = bn+B
B c ¢ f1
2 .
2.2 So f2 ¢ m 2 [n
2 ; n + B). Try f2 with the oracle.
2.3a If the oracle indicates ¸ B":
This implies f2 ¢ m 2 [n
2 ; n), so (f2 + f1
2 ) ¢ m 2 [n
2 ; n + B).
Set f2 Ã f2 + f1
2 and go back to step 2.2.
2.3b If the oracle indicates < B":
This implies f2 ¢ m 2 [n; n + B) for a known multiple f2. Now move to the
next step.
As f2 increases at iterations through step 2.3a the lower bound on f2 ¢ m
increases, eventually exceeding n when f2 = d 2n
B e ¢ f1
2 . Branch 2.3b must occur
at or before this multiple. That is, step 2 will always terminate | taking at most
d n
B e oracle queries.
Step 3: Try multiples f3 that give a range for f3 ¢ m about 2B integers wide
and spanning a single boundary point. Each oracle response will half the range
back to a width of about B integers, so the next multiple is approximately twice
the previous value.
3.1 We have f2 ¢ m 2 [n; n + B).
Rephrasing, we have a multiple f2 and a range [mmin;mmax) of possible m
values, where mmin = d n
f2
e , mmax = bn+B
f2
c and f2 ¢ (mmax ¡ mmin) ¼ B.
3.2 Choose a multiple ftmp such that the width of ftmp ¢m is approximately 2B.
ftmp = b 2B
mmax¡mmin
c. This value is about double the previous multiple.
3.3 Select a boundary point, in + B, near the range of ftmp ¢ m.
i = b ftmp¢mmin
n c.
3.4 Choose a multiple f3 such that f3 ¢m spans a single boundary point at in+B.
f3 = d in
mmin
e. This gives f3 ¢ m 2 [in; in + 2B) (though the upper bound is
only approximate). f3 is approximately equal to ftmp. Try f3 with the oracle.
3.5a If the oracle indicates ¸ B":
This implies f3 ¢ m 2 [in + B; in + 2B).
Set mmin à d in+B
f3
e and go back to step 3.2.
3.5b If the oracle indicates < B":
This implies f3 ¢ m 2 [in; in + B).
Set mmax à b in+B
f3
c and go back to step 3.2.
Each answer from the oracle in step 3 selects either the top or bottom half
(approximately) of the f3 ¢ m range, halving the range of possible m values.
Eventually the range in which m lies narrows to a single number, which is the
desired plaintext. At this point f3 ¼ B = 28(k¡1).
The description of step 3 above does not provide a proof that those particular
choices of multiples, boundary points and interval widths will always work for
any key or message. Minor variations on these choices can make the attack
algorithm marginally more e±cient. See [1] for a more mathematically rigorous
analysis of a closely related problem.
Let n be an RSA modulus, with e and d the public and private exponents
respectively. Let k = dlog256 ne be the byte length of n and let B = 28(k¡1). 2
Assume an attacker knows the public key (n; e) and has access to an oracle
that for any chosen ciphertext x indicates whether the corresponding plaintext
y ´ xd (mod n) is less than B or not | returning y < B" or y ¸ B". For
the last assumption to hold it is su±cient for the oracle to distinguish a failure
in the integer-to-octets conversion (in which case y ¸ B" is returned) from any
subsequent failure, e.g. of the integrity check.
The attacker wishes to determine the plaintext m ´ cd (mod n) corre-
sponding to a captured ciphertext c. The basic step is to choose a multiple f
and send fe ¢ c (mod n) to the oracle. This ciphertext corresponds to the plain-
text f ¢ m. 3 The oracle indicates if this is in the range [0;B) or (B; n) modulo
n, thus providing a mathematical relationship about m that reduces the range
(or ranges) in which it must lie. The aim is to reduce this range with successive
oracle queries until just one value is left | m.
The approach of the attack described in this paper is to choose values of f
such that the range where f ¢ m could lie spans exactly one boundary between
a region where f ¢ m < B (mod n) and a region where f ¢ m ¸ B (mod n).
The oracle response narrows the range to one of these regions.
Initially we know m 2 [0;B), as all valid messages are in this range by
construction. One point to note is that since m < B there is always a multiple
of m that lies in any region of width B. For instance, for any integer i there is
always some integer f such that f ¢ m 2 [in; in + B).
The following attack assumes 2B < n. This assumption will usually be sat-
is¯ed as RSA moduli are typically chosen to be exact multiples of 8 bits long
making n between 128 and 256 times larger than B. Situations where this as-
sumption does not hold are discussed toward the end of this section.
Step 1: Try multiples of 2; 4; 8; : : : 2i; : : : in turn until the oracle returns ¸ B".
For each multiple f1 the possible values of f1 ¢ m span a single boundary point
at B.
1.1 We know m 2 [0;B). Let f1 = 2.
1.2 So f1 ¢ m 2 [0; 2B). Try f1 with the oracle, i.e. send fe
1 ¢ c (mod n).
2 Any number less than B encoded into k octets will start with a `00'h octet.
3 (fe ¢ c)d ´ fed ¢ cd ´ f ¢ m (mod n)
1.3a If the oracle indicates < B":
This implies f1 ¢ m 2 [0;B), so 2f1 ¢ m 2 [0; 2B).
Set f1 Ã 2f1 and go back to step 1.2.
1.3b If the oracle indicates ¸ B:
This implies f1 2 [B; 2B) for a known (even) multiple f1. Rephrasing this
gives f1
2 ¢ m 2 [B
2 ;B) for a known multiple f1
2 . Now move to the next step.
Step 2: Start with a multiple f2 such that f2 ¢ m is just less than n + B for
the maximum possible m. Keep increasing this multiple until the oracle returns
< B". For each multiple f2 the possible values of f2 ¢m span a single boundary
point at n.
2.1 We have f1
2 ¢ m 2 [B
2 ;B). Let f2 = bn+B
B c ¢ f1
2 .
2.2 So f2 ¢ m 2 [n
2 ; n + B). Try f2 with the oracle.
2.3a If the oracle indicates ¸ B":
This implies f2 ¢ m 2 [n
2 ; n), so (f2 + f1
2 ) ¢ m 2 [n
2 ; n + B).
Set f2 Ã f2 + f1
2 and go back to step 2.2.
2.3b If the oracle indicates < B":
This implies f2 ¢ m 2 [n; n + B) for a known multiple f2. Now move to the
next step.
As f2 increases at iterations through step 2.3a the lower bound on f2 ¢ m
increases, eventually exceeding n when f2 = d 2n
B e ¢ f1
2 . Branch 2.3b must occur
at or before this multiple. That is, step 2 will always terminate | taking at most
d n
B e oracle queries.
Step 3: Try multiples f3 that give a range for f3 ¢ m about 2B integers wide
and spanning a single boundary point. Each oracle response will half the range
back to a width of about B integers, so the next multiple is approximately twice
the previous value.
3.1 We have f2 ¢ m 2 [n; n + B).
Rephrasing, we have a multiple f2 and a range [mmin;mmax) of possible m
values, where mmin = d n
f2
e , mmax = bn+B
f2
c and f2 ¢ (mmax ¡ mmin) ¼ B.
3.2 Choose a multiple ftmp such that the width of ftmp ¢m is approximately 2B.
ftmp = b 2B
mmax¡mmin
c. This value is about double the previous multiple.
3.3 Select a boundary point, in + B, near the range of ftmp ¢ m.
i = b ftmp¢mmin
n c.
3.4 Choose a multiple f3 such that f3 ¢m spans a single boundary point at in+B.
f3 = d in
mmin
e. This gives f3 ¢ m 2 [in; in + 2B) (though the upper bound is
only approximate). f3 is approximately equal to ftmp. Try f3 with the oracle.
3.5a If the oracle indicates ¸ B":
This implies f3 ¢ m 2 [in + B; in + 2B).
Set mmin à d in+B
f3
e and go back to step 3.2.
3.5b If the oracle indicates < B":
This implies f3 ¢ m 2 [in; in + B).
Set mmax à b in+B
f3
c and go back to step 3.2.
Each answer from the oracle in step 3 selects either the top or bottom half
(approximately) of the f3 ¢ m range, halving the range of possible m values.
Eventually the range in which m lies narrows to a single number, which is the
desired plaintext. At this point f3 ¼ B = 28(k¡1).
The description of step 3 above does not provide a proof that those particular
choices of multiples, boundary points and interval widths will always work for
any key or message. Minor variations on these choices can make the attack
algorithm marginally more e±cient. See [1] for a more mathematically rigorous
analysis of a closely related problem.
翻訳されて、しばらくお待ちください..
