rsa: Add verify after sign to avoid Lenstra's CRT attack.
* cipher/rsa.c (rsa_sign): Check the CRT.
Failures in the computation of the CRT (e.g. due faulty hardware) can
lead to a leak of the private key. The standard precaution against
this is to verify the signature after signing. GnuPG does this itself
and even has an option to disable this. However, the low performance
impact of this extra precaution suggest that it should always be done
and Libgcrypt is the right place here. For decryption is not done
because the application will detect the failure due to garbled
plaintext and in any case no key derived material will be send to the
user.
- Signed-off-by: Werner Koch <wk@gnupg.org>