-
Website
http://www.matasano.com/log -
Original page
http://www.matasano.com/log/469/many-rsa-signatures-may-be-forgeable-in-openssl-and-elsewhere/ -
Subscribe
All Comments -
Community
-
Top Commenters
-
Press Controls
3 comments · 2 points
-
ChrisMtso
12 comments · 1 points
-
Eric Monti
11 comments · 1 points
-
StatlerAndWaldorf
12 comments · 3 points
-
Dave G.
7 comments · 1 points
-
-
Popular Threads
m = s^e mod n
Think:
m = s * s * s - k * n
This iterative process is actually how modular exponentiation is implemented in computers. Each loop, you multiply by s and occasionally subtract off an n, based on the value of some bits of s. "k" is just an unimportant constant (how many times you subtract off n).
So, the question is "how big is 's'?" Normally, size_bits(s) = size_bits(n), i.e. 2048 commonly. This means that every time you multiply by "s", your accumulator wraps around quite a few times. This makes it hard for an attacker to guess how many times it wrapped, just by observing the final result (discrete log problem). Strict enforcement of padding is intended to keep this property.
But Bleichenbacher's attack (and a similar one we found previously in a shipping product) involves making "s" much smaller than n. If you can make size_bits(s)
... size_bits(s)
I like that you can simultaneously break crypto and not be able to use a web application with one button :) This is why you need to stop using your c64 for web browsing.
Much love,
Dave G.
and thanx
nuff said
Actually Safari uses Apple's "Security Framework", which is based on the OpenGroup CDSA codebase. Apple's code does not have the above bug; it makes use of the fact that PKCS#1 signatures are deterministic, constructs the correct value for the cleartext of the signature and check that this is exactly the same as the decryption of the signature.
There's more subtle flavors too:
padding|asn1((HASHALGO_ID,random[xx]),hash), so the noise to make for a nice cube is hidden inside an ignored, large parameter. Rinse, repeat. Many variants, different implementations fail different ways.
If you care about others' code verifying your signatures less error prone, don't use 3. And don't delegate powers to keys that use 3 either ;-)
!?!!??
grep -c "Exponent: 3" curl-ca-bundle.crt
Suppose Fred sees your RSA signaure on m1 and m2, (i.e., he sees (m1d mod n) and (m2d mod n)).
How does he compute the signature on each of m1j mod n (for positive integer j), m1-1 mod n, m1 x m2 mod n, and
in general m1j m2k mod n (for arbitrary j and k)?
Suppose Fred sees your RSA signaure on m1 and m2, (i.e., he sees (m1d mod n) and (m2d mod n)).
How does he compute the signature on each of m1j mod n (for positive integer j), m1-1 mod n, m1 x m2 mod n, and
in general m1j m2k mod n (for arbitrary j and k)?
(Positive integer j), m1-1 mod n, m1.m2 mod n, and in general m1j.m2k mod n (for arbitrary integers j and k)?
need the solution to this question plzzz