comparison libtomcrypt/tests/cipher_hash_test.c @ 1471:6dba84798cd5

Update to libtomcrypt 1.18.1, merged with Dropbear changes
author Matt Johnston <matt@ucc.asn.au>
date Fri, 09 Feb 2018 21:44:05 +0800
parents
children
comparison
equal deleted inserted replaced
1470:8bba51a55704 1471:6dba84798cd5
1 /* LibTomCrypt, modular cryptographic library -- Tom St Denis
2 *
3 * LibTomCrypt is a library that provides various cryptographic
4 * algorithms in a highly modular and flexible manner.
5 *
6 * The library is free for all purposes without any express
7 * guarantee it works.
8 */
9 /* test the ciphers and hashes using their built-in self-tests */
10
11 #include <tomcrypt_test.h>
12
13 int cipher_hash_test(void)
14 {
15 int x;
16
17 /* test ciphers */
18 for (x = 0; cipher_descriptor[x].name != NULL; x++) {
19 DOX(cipher_descriptor[x].test(), cipher_descriptor[x].name);
20 }
21
22 /* stream ciphers */
23 #ifdef LTC_CHACHA
24 DO(chacha_test());
25 #endif
26 #ifdef LTC_RC4_STREAM
27 DO(rc4_stream_test());
28 #endif
29 #ifdef LTC_SOBER128_STREAM
30 DO(sober128_stream_test());
31 #endif
32
33 /* test hashes */
34 for (x = 0; hash_descriptor[x].name != NULL; x++) {
35 DOX(hash_descriptor[x].test(), hash_descriptor[x].name);
36 }
37
38 /* SHAKE128 + SHAKE256 tests are a bit special */
39 DOX(sha3_shake_test(), "sha3_shake");
40
41 return 0;
42 }
43
44 /* ref: $Format:%D$ */
45 /* git commit: $Format:%H$ */
46 /* commit time: $Format:%ai$ */