From 33e70b427aa8d11e1430307876a11df6150edf0a Mon Sep 17 00:00:00 2001 From: Steffen Jaeckel Date: Sat, 26 Aug 2017 12:03:35 +0200 Subject: [PATCH 1/3] CRYPT_INVALID_KEYSIZE isn't only used for block ciphers --- src/misc/error_to_string.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/misc/error_to_string.c b/src/misc/error_to_string.c index 8a5baef..2a0d3f8 100644 --- a/src/misc/error_to_string.c +++ b/src/misc/error_to_string.c @@ -20,7 +20,7 @@ static const char * const err_2_str[] = "CRYPT_ERROR", "Non-fatal 'no-operation' requested.", - "Invalid keysize for block cipher.", + "Invalid key size.", "Invalid number of rounds for block cipher.", "Algorithm failed test vectors.", From b49ce35b2cebc7ccae4ff4f746b7b7e8a87ffab4 Mon Sep 17 00:00:00 2001 From: Steffen Jaeckel Date: Sat, 26 Aug 2017 12:05:53 +0200 Subject: [PATCH 2/3] fix DH timing when compiling with TFM support --- demos/timing.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/demos/timing.c b/demos/timing.c index 2bb6e6c..14a59df 100644 --- a/demos/timing.c +++ b/demos/timing.c @@ -902,7 +902,12 @@ static void time_dh(void) ulong64 t1, t2; unsigned long i, x, y; int err; - static unsigned long sizes[] = {768/8, 1024/8, 1536/8, 2048/8, 3072/8, 4096/8, 6144/8, 8192/8, 100000}; + static unsigned long sizes[] = {768/8, 1024/8, 1536/8, 2048/8, +#ifndef TFM_DESC + 3072/8, 4096/8, 6144/8, 8192/8, +#endif + 100000 + }; for (x = sizes[i=0]; x < 100000; x = sizes[++i]) { t2 = 0; From bb42345234f994525367f890770efc2e7f694190 Mon Sep 17 00:00:00 2001 From: Steffen Jaeckel Date: Sat, 26 Aug 2017 12:07:24 +0200 Subject: [PATCH 3/3] fix missing registration of PRNG's in ltcrypt --- demos/ltcrypt.c | 1 + 1 file changed, 1 insertion(+) diff --git a/demos/ltcrypt.c b/demos/ltcrypt.c index 5425546..024c005 100644 --- a/demos/ltcrypt.c +++ b/demos/ltcrypt.c @@ -47,6 +47,7 @@ int main(int argc, char *argv[]) /* register algs, so they can be printed */ register_all_ciphers(); register_all_hashes(); + register_all_prngs(); if (argc < 4) { if ((argc > 2) && (!strcmp(argv[1], "-t"))) {