aboutsummaryrefslogtreecommitdiffstats
path: root/src/tests
diff options
context:
space:
mode:
Diffstat (limited to 'src/tests')
-rw-r--r--src/tests/data/mp_valid.dat9
-rw-r--r--src/tests/test_pubkey.cpp4
2 files changed, 11 insertions, 2 deletions
diff --git a/src/tests/data/mp_valid.dat b/src/tests/data/mp_valid.dat
index 1b45bf9bb..47a5df1f1 100644
--- a/src/tests/data/mp_valid.dat
+++ b/src/tests/data/mp_valid.dat
@@ -5419,6 +5419,10 @@
2:1
3:1
4:0
+255:0
+257:1
+65517:0
+65521:1
65537:1
# This one passes Miller-Rabin with a base of 2, but not with most others
@@ -5466,3 +5470,8 @@
2701791887072337189992932234179329410389241899414841054215169960\
1546741832617953638436279944072980418788682453341495300190580109\
0622787969540076319408964006231:0
+
+# Carmichael numbers
+232250619601:0
+9746347772161:0
+340561:0
diff --git a/src/tests/test_pubkey.cpp b/src/tests/test_pubkey.cpp
index 734ff1803..eec7e3bde 100644
--- a/src/tests/test_pubkey.cpp
+++ b/src/tests/test_pubkey.cpp
@@ -170,11 +170,11 @@ size_t validate_encryption(PK_Encryptor& e, PK_Decryptor& d,
{
std::vector<byte> message = hex_decode(input);
std::vector<byte> expected = hex_decode(exp);
- Fixed_Output_RNG rng(hex_decode(random));
+ Fixed_Output_RNG kat_rng(hex_decode(random));
size_t fails = 0;
- const std::vector<byte> ctext = e.encrypt(message, rng);
+ const std::vector<byte> ctext = e.encrypt(message, kat_rng);
if(ctext != expected)
{
std::cout << "FAILED (encrypt): " << algo << std::endl;