rsa: Use 2048 bit RSA keys for selftest.
* cipher/rsa.c (selftests_rsa): Use 2048 bit keys. (selftest_encr_1024): Replaced by selftest_encr_2048. (selftest_sign_1024): Replaced by selftest_sign_2048. (selftest_encr_2048): Add check against known ciphertext. (selftest_sign_2048): Add check against known signature. (selftest_sign_2048): Free SIG_MPI. * tests/pubkey.c (get_keys_new): Generate 2048 bit keys.
Use a 2048 bit keys for RSA selftest.
Check against the known signature/ciphertext after signing/encryption
in the selftests.
Also generate 2k keys in tests/pubkey.
Thanks to Ludwig Nussel.
Additional changes by wk:
- Reformat some strings and comments.
- Replace a free by xfree.
- Free SIG_MPI.
- Make two strings static.
- Signed-off-by: Werner Koch <wk@gnupg.org>