rsa: Use 2048 bit RSA keys for selftest.
authorVitezslav Cizek <vcizek@suse.com>
Fri, 30 Oct 2015 12:41:41 +0000 (13:41 +0100)
committerWerner Koch <wk@gnupg.org>
Fri, 18 Mar 2016 15:05:56 +0000 (16:05 +0100)
commit78cec8b4754fdf774edb2d575000cb3e972e244c
tree3bb1132d47268c481664355b72fc66a51877b2dd
parentce1cbe16992a7340edcf8e6576973e3508267640
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.
Signed-off-by: Vitezslav Cizek <vcizek@suse.com>
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>
cipher/rsa.c
tests/pubkey.c