summaryrefslogtreecommitdiffhomepage
path: root/libtomcrypt/src/modes/lrw/lrw_test.c
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2018-02-09 21:44:05 +0800
committerMatt Johnston <matt@ucc.asn.au>2018-02-09 21:44:05 +0800
commit4f2eb1914bdac3ed3ee504ad86061281dbe0d074 (patch)
tree078293375c3f3ee2d485cf9559a08d65d460786a /libtomcrypt/src/modes/lrw/lrw_test.c
parentd72f50ff3284e15124a0f233c26339229fe305ac (diff)
Update to libtomcrypt 1.18.1, merged with Dropbear changes
Diffstat (limited to 'libtomcrypt/src/modes/lrw/lrw_test.c')
-rw-r--r--libtomcrypt/src/modes/lrw/lrw_test.c20
1 files changed, 9 insertions, 11 deletions
diff --git a/libtomcrypt/src/modes/lrw/lrw_test.c b/libtomcrypt/src/modes/lrw/lrw_test.c
index 63e014a..7762d47 100644
--- a/libtomcrypt/src/modes/lrw/lrw_test.c
+++ b/libtomcrypt/src/modes/lrw/lrw_test.c
@@ -5,8 +5,6 @@
*
* The library is free for all purposes without any express
* guarantee it works.
- *
- * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
#include "tomcrypt.h"
@@ -88,7 +86,7 @@ int lrw_test(void)
}
/* check pad against expected tweak */
- if (XMEMCMP(tests[x].expected_tweak, lrw.pad, 16)) {
+ if (compare_testvector(tests[x].expected_tweak, 16, lrw.pad, 16, "LRW Tweak", x)) {
lrw_done(&lrw);
return CRYPT_FAIL_TESTVECTOR;
}
@@ -99,13 +97,13 @@ int lrw_test(void)
return err;
}
- if (XMEMCMP(buf[0], tests[x].C, 16)) {
+ if (compare_testvector(buf[0], 16, tests[x].C, 16, "LRW Encrypt", x)) {
lrw_done(&lrw);
return CRYPT_FAIL_TESTVECTOR;
}
/* process block */
- if ((err = lrw_setiv(tests[x].IV, 16, &lrw)) != CRYPT_OK) {
+ if ((err = lrw_setiv(tests[x].IV, 16, &lrw)) != CRYPT_OK) {
lrw_done(&lrw);
return err;
}
@@ -115,15 +113,15 @@ int lrw_test(void)
return err;
}
- if (XMEMCMP(buf[1], tests[x].P, 16)) {
+ if (compare_testvector(buf[1], 16, tests[x].P, 16, "LRW Decrypt", x)) {
lrw_done(&lrw);
return CRYPT_FAIL_TESTVECTOR;
}
if ((err = lrw_done(&lrw)) != CRYPT_OK) {
return err;
}
- }
- return CRYPT_OK;
+ }
+ return CRYPT_OK;
#endif
}
@@ -131,6 +129,6 @@ int lrw_test(void)
-/* $Source$ */
-/* $Revision$ */
-/* $Date$ */
+/* ref: $Format:%D$ */
+/* git commit: $Format:%H$ */
+/* commit time: $Format:%ai$ */