Security Engineering. Ross Anderson
Чтение книги онлайн.
Читать онлайн книгу Security Engineering - Ross Anderson страница 90
With signatures, things are slightly simpler. In general, it's often enough to just hash the message before applying the private key:
Many of the things that have gone wrong with real implementations have to do with side channels and error handling. One spectacular example was when Daniel Bleichenbacher found a way to break the RSA implementation in SSL v 3.0 by sending suitably chosen ciphertexts to the victim and observing any resulting error messages. If he could learn from the target whether a given
5.7.2 Cryptography based on discrete logarithms
While RSA was the first public-key encryption algorithm deployed in the SSL and SSH protocols, the most popular public-key algorithms now are based on discrete logarithms. There are a number of flavors, some using normal modular arithmetic while others use elliptic curves. I'll explain the normal case first.
A primitive root modulo
Thus 5 is a primitive root modulo 7. This means that given any
|
= 5 | (mod 7) | |
|
25 |
|
(mod 7) |
|
4 x 5 |
|
(mod 7) |
|
6 x 5 |
|
(mod 7) |
|
2 x 5 |
|
(mod 7) |
|
3 x 5 |
|
(mod 7) |
Figure 5.17: Example of discrete logarithm calculations
5.7.2.1 One-way commutative encryption