diff options
Diffstat (limited to 'libtomcrypt/src/misc/crypt')
24 files changed, 248 insertions, 92 deletions
diff --git a/libtomcrypt/src/misc/crypt/crypt.c b/libtomcrypt/src/misc/crypt/crypt.c index eb75b8d..8603943 100644 --- a/libtomcrypt/src/misc/crypt/crypt.c +++ b/libtomcrypt/src/misc/crypt/crypt.c @@ -6,7 +6,7 @@ * The library is free for all purposes without any express * guarantee it works. * - * Tom St Denis, tomstdenis@gmail.com, http://libtomcrypt.org + * Tom St Denis, tomstdenis@gmail.com, http://libtomcrypt.com */ #include "tomcrypt.h" @@ -111,6 +111,12 @@ const char *crypt_build_settings = " (tweaked)" #endif "\n" +#if defined(KSEED) + " KSEED\n" +#endif +#if defined(LTC_KASUMI) + " KASUMI\n" +#endif "\nHashes built-in:\n" #if defined(SHA512) @@ -154,35 +160,55 @@ const char *crypt_build_settings = #endif "\nBlock Chaining Modes:\n" -#if defined(CFB) +#if defined(LTC_CFB_MODE) " CFB\n" #endif -#if defined(OFB) +#if defined(LTC_OFB_MODE) " OFB\n" #endif -#if defined(ECB) +#if defined(LTC_ECB_MODE) " ECB\n" #endif -#if defined(CBC) +#if defined(LTC_CBC_MODE) " CBC\n" #endif -#if defined(CTR) - " CTR\n" +#if defined(LTC_CTR_MODE) + " CTR " +#endif +#if defined(LTC_CTR_OLD) + " (CTR_OLD) " +#endif + "\n" +#if defined(LRW_MODE) + " LRW_MODE" +#if defined(LRW_TABLES) + " (LRW_TABLES) " #endif + "\n" +#endif +#if defined(LTC_F8_MODE) + " F8 MODE\n" +#endif "\nMACs:\n" -#if defined(HMAC) +#if defined(LTC_HMAC) " HMAC\n" #endif -#if defined(OMAC) +#if defined(LTC_OMAC) " OMAC\n" #endif -#if defined(PMAC) +#if defined(LTC_PMAC) " PMAC\n" #endif #if defined(PELICAN) " PELICAN\n" #endif +#if defined(LTC_XCBC) + " XCBC-MAC\n" +#endif +#if defined(LTC_F9_MODE) + " F9-MAC\n" +#endif "\nENC + AUTH modes:\n" #if defined(EAX_MODE) @@ -202,7 +228,6 @@ const char *crypt_build_settings = #endif "\n" - "\nPRNG:\n" #if defined(YARROW) " Yarrow\n" @@ -224,24 +249,24 @@ const char *crypt_build_settings = #if defined(MRSA) " RSA \n" #endif -#if defined(MDH) - " DH\n" -#endif #if defined(MECC) " ECC\n" #endif #if defined(MDSA) " DSA\n" #endif +#if defined(MKAT) + " Katja\n" +#endif "\nCompiler:\n" #if defined(WIN32) " WIN32 platform detected.\n" #endif -#if defined(LBL_CYGWIN__) +#if defined(__CYGWIN__) " CYGWIN Detected.\n" #endif -#if defined(LBL_DJGPP__) +#if defined(__DJGPP__) " DJGPP Detected.\n" #endif #if defined(_MSC_VER) @@ -253,9 +278,12 @@ const char *crypt_build_settings = #if defined(INTEL_CC) " Intel C Compiler detected.\n" #endif -#if defined(LBL_x86_64__) +#if defined(__x86_64__) " x86-64 detected.\n" #endif +#if defined(LTC_PPC32) + " LTC_PPC32 defined \n" +#endif "\nVarious others: " #if defined(BASE64) @@ -306,6 +334,27 @@ const char *crypt_build_settings = #if defined(LTC_PTHREAD) " LTC_PTHREAD " #endif +#if defined(LTM_DESC) + " LTM_DESC " +#endif +#if defined(TFM_DESC) + " TFM_DESC " +#endif +#if defined(MECC_ACCEL) + " MECC_ACCEL " +#endif +#if defined(GMP_DESC) + " GMP_DESC " +#endif +#if defined(LTC_EASY) + " (easy) " +#endif +#if defined(MECC_FP) + " MECC_FP " +#endif +#if defined(LTC_ECC_SHAMIR) + " LTC_ECC_SHAMIR " +#endif "\n" "\n\n\n" ; @@ -313,5 +362,5 @@ const char *crypt_build_settings = /* $Source: /cvs/libtom/libtomcrypt/src/misc/crypt/crypt.c,v $ */ -/* $Revision: 1.11 $ */ -/* $Date: 2005/06/19 18:00:28 $ */ +/* $Revision: 1.27 $ */ +/* $Date: 2006/12/03 03:50:45 $ */ diff --git a/libtomcrypt/src/misc/crypt/crypt_argchk.c b/libtomcrypt/src/misc/crypt/crypt_argchk.c index 699c6cf..c6675ef 100644 --- a/libtomcrypt/src/misc/crypt/crypt_argchk.c +++ b/libtomcrypt/src/misc/crypt/crypt_argchk.c @@ -6,7 +6,7 @@ * The library is free for all purposes without any express * guarantee it works. * - * Tom St Denis, tomstdenis@gmail.com, http://libtomcrypt.org + * Tom St Denis, tomstdenis@gmail.com, http://libtomcrypt.com */ #include "tomcrypt.h" #include <signal.h> @@ -26,5 +26,5 @@ void crypt_argchk(char *v, char *s, int d) #endif /* $Source: /cvs/libtom/libtomcrypt/src/misc/crypt/crypt_argchk.c,v $ */ -/* $Revision: 1.3 $ */ -/* $Date: 2005/05/05 14:35:59 $ */ +/* $Revision: 1.4 $ */ +/* $Date: 2006/03/31 14:15:35 $ */ diff --git a/libtomcrypt/src/misc/crypt/crypt_cipher_descriptor.c b/libtomcrypt/src/misc/crypt/crypt_cipher_descriptor.c index 127e85c..880c149 100644 --- a/libtomcrypt/src/misc/crypt/crypt_cipher_descriptor.c +++ b/libtomcrypt/src/misc/crypt/crypt_cipher_descriptor.c @@ -6,7 +6,7 @@ * The library is free for all purposes without any express * guarantee it works. * - * Tom St Denis, tomstdenis@gmail.com, http://libtomcrypt.org + * Tom St Denis, tomstdenis@gmail.com, http://libtomcrypt.com */ #include "tomcrypt.h" @@ -16,12 +16,12 @@ */ struct ltc_cipher_descriptor cipher_descriptor[TAB_SIZE] = { -{ NULL, 0, 0, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL } +{ NULL, 0, 0, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL } }; -LTC_MUTEX_GLOBAL(ltc_cipher_mutex); +LTC_MUTEX_GLOBAL(ltc_cipher_mutex) /* $Source: /cvs/libtom/libtomcrypt/src/misc/crypt/crypt_cipher_descriptor.c,v $ */ -/* $Revision: 1.8 $ */ -/* $Date: 2005/06/19 18:00:28 $ */ +/* $Revision: 1.12 $ */ +/* $Date: 2006/11/08 23:01:06 $ */ diff --git a/libtomcrypt/src/misc/crypt/crypt_cipher_is_valid.c b/libtomcrypt/src/misc/crypt/crypt_cipher_is_valid.c index 7830303..0f8202b 100644 --- a/libtomcrypt/src/misc/crypt/crypt_cipher_is_valid.c +++ b/libtomcrypt/src/misc/crypt/crypt_cipher_is_valid.c @@ -6,7 +6,7 @@ * The library is free for all purposes without any express * guarantee it works. * - * Tom St Denis, tomstdenis@gmail.com, http://libtomcrypt.org + * Tom St Denis, tomstdenis@gmail.com, http://libtomcrypt.com */ #include "tomcrypt.h" @@ -32,5 +32,5 @@ int cipher_is_valid(int idx) } /* $Source: /cvs/libtom/libtomcrypt/src/misc/crypt/crypt_cipher_is_valid.c,v $ */ -/* $Revision: 1.4 $ */ -/* $Date: 2005/06/19 18:00:28 $ */ +/* $Revision: 1.5 $ */ +/* $Date: 2006/03/31 14:15:35 $ */ diff --git a/libtomcrypt/src/misc/crypt/crypt_find_cipher.c b/libtomcrypt/src/misc/crypt/crypt_find_cipher.c index e7fba73..27c59eb 100644 --- a/libtomcrypt/src/misc/crypt/crypt_find_cipher.c +++ b/libtomcrypt/src/misc/crypt/crypt_find_cipher.c @@ -6,7 +6,7 @@ * The library is free for all purposes without any express * guarantee it works. * - * Tom St Denis, tomstdenis@gmail.com, http://libtomcrypt.org + * Tom St Denis, tomstdenis@gmail.com, http://libtomcrypt.com */ #include "tomcrypt.h" @@ -26,7 +26,7 @@ int find_cipher(const char *name) LTC_ARGCHK(name != NULL); LTC_MUTEX_LOCK(<c_cipher_mutex); for (x = 0; x < TAB_SIZE; x++) { - if (cipher_descriptor[x].name != NULL && !strcmp(cipher_descriptor[x].name, name)) { + if (cipher_descriptor[x].name != NULL && !XSTRCMP(cipher_descriptor[x].name, name)) { LTC_MUTEX_UNLOCK(<c_cipher_mutex); return x; } @@ -37,5 +37,5 @@ int find_cipher(const char *name) /* $Source: /cvs/libtom/libtomcrypt/src/misc/crypt/crypt_find_cipher.c,v $ */ -/* $Revision: 1.4 $ */ -/* $Date: 2005/06/19 18:00:28 $ */ +/* $Revision: 1.6 $ */ +/* $Date: 2006/11/29 23:43:57 $ */ diff --git a/libtomcrypt/src/misc/crypt/crypt_find_cipher_any.c b/libtomcrypt/src/misc/crypt/crypt_find_cipher_any.c index 6dd0e6d..393eded 100644 --- a/libtomcrypt/src/misc/crypt/crypt_find_cipher_any.c +++ b/libtomcrypt/src/misc/crypt/crypt_find_cipher_any.c @@ -6,7 +6,7 @@ * The library is free for all purposes without any express * guarantee it works. * - * Tom St Denis, tomstdenis@gmail.com, http://libtomcrypt.org + * Tom St Denis, tomstdenis@gmail.com, http://libtomcrypt.com */ #include "tomcrypt.h" @@ -46,5 +46,5 @@ int find_cipher_any(const char *name, int blocklen, int keylen) } /* $Source: /cvs/libtom/libtomcrypt/src/misc/crypt/crypt_find_cipher_any.c,v $ */ -/* $Revision: 1.4 $ */ -/* $Date: 2005/06/19 18:00:28 $ */ +/* $Revision: 1.5 $ */ +/* $Date: 2006/03/31 14:15:35 $ */ diff --git a/libtomcrypt/src/misc/crypt/crypt_find_cipher_id.c b/libtomcrypt/src/misc/crypt/crypt_find_cipher_id.c index 5f5f874..8de73c6 100644 --- a/libtomcrypt/src/misc/crypt/crypt_find_cipher_id.c +++ b/libtomcrypt/src/misc/crypt/crypt_find_cipher_id.c @@ -6,7 +6,7 @@ * The library is free for all purposes without any express * guarantee it works. * - * Tom St Denis, tomstdenis@gmail.com, http://libtomcrypt.org + * Tom St Denis, tomstdenis@gmail.com, http://libtomcrypt.com */ #include "tomcrypt.h" @@ -36,5 +36,5 @@ int find_cipher_id(unsigned char ID) } /* $Source: /cvs/libtom/libtomcrypt/src/misc/crypt/crypt_find_cipher_id.c,v $ */ -/* $Revision: 1.4 $ */ -/* $Date: 2005/06/19 18:00:28 $ */ +/* $Revision: 1.5 $ */ +/* $Date: 2006/03/31 14:15:35 $ */ diff --git a/libtomcrypt/src/misc/crypt/crypt_find_hash.c b/libtomcrypt/src/misc/crypt/crypt_find_hash.c index d02a449..cd60413 100644 --- a/libtomcrypt/src/misc/crypt/crypt_find_hash.c +++ b/libtomcrypt/src/misc/crypt/crypt_find_hash.c @@ -6,7 +6,7 @@ * The library is free for all purposes without any express * guarantee it works. * - * Tom St Denis, tomstdenis@gmail.com, http://libtomcrypt.org + * Tom St Denis, tomstdenis@gmail.com, http://libtomcrypt.com */ #include "tomcrypt.h" @@ -26,7 +26,7 @@ int find_hash(const char *name) LTC_ARGCHK(name != NULL); LTC_MUTEX_LOCK(<c_hash_mutex); for (x = 0; x < TAB_SIZE; x++) { - if (hash_descriptor[x].name != NULL && strcmp(hash_descriptor[x].name, name) == 0) { + if (hash_descriptor[x].name != NULL && XSTRCMP(hash_descriptor[x].name, name) == 0) { LTC_MUTEX_UNLOCK(<c_hash_mutex); return x; } @@ -36,5 +36,5 @@ int find_hash(const char *name) } /* $Source: /cvs/libtom/libtomcrypt/src/misc/crypt/crypt_find_hash.c,v $ */ -/* $Revision: 1.4 $ */ -/* $Date: 2005/06/19 18:00:28 $ */ +/* $Revision: 1.6 $ */ +/* $Date: 2006/11/29 23:43:57 $ */ diff --git a/libtomcrypt/src/misc/crypt/crypt_find_hash_any.c b/libtomcrypt/src/misc/crypt/crypt_find_hash_any.c index 1172f22..b2cfccd 100644 --- a/libtomcrypt/src/misc/crypt/crypt_find_hash_any.c +++ b/libtomcrypt/src/misc/crypt/crypt_find_hash_any.c @@ -6,7 +6,7 @@ * The library is free for all purposes without any express * guarantee it works. * - * Tom St Denis, tomstdenis@gmail.com, http://libtomcrypt.org + * Tom St Denis, tomstdenis@gmail.com, http://libtomcrypt.com */ #include "tomcrypt.h" @@ -45,5 +45,5 @@ } /* $Source: /cvs/libtom/libtomcrypt/src/misc/crypt/crypt_find_hash_any.c,v $ */ -/* $Revision: 1.4 $ */ -/* $Date: 2005/06/19 18:00:28 $ */ +/* $Revision: 1.5 $ */ +/* $Date: 2006/03/31 14:15:35 $ */ diff --git a/libtomcrypt/src/misc/crypt/crypt_find_hash_id.c b/libtomcrypt/src/misc/crypt/crypt_find_hash_id.c index 8cd0d38..e59ca00 100644 --- a/libtomcrypt/src/misc/crypt/crypt_find_hash_id.c +++ b/libtomcrypt/src/misc/crypt/crypt_find_hash_id.c @@ -6,7 +6,7 @@ * The library is free for all purposes without any express * guarantee it works. * - * Tom St Denis, tomstdenis@gmail.com, http://libtomcrypt.org + * Tom St Denis, tomstdenis@gmail.com, http://libtomcrypt.com */ #include "tomcrypt.h" @@ -36,5 +36,5 @@ int find_hash_id(unsigned char ID) } /* $Source: /cvs/libtom/libtomcrypt/src/misc/crypt/crypt_find_hash_id.c,v $ */ -/* $Revision: 1.5 $ */ -/* $Date: 2005/06/19 18:03:25 $ */ +/* $Revision: 1.6 $ */ +/* $Date: 2006/03/31 14:15:35 $ */ diff --git a/libtomcrypt/src/misc/crypt/crypt_find_hash_oid.c b/libtomcrypt/src/misc/crypt/crypt_find_hash_oid.c new file mode 100644 index 0000000..d04f80c --- /dev/null +++ b/libtomcrypt/src/misc/crypt/crypt_find_hash_oid.c @@ -0,0 +1,35 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + * + * Tom St Denis, tomstdenis@gmail.com, http://libtomcrypt.com + */ +#include "tomcrypt.h" + +/** + @file crypt_find_hash_oid.c + Find a hash, Tom St Denis +*/ + +int find_hash_oid(const unsigned long *ID, unsigned long IDlen) +{ + int x; + LTC_ARGCHK(ID != NULL); + LTC_MUTEX_LOCK(<c_hash_mutex); + for (x = 0; x < TAB_SIZE; x++) { + if (hash_descriptor[x].name != NULL && hash_descriptor[x].OIDlen == IDlen && !XMEMCMP(hash_descriptor[x].OID, ID, sizeof(unsigned long) * IDlen)) { + LTC_MUTEX_UNLOCK(<c_hash_mutex); + return x; + } + } + LTC_MUTEX_UNLOCK(<c_hash_mutex); + return -1; +} + +/* $Source: /cvs/libtom/libtomcrypt/src/misc/crypt/crypt_find_hash_oid.c,v $ */ +/* $Revision: 1.4 $ */ +/* $Date: 2006/11/01 09:28:17 $ */ diff --git a/libtomcrypt/src/misc/crypt/crypt_find_prng.c b/libtomcrypt/src/misc/crypt/crypt_find_prng.c index 503813d..4b3bc5a 100644 --- a/libtomcrypt/src/misc/crypt/crypt_find_prng.c +++ b/libtomcrypt/src/misc/crypt/crypt_find_prng.c @@ -6,7 +6,7 @@ * The library is free for all purposes without any express * guarantee it works. * - * Tom St Denis, tomstdenis@gmail.com, http://libtomcrypt.org + * Tom St Denis, tomstdenis@gmail.com, http://libtomcrypt.com */ #include "tomcrypt.h" @@ -26,7 +26,7 @@ int find_prng(const char *name) LTC_ARGCHK(name != NULL); LTC_MUTEX_LOCK(<c_prng_mutex); for (x = 0; x < TAB_SIZE; x++) { - if ((prng_descriptor[x].name != NULL) && strcmp(prng_descriptor[x].name, name) == 0) { + if ((prng_descriptor[x].name != NULL) && XSTRCMP(prng_descriptor[x].name, name) == 0) { LTC_MUTEX_UNLOCK(<c_prng_mutex); return x; } @@ -37,5 +37,5 @@ int find_prng(const char *name) /* $Source: /cvs/libtom/libtomcrypt/src/misc/crypt/crypt_find_prng.c,v $ */ -/* $Revision: 1.4 $ */ -/* $Date: 2005/06/19 18:00:28 $ */ +/* $Revision: 1.6 $ */ +/* $Date: 2006/11/29 23:43:57 $ */ diff --git a/libtomcrypt/src/misc/crypt/crypt_fsa.c b/libtomcrypt/src/misc/crypt/crypt_fsa.c new file mode 100644 index 0000000..a9569b7 --- /dev/null +++ b/libtomcrypt/src/misc/crypt/crypt_fsa.c @@ -0,0 +1,59 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + * + * Tom St Denis, tomstdenis@gmail.com, http://libtomcrypt.com + */ +#include "tomcrypt.h" +#include <stdarg.h> + +/** + @file crypt_fsa.c + LibTomCrypt FULL SPEED AHEAD!, Tom St Denis +*/ + +/* format is ltc_mp, cipher_desc, [cipher_desc], NULL, hash_desc, [hash_desc], NULL, prng_desc, [prng_desc], NULL */ +int crypt_fsa(void *mp, ...) +{ + int err; + va_list args; + void *p; + + va_start(args, mp); + if (mp != NULL) { + XMEMCPY(<c_mp, mp, sizeof(ltc_mp)); + } + + while ((p = va_arg(args, void*)) != NULL) { + if ((err = register_cipher(p)) != CRYPT_OK) { + va_end(args); + return err; + } + } + + while ((p = va_arg(args, void*)) != NULL) { + if ((err = register_hash(p)) != CRYPT_OK) { + va_end(args); + return err; + } + } + + while ((p = va_arg(args, void*)) != NULL) { + if ((err = register_prng(p)) != CRYPT_OK) { + va_end(args); + return err; + } + } + + va_end(args); + return CRYPT_OK; +} + + +/* $Source: /cvs/libtom/libtomcrypt/src/misc/crypt/crypt_fsa.c,v $ */ +/* $Revision: 1.4 $ */ +/* $Date: 2006/11/13 23:14:33 $ */ diff --git a/libtomcrypt/src/misc/crypt/crypt_hash_descriptor.c b/libtomcrypt/src/misc/crypt/crypt_hash_descriptor.c index f8583d8..5fa59f1 100644 --- a/libtomcrypt/src/misc/crypt/crypt_hash_descriptor.c +++ b/libtomcrypt/src/misc/crypt/crypt_hash_descriptor.c @@ -6,7 +6,7 @@ * The library is free for all purposes without any express * guarantee it works. * - * Tom St Denis, tomstdenis@gmail.com, http://libtomcrypt.org + * Tom St Denis, tomstdenis@gmail.com, http://libtomcrypt.com */ #include "tomcrypt.h" @@ -16,12 +16,12 @@ */ struct ltc_hash_descriptor hash_descriptor[TAB_SIZE] = { -{ NULL, 0, 0, 0, { 0 }, 0, NULL, NULL, NULL, NULL } +{ NULL, 0, 0, 0, { 0 }, 0, NULL, NULL, NULL, NULL, NULL } }; -LTC_MUTEX_GLOBAL(ltc_hash_mutex); +LTC_MUTEX_GLOBAL(ltc_hash_mutex) /* $Source: /cvs/libtom/libtomcrypt/src/misc/crypt/crypt_hash_descriptor.c,v $ */ -/* $Revision: 1.6 $ */ -/* $Date: 2005/06/19 18:00:28 $ */ +/* $Revision: 1.9 $ */ +/* $Date: 2006/03/31 14:15:35 $ */ diff --git a/libtomcrypt/src/misc/crypt/crypt_hash_is_valid.c b/libtomcrypt/src/misc/crypt/crypt_hash_is_valid.c index a8130d4..54a91eb 100644 --- a/libtomcrypt/src/misc/crypt/crypt_hash_is_valid.c +++ b/libtomcrypt/src/misc/crypt/crypt_hash_is_valid.c @@ -6,7 +6,7 @@ * The library is free for all purposes without any express * guarantee it works. * - * Tom St Denis, tomstdenis@gmail.com, http://libtomcrypt.org + * Tom St Denis, tomstdenis@gmail.com, http://libtomcrypt.com */ #include "tomcrypt.h" @@ -32,5 +32,5 @@ int hash_is_valid(int idx) } /* $Source: /cvs/libtom/libtomcrypt/src/misc/crypt/crypt_hash_is_valid.c,v $ */ -/* $Revision: 1.4 $ */ -/* $Date: 2005/06/19 18:00:28 $ */ +/* $Revision: 1.5 $ */ +/* $Date: 2006/03/31 14:15:35 $ */ diff --git a/libtomcrypt/src/misc/crypt/crypt_ltc_mp_descriptor.c b/libtomcrypt/src/misc/crypt/crypt_ltc_mp_descriptor.c new file mode 100644 index 0000000..907862f --- /dev/null +++ b/libtomcrypt/src/misc/crypt/crypt_ltc_mp_descriptor.c @@ -0,0 +1,13 @@ +/* LibTomCrypt, modular cryptographic library -- Tom St Denis + * + * LibTomCrypt is a library that provides various cryptographic + * algorithms in a highly modular and flexible manner. + * + * The library is free for all purposes without any express + * guarantee it works. + * + * Tom St Denis, tomstdenis@gmail.com, http://libtomcrypt.com + */ +#include "tomcrypt.h" + +ltc_math_descriptor ltc_mp; diff --git a/libtomcrypt/src/misc/crypt/crypt_prng_descriptor.c b/libtomcrypt/src/misc/crypt/crypt_prng_descriptor.c index 7335f5d..a2b5f0e 100644 --- a/libtomcrypt/src/misc/crypt/crypt_prng_descriptor.c +++ b/libtomcrypt/src/misc/crypt/crypt_prng_descriptor.c @@ -6,7 +6,7 @@ * The library is free for all purposes without any express * guarantee it works. * - * Tom St Denis, tomstdenis@gmail.com, http://libtomcrypt.org + * Tom St Denis, tomstdenis@gmail.com, http://libtomcrypt.com */ #include "tomcrypt.h" @@ -18,9 +18,9 @@ struct ltc_prng_descriptor prng_descriptor[TAB_SIZE] = { { NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL } }; -LTC_MUTEX_GLOBAL(ltc_prng_mutex); +LTC_MUTEX_GLOBAL(ltc_prng_mutex) /* $Source: /cvs/libtom/libtomcrypt/src/misc/crypt/crypt_prng_descriptor.c,v $ */ -/* $Revision: 1.5 $ */ -/* $Date: 2005/06/19 18:00:28 $ */ +/* $Revision: 1.7 $ */ +/* $Date: 2006/03/31 14:15:35 $ */ diff --git a/libtomcrypt/src/misc/crypt/crypt_prng_is_valid.c b/libtomcrypt/src/misc/crypt/crypt_prng_is_valid.c index a7a7ed6..6af0a3c 100644 --- a/libtomcrypt/src/misc/crypt/crypt_prng_is_valid.c +++ b/libtomcrypt/src/misc/crypt/crypt_prng_is_valid.c @@ -6,7 +6,7 @@ * The library is free for all purposes without any express * guarantee it works. * - * Tom St Denis, tomstdenis@gmail.com, http://libtomcrypt.org + * Tom St Denis, tomstdenis@gmail.com, http://libtomcrypt.com */ #include "tomcrypt.h" @@ -32,5 +32,5 @@ int prng_is_valid(int idx) } /* $Source: /cvs/libtom/libtomcrypt/src/misc/crypt/crypt_prng_is_valid.c,v $ */ -/* $Revision: 1.4 $ */ -/* $Date: 2005/06/19 18:00:28 $ */ +/* $Revision: 1.5 $ */ +/* $Date: 2006/03/31 14:15:35 $ */ diff --git a/libtomcrypt/src/misc/crypt/crypt_register_cipher.c b/libtomcrypt/src/misc/crypt/crypt_register_cipher.c index c55d7c0..8d74cc5 100644 --- a/libtomcrypt/src/misc/crypt/crypt_register_cipher.c +++ b/libtomcrypt/src/misc/crypt/crypt_register_cipher.c @@ -6,7 +6,7 @@ * The library is free for all purposes without any express * guarantee it works. * - * Tom St Denis, tomstdenis@gmail.com, http://libtomcrypt.org + * Tom St Denis, tomstdenis@gmail.com, http://libtomcrypt.com */ #include "tomcrypt.h" @@ -50,5 +50,5 @@ int register_cipher(const struct ltc_cipher_descriptor *cipher) } /* $Source: /cvs/libtom/libtomcrypt/src/misc/crypt/crypt_register_cipher.c,v $ */ -/* $Revision: 1.4 $ */ -/* $Date: 2005/06/19 18:00:28 $ */ +/* $Revision: 1.5 $ */ +/* $Date: 2006/03/31 14:15:35 $ */ diff --git a/libtomcrypt/src/misc/crypt/crypt_register_hash.c b/libtomcrypt/src/misc/crypt/crypt_register_hash.c index 0ff521f..45d0e85 100644 --- a/libtomcrypt/src/misc/crypt/crypt_register_hash.c +++ b/libtomcrypt/src/misc/crypt/crypt_register_hash.c @@ -6,7 +6,7 @@ * The library is free for all purposes without any express * guarantee it works. * - * Tom St Denis, tomstdenis@gmail.com, http://libtomcrypt.org + * Tom St Denis, tomstdenis@gmail.com, http://libtomcrypt.com */ #include "tomcrypt.h" @@ -29,7 +29,7 @@ int register_hash(const struct ltc_hash_descriptor *hash) /* is it already registered? */ LTC_MUTEX_LOCK(<c_hash_mutex); for (x = 0; x < TAB_SIZE; x++) { - if (memcmp(&hash_descriptor[x], hash, sizeof(struct ltc_hash_descriptor)) == 0) { + if (XMEMCMP(&hash_descriptor[x], hash, sizeof(struct ltc_hash_descriptor)) == 0) { LTC_MUTEX_UNLOCK(<c_hash_mutex); return x; } @@ -50,5 +50,5 @@ int register_hash(const struct ltc_hash_descriptor *hash) } /* $Source: /cvs/libtom/libtomcrypt/src/misc/crypt/crypt_register_hash.c,v $ */ -/* $Revision: 1.4 $ */ -/* $Date: 2005/06/19 18:00:28 $ */ +/* $Revision: 1.6 $ */ +/* $Date: 2006/11/01 09:28:17 $ */ diff --git a/libtomcrypt/src/misc/crypt/crypt_register_prng.c b/libtomcrypt/src/misc/crypt/crypt_register_prng.c index 5ab4a49..a834c47 100644 --- a/libtomcrypt/src/misc/crypt/crypt_register_prng.c +++ b/libtomcrypt/src/misc/crypt/crypt_register_prng.c @@ -6,7 +6,7 @@ * The library is free for all purposes without any express * guarantee it works. * - * Tom St Denis, tomstdenis@gmail.com, http://libtomcrypt.org + * Tom St Denis, tomstdenis@gmail.com, http://libtomcrypt.com */ #include "tomcrypt.h" @@ -29,7 +29,7 @@ int register_prng(const struct ltc_prng_descriptor *prng) /* is it already registered? */ LTC_MUTEX_LOCK(<c_prng_mutex); for (x = 0; x < TAB_SIZE; x++) { - if (memcmp(&prng_descriptor[x], prng, sizeof(struct ltc_prng_descriptor)) == 0) { + if (XMEMCMP(&prng_descriptor[x], prng, sizeof(struct ltc_prng_descriptor)) == 0) { LTC_MUTEX_UNLOCK(<c_prng_mutex); return x; } @@ -50,5 +50,5 @@ int register_prng(const struct ltc_prng_descriptor *prng) } /* $Source: /cvs/libtom/libtomcrypt/src/misc/crypt/crypt_register_prng.c,v $ */ -/* $Revision: 1.5 $ */ -/* $Date: 2005/06/19 18:00:28 $ */ +/* $Revision: 1.7 $ */ +/* $Date: 2006/11/01 09:28:17 $ */ diff --git a/libtomcrypt/src/misc/crypt/crypt_unregister_cipher.c b/libtomcrypt/src/misc/crypt/crypt_unregister_cipher.c index 4081ca8..3cb46c4 100644 --- a/libtomcrypt/src/misc/crypt/crypt_unregister_cipher.c +++ b/libtomcrypt/src/misc/crypt/crypt_unregister_cipher.c @@ -6,7 +6,7 @@ * The library is free for all purposes without any express * guarantee it works. * - * Tom St Denis, tomstdenis@gmail.com, http://libtomcrypt.org + * Tom St Denis, tomstdenis@gmail.com, http://libtomcrypt.com */ #include "tomcrypt.h" @@ -29,7 +29,7 @@ int unregister_cipher(const struct ltc_cipher_descriptor *cipher) /* is it already registered? */ LTC_MUTEX_LOCK(<c_cipher_mutex); for (x = 0; x < TAB_SIZE; x++) { - if (memcmp(&cipher_descriptor[x], cipher, sizeof(struct ltc_cipher_descriptor)) == 0) { + if (XMEMCMP(&cipher_descriptor[x], cipher, sizeof(struct ltc_cipher_descriptor)) == 0) { cipher_descriptor[x].name = NULL; cipher_descriptor[x].ID = 255; LTC_MUTEX_UNLOCK(<c_cipher_mutex); @@ -41,5 +41,5 @@ int unregister_cipher(const struct ltc_cipher_descriptor *cipher) } /* $Source: /cvs/libtom/libtomcrypt/src/misc/crypt/crypt_unregister_cipher.c,v $ */ -/* $Revision: 1.4 $ */ -/* $Date: 2005/06/19 18:00:28 $ */ +/* $Revision: 1.6 $ */ +/* $Date: 2006/11/01 09:28:17 $ */ diff --git a/libtomcrypt/src/misc/crypt/crypt_unregister_hash.c b/libtomcrypt/src/misc/crypt/crypt_unregister_hash.c index fdd25b2..a87a399 100644 --- a/libtomcrypt/src/misc/crypt/crypt_unregister_hash.c +++ b/libtomcrypt/src/misc/crypt/crypt_unregister_hash.c @@ -6,7 +6,7 @@ * The library is free for all purposes without any express * guarantee it works. * - * Tom St Denis, tomstdenis@gmail.com, http://libtomcrypt.org + * Tom St Denis, tomstdenis@gmail.com, http://libtomcrypt.com */ #include "tomcrypt.h" @@ -29,7 +29,7 @@ int unregister_hash(const struct ltc_hash_descriptor *hash) /* is it already registered? */ LTC_MUTEX_LOCK(<c_hash_mutex); for (x = 0; x < TAB_SIZE; x++) { - if (memcmp(&hash_descriptor[x], hash, sizeof(struct ltc_hash_descriptor)) == 0) { + if (XMEMCMP(&hash_descriptor[x], hash, sizeof(struct ltc_hash_descriptor)) == 0) { hash_descriptor[x].name = NULL; LTC_MUTEX_UNLOCK(<c_hash_mutex); return CRYPT_OK; @@ -40,5 +40,5 @@ int unregister_hash(const struct ltc_hash_descriptor *hash) } /* $Source: /cvs/libtom/libtomcrypt/src/misc/crypt/crypt_unregister_hash.c,v $ */ -/* $Revision: 1.4 $ */ -/* $Date: 2005/06/19 18:00:28 $ */ +/* $Revision: 1.6 $ */ +/* $Date: 2006/11/01 09:28:17 $ */ diff --git a/libtomcrypt/src/misc/crypt/crypt_unregister_prng.c b/libtomcrypt/src/misc/crypt/crypt_unregister_prng.c index 4aff6de..694cbcf 100644 --- a/libtomcrypt/src/misc/crypt/crypt_unregister_prng.c +++ b/libtomcrypt/src/misc/crypt/crypt_unregister_prng.c @@ -6,7 +6,7 @@ * The library is free for all purposes without any express * guarantee it works. * - * Tom St Denis, tomstdenis@gmail.com, http://libtomcrypt.org + * Tom St Denis, tomstdenis@gmail.com, http://libtomcrypt.com */ #include "tomcrypt.h" @@ -29,7 +29,7 @@ int unregister_prng(const struct ltc_prng_descriptor *prng) /* is it already registered? */ LTC_MUTEX_LOCK(<c_prng_mutex); for (x = 0; x < TAB_SIZE; x++) { - if (memcmp(&prng_descriptor[x], prng, sizeof(struct ltc_prng_descriptor)) != 0) { + if (XMEMCMP(&prng_descriptor[x], prng, sizeof(struct ltc_prng_descriptor)) != 0) { prng_descriptor[x].name = NULL; LTC_MUTEX_UNLOCK(<c_prng_mutex); return CRYPT_OK; @@ -40,5 +40,5 @@ int unregister_prng(const struct ltc_prng_descriptor *prng) } /* $Source: /cvs/libtom/libtomcrypt/src/misc/crypt/crypt_unregister_prng.c,v $ */ -/* $Revision: 1.4 $ */ -/* $Date: 2005/06/19 18:00:28 $ */ +/* $Revision: 1.6 $ */ +/* $Date: 2006/11/01 09:28:17 $ */ |