diff options
Diffstat (limited to 'libtomcrypt/demos')
-rw-r--r-- | libtomcrypt/demos/encrypt.c | 40 | ||||
-rw-r--r-- | libtomcrypt/demos/hashsum.c | 32 | ||||
-rw-r--r-- | libtomcrypt/demos/multi.c | 10 | ||||
-rw-r--r-- | libtomcrypt/demos/small.c | 6 | ||||
-rw-r--r-- | libtomcrypt/demos/test.c | 6 | ||||
-rw-r--r-- | libtomcrypt/demos/timing.c | 6 | ||||
-rw-r--r-- | libtomcrypt/demos/tv_gen.c | 84 |
7 files changed, 92 insertions, 92 deletions
diff --git a/libtomcrypt/demos/encrypt.c b/libtomcrypt/demos/encrypt.c index f38440d..12b2346 100644 --- a/libtomcrypt/demos/encrypt.c +++ b/libtomcrypt/demos/encrypt.c @@ -26,58 +26,58 @@ void register_algs(void) { int x; -#ifdef RIJNDAEL +#ifdef LTC_RIJNDAEL register_cipher (&aes_desc); #endif -#ifdef BLOWFISH +#ifdef LTC_BLOWFISH register_cipher (&blowfish_desc); #endif -#ifdef XTEA +#ifdef LTC_XTEA register_cipher (&xtea_desc); #endif -#ifdef RC5 +#ifdef LTC_RC5 register_cipher (&rc5_desc); #endif -#ifdef RC6 +#ifdef LTC_RC6 register_cipher (&rc6_desc); #endif -#ifdef SAFERP +#ifdef LTC_SAFERP register_cipher (&saferp_desc); #endif -#ifdef TWOFISH +#ifdef LTC_TWOFISH register_cipher (&twofish_desc); #endif -#ifdef SAFER +#ifdef LTC_SAFER register_cipher (&safer_k64_desc); register_cipher (&safer_sk64_desc); register_cipher (&safer_k128_desc); register_cipher (&safer_sk128_desc); #endif -#ifdef RC2 +#ifdef LTC_RC2 register_cipher (&rc2_desc); #endif -#ifdef DES +#ifdef LTC_DES register_cipher (&des_desc); register_cipher (&des3_desc); #endif -#ifdef CAST5 +#ifdef LTC_CAST5 register_cipher (&cast5_desc); #endif -#ifdef NOEKEON +#ifdef LTC_NOEKEON register_cipher (&noekeon_desc); #endif -#ifdef SKIPJACK +#ifdef LTC_SKIPJACK register_cipher (&skipjack_desc); #endif -#ifdef KHAZAD +#ifdef LTC_KHAZAD register_cipher (&khazad_desc); #endif -#ifdef ANUBIS +#ifdef LTC_ANUBIS register_cipher (&anubis_desc); #endif if (register_hash(&sha256_desc) == -1) { - printf("Error registering SHA256\n"); + printf("Error registering LTC_SHA256\n"); exit(-1); } @@ -144,7 +144,7 @@ int main(int argc, char *argv[]) hash_idx = find_hash("sha256"); if (hash_idx == -1) { - printf("SHA256 not found...?\n"); + printf("LTC_SHA256 not found...?\n"); exit(-1); } @@ -236,6 +236,6 @@ int main(int argc, char *argv[]) return 0; } -/* $Source: /cvs/libtom/libtomcrypt/demos/encrypt.c,v $ */ -/* $Revision: 1.3 $ */ -/* $Date: 2005/08/04 20:43:50 $ */ +/* $Source$ */ +/* $Revision$ */ +/* $Date$ */ diff --git a/libtomcrypt/demos/hashsum.c b/libtomcrypt/demos/hashsum.c index 653b6ef..4e31501 100644 --- a/libtomcrypt/demos/hashsum.c +++ b/libtomcrypt/demos/hashsum.c @@ -68,43 +68,43 @@ void register_algs(void) { int err; -#ifdef TIGER +#ifdef LTC_TIGER register_hash (&tiger_desc); #endif -#ifdef MD2 +#ifdef LTC_MD2 register_hash (&md2_desc); #endif -#ifdef MD4 +#ifdef LTC_MD4 register_hash (&md4_desc); #endif -#ifdef MD5 +#ifdef LTC_MD5 register_hash (&md5_desc); #endif -#ifdef SHA1 +#ifdef LTC_SHA1 register_hash (&sha1_desc); #endif -#ifdef SHA224 +#ifdef LTC_SHA224 register_hash (&sha224_desc); #endif -#ifdef SHA256 +#ifdef LTC_SHA256 register_hash (&sha256_desc); #endif -#ifdef SHA384 +#ifdef LTC_SHA384 register_hash (&sha384_desc); #endif -#ifdef SHA512 +#ifdef LTC_SHA512 register_hash (&sha512_desc); #endif -#ifdef RIPEMD128 +#ifdef LTC_RIPEMD128 register_hash (&rmd128_desc); #endif -#ifdef RIPEMD160 +#ifdef LTC_RIPEMD160 register_hash (&rmd160_desc); #endif -#ifdef WHIRLPOOL +#ifdef LTC_WHIRLPOOL register_hash (&whirlpool_desc); #endif -#ifdef CHC_HASH +#ifdef LTC_CHC_HASH register_hash(&chc_desc); if ((err = chc_register(register_cipher(&aes_enc_desc))) != CRYPT_OK) { printf("chc_register error: %s\n", error_to_string(err)); @@ -114,6 +114,6 @@ void register_algs(void) } -/* $Source: /cvs/libtom/libtomcrypt/demos/hashsum.c,v $ */ -/* $Revision: 1.2 $ */ -/* $Date: 2005/05/05 14:35:56 $ */ +/* $Source$ */ +/* $Revision$ */ +/* $Date$ */ diff --git a/libtomcrypt/demos/multi.c b/libtomcrypt/demos/multi.c index 2520de9..82d543f 100644 --- a/libtomcrypt/demos/multi.c +++ b/libtomcrypt/demos/multi.c @@ -33,7 +33,7 @@ int main(void) return EXIT_FAILURE; } -/* HMAC */ +/* LTC_HMAC */ len = sizeof(buf[0]); hmac_memory(find_hash("sha256"), key, 16, (unsigned char*)"hello", 5, buf[0], &len); len2 = sizeof(buf[0]); @@ -55,7 +55,7 @@ int main(void) return EXIT_FAILURE; } -/* OMAC */ +/* LTC_OMAC */ len = sizeof(buf[0]); omac_memory(find_cipher("aes"), key, 16, (unsigned char*)"hello", 5, buf[0], &len); len2 = sizeof(buf[0]); @@ -105,6 +105,6 @@ int main(void) } -/* $Source: /cvs/libtom/libtomcrypt/demos/multi.c,v $ */ -/* $Revision: 1.3 $ */ -/* $Date: 2006/06/07 22:25:09 $ */ +/* $Source$ */ +/* $Revision$ */ +/* $Date$ */ diff --git a/libtomcrypt/demos/small.c b/libtomcrypt/demos/small.c index 3019745..8d43821 100644 --- a/libtomcrypt/demos/small.c +++ b/libtomcrypt/demos/small.c @@ -9,6 +9,6 @@ int main(void) return 0; } -/* $Source: /cvs/libtom/libtomcrypt/demos/small.c,v $ */ -/* $Revision: 1.3 $ */ -/* $Date: 2006/06/07 22:25:09 $ */ +/* $Source$ */ +/* $Revision$ */ +/* $Date$ */ diff --git a/libtomcrypt/demos/test.c b/libtomcrypt/demos/test.c index 16a2110..54de890 100644 --- a/libtomcrypt/demos/test.c +++ b/libtomcrypt/demos/test.c @@ -31,6 +31,6 @@ int main(void) return EXIT_SUCCESS; } -/* $Source: /cvs/libtom/libtomcrypt/demos/test.c,v $ */ -/* $Revision: 1.28 $ */ -/* $Date: 2006/05/25 10:50:08 $ */ +/* $Source$ */ +/* $Revision$ */ +/* $Date$ */ diff --git a/libtomcrypt/demos/timing.c b/libtomcrypt/demos/timing.c index becc7c0..76fd8cd 100644 --- a/libtomcrypt/demos/timing.c +++ b/libtomcrypt/demos/timing.c @@ -37,6 +37,6 @@ return EXIT_SUCCESS; } -/* $Source: /cvs/libtom/libtomcrypt/demos/timing.c,v $ */ -/* $Revision: 1.61 $ */ -/* $Date: 2006/12/03 03:08:35 $ */ +/* $Source$ */ +/* $Revision$ */ +/* $Date$ */ diff --git a/libtomcrypt/demos/tv_gen.c b/libtomcrypt/demos/tv_gen.c index 97c61a8..4518ebd 100644 --- a/libtomcrypt/demos/tv_gen.c +++ b/libtomcrypt/demos/tv_gen.c @@ -4,93 +4,93 @@ void reg_algs(void) { int err; -#ifdef RIJNDAEL +#ifdef LTC_RIJNDAEL register_cipher (&aes_desc); #endif -#ifdef BLOWFISH +#ifdef LTC_BLOWFISH register_cipher (&blowfish_desc); #endif -#ifdef XTEA +#ifdef LTC_XTEA register_cipher (&xtea_desc); #endif -#ifdef RC5 +#ifdef LTC_RC5 register_cipher (&rc5_desc); #endif -#ifdef RC6 +#ifdef LTC_RC6 register_cipher (&rc6_desc); #endif -#ifdef SAFERP +#ifdef LTC_SAFERP register_cipher (&saferp_desc); #endif -#ifdef TWOFISH +#ifdef LTC_TWOFISH register_cipher (&twofish_desc); #endif -#ifdef SAFER +#ifdef LTC_SAFER register_cipher (&safer_k64_desc); register_cipher (&safer_sk64_desc); register_cipher (&safer_k128_desc); register_cipher (&safer_sk128_desc); #endif -#ifdef RC2 +#ifdef LTC_RC2 register_cipher (&rc2_desc); #endif -#ifdef DES +#ifdef LTC_DES register_cipher (&des_desc); register_cipher (&des3_desc); #endif -#ifdef CAST5 +#ifdef LTC_CAST5 register_cipher (&cast5_desc); #endif -#ifdef NOEKEON +#ifdef LTC_NOEKEON register_cipher (&noekeon_desc); #endif -#ifdef SKIPJACK +#ifdef LTC_SKIPJACK register_cipher (&skipjack_desc); #endif -#ifdef ANUBIS +#ifdef LTC_ANUBIS register_cipher (&anubis_desc); #endif -#ifdef KHAZAD +#ifdef LTC_KHAZAD register_cipher (&khazad_desc); #endif -#ifdef TIGER +#ifdef LTC_TIGER register_hash (&tiger_desc); #endif -#ifdef MD2 +#ifdef LTC_MD2 register_hash (&md2_desc); #endif -#ifdef MD4 +#ifdef LTC_MD4 register_hash (&md4_desc); #endif -#ifdef MD5 +#ifdef LTC_MD5 register_hash (&md5_desc); #endif -#ifdef SHA1 +#ifdef LTC_SHA1 register_hash (&sha1_desc); #endif -#ifdef SHA224 +#ifdef LTC_SHA224 register_hash (&sha224_desc); #endif -#ifdef SHA256 +#ifdef LTC_SHA256 register_hash (&sha256_desc); #endif -#ifdef SHA384 +#ifdef LTC_SHA384 register_hash (&sha384_desc); #endif -#ifdef SHA512 +#ifdef LTC_SHA512 register_hash (&sha512_desc); #endif -#ifdef RIPEMD128 +#ifdef LTC_RIPEMD128 register_hash (&rmd128_desc); #endif -#ifdef RIPEMD160 +#ifdef LTC_RIPEMD160 register_hash (&rmd160_desc); #endif -#ifdef WHIRLPOOL +#ifdef LTC_WHIRLPOOL register_hash (&whirlpool_desc); #endif -#ifdef CHC_HASH +#ifdef LTC_CHC_HASH register_hash(&chc_desc); if ((err = chc_register(register_cipher(&aes_desc))) != CRYPT_OK) { printf("chc_register error: %s\n", error_to_string(err)); @@ -238,12 +238,12 @@ void hmac_gen(void) out = fopen("hmac_tv.txt", "w"); fprintf(out, -"HMAC Tests. In these tests messages of N bytes long (00,01,02,...,NN-1) are HMACed. The initial key is\n" -"of the same format (the same length as the HASH output size). The HMAC key in step N+1 is the HMAC output of\n" +"LTC_HMAC Tests. In these tests messages of N bytes long (00,01,02,...,NN-1) are LTC_HMACed. The initial key is\n" +"of the same format (the same length as the HASH output size). The LTC_HMAC key in step N+1 is the LTC_HMAC output of\n" "step N.\n\n"); for (x = 0; hash_descriptor[x].name != NULL; x++) { - fprintf(out, "HMAC-%s\n", hash_descriptor[x].name); + fprintf(out, "LTC_HMAC-%s\n", hash_descriptor[x].name); /* initial key */ for (y = 0; y < (int)hash_descriptor[x].hashsize; y++) { @@ -290,8 +290,8 @@ void omac_gen(void) out = fopen("omac_tv.txt", "w"); fprintf(out, -"OMAC Tests. In these tests messages of N bytes long (00,01,02,...,NN-1) are OMAC'ed. The initial key is\n" -"of the same format (length specified per cipher). The OMAC key in step N+1 is the OMAC output of\n" +"LTC_OMAC Tests. In these tests messages of N bytes long (00,01,02,...,NN-1) are LTC_OMAC'ed. The initial key is\n" +"of the same format (length specified per cipher). The LTC_OMAC key in step N+1 is the LTC_OMAC output of\n" "step N (repeated as required to fill the array).\n\n"); for (x = 0; cipher_descriptor[x].name != NULL; x++) { @@ -303,7 +303,7 @@ void omac_gen(void) if (cipher_descriptor[x].keysize(&kl) != CRYPT_OK) { kl = cipher_descriptor[x].max_key_length; } - fprintf(out, "OMAC-%s (%d byte key)\n", cipher_descriptor[x].name, kl); + fprintf(out, "LTC_OMAC-%s (%d byte key)\n", cipher_descriptor[x].name, kl); /* initial key/block */ for (y = 0; y < kl; y++) { @@ -345,8 +345,8 @@ void pmac_gen(void) out = fopen("pmac_tv.txt", "w"); fprintf(out, -"PMAC Tests. In these tests messages of N bytes long (00,01,02,...,NN-1) are OMAC'ed. The initial key is\n" -"of the same format (length specified per cipher). The OMAC key in step N+1 is the OMAC output of\n" +"PMAC Tests. In these tests messages of N bytes long (00,01,02,...,NN-1) are LTC_OMAC'ed. The initial key is\n" +"of the same format (length specified per cipher). The LTC_OMAC key in step N+1 is the LTC_OMAC output of\n" "step N (repeated as required to fill the array).\n\n"); for (x = 0; cipher_descriptor[x].name != NULL; x++) { @@ -767,20 +767,20 @@ int main(void) reg_algs(); printf("Generating hash vectors..."); fflush(stdout); hash_gen(); printf("done\n"); printf("Generating cipher vectors..."); fflush(stdout); cipher_gen(); printf("done\n"); - printf("Generating HMAC vectors..."); fflush(stdout); hmac_gen(); printf("done\n"); - printf("Generating OMAC vectors..."); fflush(stdout); omac_gen(); printf("done\n"); + printf("Generating LTC_HMAC vectors..."); fflush(stdout); hmac_gen(); printf("done\n"); + printf("Generating LTC_OMAC vectors..."); fflush(stdout); omac_gen(); printf("done\n"); printf("Generating PMAC vectors..."); fflush(stdout); pmac_gen(); printf("done\n"); printf("Generating EAX vectors..."); fflush(stdout); eax_gen(); printf("done\n"); printf("Generating OCB vectors..."); fflush(stdout); ocb_gen(); printf("done\n"); printf("Generating CCM vectors..."); fflush(stdout); ccm_gen(); printf("done\n"); printf("Generating GCM vectors..."); fflush(stdout); gcm_gen(); printf("done\n"); - printf("Generating BASE64 vectors..."); fflush(stdout); base64_gen(); printf("done\n"); + printf("Generating LTC_BASE64 vectors..."); fflush(stdout); base64_gen(); printf("done\n"); printf("Generating MATH vectors..."); fflush(stdout); math_gen(); printf("done\n"); printf("Generating ECC vectors..."); fflush(stdout); ecc_gen(); printf("done\n"); printf("Generating LRW vectors..."); fflush(stdout); lrw_gen(); printf("done\n"); return 0; } -/* $Source: /cvs/libtom/libtomcrypt/demos/tv_gen.c,v $ */ -/* $Revision: 1.15 $ */ -/* $Date: 2006/06/09 22:10:27 $ */ +/* $Source$ */ +/* $Revision$ */ +/* $Date$ */ |