3 ms·
That's how the Wii got pwned. They were comparing binary SHA-1 hashes in RSA signatures with strncmp. They also weren't checking padding, so you didn't have to
by marcan_42 6y ago
That's how the Wii got pwned. They were comparing binary SHA-1 hashes in RSA signatures with strncmp.
They also weren't checking padding, so you didn't have to use a real signature with a 00 byte in a convenient place (though I did find one), but rather could just use an all-00 signature, because performing the RSA computation on zero yields zero.
- admax88q 6y agoI wonder how many bugs C strings have been responsible for, all because storing a null byte at the end seems more efficient than storing a length up front.
- userbinator 6y agoGood example of how a little insecurity is sometimes a good thing.