diff options
Diffstat (limited to 'libtomcrypt/src/encauth/gcm')
-rw-r--r-- | libtomcrypt/src/encauth/gcm/gcm_add_aad.c | 16 | ||||
-rw-r--r-- | libtomcrypt/src/encauth/gcm/gcm_add_iv.c | 12 | ||||
-rw-r--r-- | libtomcrypt/src/encauth/gcm/gcm_done.c | 12 | ||||
-rw-r--r-- | libtomcrypt/src/encauth/gcm/gcm_gf_mult.c | 12 | ||||
-rw-r--r-- | libtomcrypt/src/encauth/gcm/gcm_init.c | 16 | ||||
-rw-r--r-- | libtomcrypt/src/encauth/gcm/gcm_memory.c | 14 | ||||
-rw-r--r-- | libtomcrypt/src/encauth/gcm/gcm_mult_h.c | 16 | ||||
-rw-r--r-- | libtomcrypt/src/encauth/gcm/gcm_process.c | 16 | ||||
-rw-r--r-- | libtomcrypt/src/encauth/gcm/gcm_reset.c | 12 | ||||
-rw-r--r-- | libtomcrypt/src/encauth/gcm/gcm_test.c | 10 |
10 files changed, 68 insertions, 68 deletions
diff --git a/libtomcrypt/src/encauth/gcm/gcm_add_aad.c b/libtomcrypt/src/encauth/gcm/gcm_add_aad.c index 6037c6c..26e47f6 100644 --- a/libtomcrypt/src/encauth/gcm/gcm_add_aad.c +++ b/libtomcrypt/src/encauth/gcm/gcm_add_aad.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.com + * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ /** @@ -15,7 +15,7 @@ */ #include "tomcrypt.h" -#ifdef GCM_MODE +#ifdef LTC_GCM_MODE /** Add AAD to the GCM state @@ -47,7 +47,7 @@ int gcm_add_aad(gcm_state *gcm, } /* in IV mode? */ - if (gcm->mode == GCM_MODE_IV) { + if (gcm->mode == LTC_GCM_MODE_IV) { /* let's process the IV */ if (gcm->ivmode || gcm->buflen != 12) { for (x = 0; x < (unsigned long)gcm->buflen; x++) { @@ -80,10 +80,10 @@ int gcm_add_aad(gcm_state *gcm, zeromem(gcm->buf, 16); gcm->buflen = 0; gcm->totlen = 0; - gcm->mode = GCM_MODE_AAD; + gcm->mode = LTC_GCM_MODE_AAD; } - if (gcm->mode != GCM_MODE_AAD || gcm->buflen >= 16) { + if (gcm->mode != LTC_GCM_MODE_AAD || gcm->buflen >= 16) { return CRYPT_INVALID_ARG; } @@ -119,6 +119,6 @@ int gcm_add_aad(gcm_state *gcm, #endif -/* $Source: /cvs/libtom/libtomcrypt/src/encauth/gcm/gcm_add_aad.c,v $ */ -/* $Revision: 1.16 $ */ -/* $Date: 2006/09/23 19:24:21 $ */ +/* $Source$ */ +/* $Revision$ */ +/* $Date$ */ diff --git a/libtomcrypt/src/encauth/gcm/gcm_add_iv.c b/libtomcrypt/src/encauth/gcm/gcm_add_iv.c index 44e3167..0ac79b6 100644 --- a/libtomcrypt/src/encauth/gcm/gcm_add_iv.c +++ b/libtomcrypt/src/encauth/gcm/gcm_add_iv.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.com + * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ /** @@ -15,7 +15,7 @@ */ #include "tomcrypt.h" -#ifdef GCM_MODE +#ifdef LTC_GCM_MODE /** Add IV data to the GCM state @@ -36,7 +36,7 @@ int gcm_add_iv(gcm_state *gcm, } /* must be in IV mode */ - if (gcm->mode != GCM_MODE_IV) { + if (gcm->mode != LTC_GCM_MODE_IV) { return CRYPT_INVALID_ARG; } @@ -89,6 +89,6 @@ int gcm_add_iv(gcm_state *gcm, #endif -/* $Source: /cvs/libtom/libtomcrypt/src/encauth/gcm/gcm_add_iv.c,v $ */ -/* $Revision: 1.7 $ */ -/* $Date: 2006/03/31 14:15:35 $ */ +/* $Source$ */ +/* $Revision$ */ +/* $Date$ */ diff --git a/libtomcrypt/src/encauth/gcm/gcm_done.c b/libtomcrypt/src/encauth/gcm/gcm_done.c index 4cbd09f..bbc9bbe 100644 --- a/libtomcrypt/src/encauth/gcm/gcm_done.c +++ b/libtomcrypt/src/encauth/gcm/gcm_done.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.com + * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ /** @@ -15,7 +15,7 @@ */ #include "tomcrypt.h" -#ifdef GCM_MODE +#ifdef LTC_GCM_MODE /** Terminate a GCM stream @@ -43,7 +43,7 @@ int gcm_done(gcm_state *gcm, } - if (gcm->mode != GCM_MODE_TEXT) { + if (gcm->mode != LTC_GCM_MODE_TEXT) { return CRYPT_INVALID_ARG; } @@ -78,6 +78,6 @@ int gcm_done(gcm_state *gcm, #endif -/* $Source: /cvs/libtom/libtomcrypt/src/encauth/gcm/gcm_done.c,v $ */ -/* $Revision: 1.9 $ */ -/* $Date: 2006/03/31 14:15:35 $ */ +/* $Source$ */ +/* $Revision$ */ +/* $Date$ */ diff --git a/libtomcrypt/src/encauth/gcm/gcm_gf_mult.c b/libtomcrypt/src/encauth/gcm/gcm_gf_mult.c index 52e82dd..72e0624 100644 --- a/libtomcrypt/src/encauth/gcm/gcm_gf_mult.c +++ b/libtomcrypt/src/encauth/gcm/gcm_gf_mult.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.com + * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ /** @@ -15,7 +15,7 @@ */ #include "tomcrypt.h" -#if defined(GCM_TABLES) || defined(LRW_TABLES) || ((defined(GCM_MODE) || defined(GCM_MODE)) && defined(LTC_FAST)) +#if defined(LTC_GCM_TABLES) || defined(LRW_TABLES) || ((defined(LTC_GCM_MODE) || defined(LTC_GCM_MODE)) && defined(LTC_FAST)) /* this is x*2^128 mod p(x) ... the results are 16 bytes each stored in a packed format. Since only the * lower 16 bits are not zero'ed I removed the upper 14 bytes */ @@ -56,7 +56,7 @@ const unsigned char gcm_shift_table[256*2] = { #endif -#if defined(GCM_MODE) || defined(LRW_MODE) +#if defined(LTC_GCM_MODE) || defined(LRW_MODE) #ifndef LTC_FAST /* right shift */ @@ -215,7 +215,7 @@ void gcm_gf_mult(const unsigned char *a, const unsigned char *b, unsigned char * #endif -/* $Source: /cvs/libtom/libtomcrypt/src/encauth/gcm/gcm_gf_mult.c,v $ */ -/* $Revision: 1.23 $ */ -/* $Date: 2006/03/31 14:15:35 $ */ +/* $Source$ */ +/* $Revision$ */ +/* $Date$ */ diff --git a/libtomcrypt/src/encauth/gcm/gcm_init.c b/libtomcrypt/src/encauth/gcm/gcm_init.c index c0f7a5a..8e1c496 100644 --- a/libtomcrypt/src/encauth/gcm/gcm_init.c +++ b/libtomcrypt/src/encauth/gcm/gcm_init.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.com + * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ /** @@ -15,7 +15,7 @@ */ #include "tomcrypt.h" -#ifdef GCM_MODE +#ifdef LTC_GCM_MODE /** Initialize a GCM state @@ -30,7 +30,7 @@ int gcm_init(gcm_state *gcm, int cipher, { int err; unsigned char B[16]; -#ifdef GCM_TABLES +#ifdef LTC_GCM_TABLES int x, y, z, t; #endif @@ -66,13 +66,13 @@ int gcm_init(gcm_state *gcm, int cipher, zeromem(gcm->buf, sizeof(gcm->buf)); zeromem(gcm->X, sizeof(gcm->X)); gcm->cipher = cipher; - gcm->mode = GCM_MODE_IV; + gcm->mode = LTC_GCM_MODE_IV; gcm->ivmode = 0; gcm->buflen = 0; gcm->totlen = 0; gcm->pttotlen = 0; -#ifdef GCM_TABLES +#ifdef LTC_GCM_TABLES /* setup tables */ /* generate the first table as it has no shifting (from which we make the other tables) */ @@ -102,6 +102,6 @@ int gcm_init(gcm_state *gcm, int cipher, #endif -/* $Source: /cvs/libtom/libtomcrypt/src/encauth/gcm/gcm_init.c,v $ */ -/* $Revision: 1.18 $ */ -/* $Date: 2006/03/31 14:15:35 $ */ +/* $Source$ */ +/* $Revision$ */ +/* $Date$ */ diff --git a/libtomcrypt/src/encauth/gcm/gcm_memory.c b/libtomcrypt/src/encauth/gcm/gcm_memory.c index ddec010..451e3fa 100644 --- a/libtomcrypt/src/encauth/gcm/gcm_memory.c +++ b/libtomcrypt/src/encauth/gcm/gcm_memory.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.com + * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ /** @@ -15,7 +15,7 @@ */ #include "tomcrypt.h" -#ifdef GCM_MODE +#ifdef LTC_GCM_MODE /** Process an entire GCM packet in one call. @@ -65,7 +65,7 @@ int gcm_memory( int cipher, -#ifndef GCM_TABLES_SSE2 +#ifndef LTC_GCM_TABLES_SSE2 orig = gcm = XMALLOC(sizeof(*gcm)); #else orig = gcm = XMALLOC(sizeof(*gcm) + 16); @@ -78,7 +78,7 @@ int gcm_memory( int cipher, * note that we only modify gcm and keep orig intact. This code is not portable * but again it's only for SSE2 anyways, so who cares? */ -#ifdef GCM_TABLES_SSE2 +#ifdef LTC_GCM_TABLES_SSE2 if ((unsigned long)gcm & 15) { gcm = (gcm_state *)((unsigned long)gcm + (16 - ((unsigned long)gcm & 15))); } @@ -104,6 +104,6 @@ LTC_ERR: #endif -/* $Source: /cvs/libtom/libtomcrypt/src/encauth/gcm/gcm_memory.c,v $ */ -/* $Revision: 1.23 $ */ -/* $Date: 2006/09/07 10:00:57 $ */ +/* $Source$ */ +/* $Revision$ */ +/* $Date$ */ diff --git a/libtomcrypt/src/encauth/gcm/gcm_mult_h.c b/libtomcrypt/src/encauth/gcm/gcm_mult_h.c index 8391e00..2cda6a4 100644 --- a/libtomcrypt/src/encauth/gcm/gcm_mult_h.c +++ b/libtomcrypt/src/encauth/gcm/gcm_mult_h.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.com + * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ /** @@ -15,7 +15,7 @@ */ #include "tomcrypt.h" -#if defined(GCM_MODE) +#if defined(LTC_GCM_MODE) /** GCM multiply by H @param gcm The GCM state which holds the H value @@ -24,9 +24,9 @@ void gcm_mult_h(gcm_state *gcm, unsigned char *I) { unsigned char T[16]; -#ifdef GCM_TABLES +#ifdef LTC_GCM_TABLES int x, y; -#ifdef GCM_TABLES_SSE2 +#ifdef LTC_GCM_TABLES_SSE2 asm("movdqa (%0),%%xmm0"::"r"(&gcm->PC[0][I[0]][0])); for (x = 1; x < 16; x++) { asm("pxor (%0),%%xmm0"::"r"(&gcm->PC[x][I[x]][0])); @@ -45,7 +45,7 @@ void gcm_mult_h(gcm_state *gcm, unsigned char *I) } #endif /* LTC_FAST */ } -#endif /* GCM_TABLES_SSE2 */ +#endif /* LTC_GCM_TABLES_SSE2 */ #else gcm_gf_mult(gcm->H, I, T); #endif @@ -53,6 +53,6 @@ void gcm_mult_h(gcm_state *gcm, unsigned char *I) } #endif -/* $Source: /cvs/libtom/libtomcrypt/src/encauth/gcm/gcm_mult_h.c,v $ */ -/* $Revision: 1.4 $ */ -/* $Date: 2006/08/23 20:40:23 $ */ +/* $Source$ */ +/* $Revision$ */ +/* $Date$ */ diff --git a/libtomcrypt/src/encauth/gcm/gcm_process.c b/libtomcrypt/src/encauth/gcm/gcm_process.c index f4d21d3..af0444d 100644 --- a/libtomcrypt/src/encauth/gcm/gcm_process.c +++ b/libtomcrypt/src/encauth/gcm/gcm_process.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.com + * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ /** @@ -15,7 +15,7 @@ */ #include "tomcrypt.h" -#ifdef GCM_MODE +#ifdef LTC_GCM_MODE /** Process plaintext/ciphertext through GCM @@ -50,7 +50,7 @@ int gcm_process(gcm_state *gcm, } /* in AAD mode? */ - if (gcm->mode == GCM_MODE_AAD) { + if (gcm->mode == LTC_GCM_MODE_AAD) { /* let's process the AAD */ if (gcm->buflen) { gcm->totlen += gcm->buflen * CONST64(8); @@ -67,10 +67,10 @@ int gcm_process(gcm_state *gcm, } gcm->buflen = 0; - gcm->mode = GCM_MODE_TEXT; + gcm->mode = LTC_GCM_MODE_TEXT; } - if (gcm->mode != GCM_MODE_TEXT) { + if (gcm->mode != LTC_GCM_MODE_TEXT) { return CRYPT_INVALID_ARG; } @@ -147,6 +147,6 @@ int gcm_process(gcm_state *gcm, #endif -/* $Source: /cvs/libtom/libtomcrypt/src/encauth/gcm/gcm_process.c,v $ */ -/* $Revision: 1.14 $ */ -/* $Date: 2006/11/19 19:33:36 $ */ +/* $Source$ */ +/* $Revision$ */ +/* $Date$ */ diff --git a/libtomcrypt/src/encauth/gcm/gcm_reset.c b/libtomcrypt/src/encauth/gcm/gcm_reset.c index a6a8522..c9e13d9 100644 --- a/libtomcrypt/src/encauth/gcm/gcm_reset.c +++ b/libtomcrypt/src/encauth/gcm/gcm_reset.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.com + * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ /** @@ -15,7 +15,7 @@ */ #include "tomcrypt.h" -#ifdef GCM_MODE +#ifdef LTC_GCM_MODE /** Reset a GCM state to as if you just called gcm_init(). This saves the initialization time. @@ -28,7 +28,7 @@ int gcm_reset(gcm_state *gcm) zeromem(gcm->buf, sizeof(gcm->buf)); zeromem(gcm->X, sizeof(gcm->X)); - gcm->mode = GCM_MODE_IV; + gcm->mode = LTC_GCM_MODE_IV; gcm->ivmode = 0; gcm->buflen = 0; gcm->totlen = 0; @@ -39,6 +39,6 @@ int gcm_reset(gcm_state *gcm) #endif -/* $Source: /cvs/libtom/libtomcrypt/src/encauth/gcm/gcm_reset.c,v $ */ -/* $Revision: 1.4 $ */ -/* $Date: 2006/03/31 14:15:35 $ */ +/* $Source$ */ +/* $Revision$ */ +/* $Date$ */ diff --git a/libtomcrypt/src/encauth/gcm/gcm_test.c b/libtomcrypt/src/encauth/gcm/gcm_test.c index 2f8539b..7380c81 100644 --- a/libtomcrypt/src/encauth/gcm/gcm_test.c +++ b/libtomcrypt/src/encauth/gcm/gcm_test.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.com + * Tom St Denis, tomstdenis@gmail.com, http://libtom.org */ /** @@ -15,7 +15,7 @@ */ #include "tomcrypt.h" -#ifdef GCM_MODE +#ifdef LTC_GCM_MODE /** Test the GCM code @@ -408,6 +408,6 @@ int gcm_test(void) #endif -/* $Source: /cvs/libtom/libtomcrypt/src/encauth/gcm/gcm_test.c,v $ */ -/* $Revision: 1.20 $ */ -/* $Date: 2006/12/03 17:25:44 $ */ +/* $Source$ */ +/* $Revision$ */ +/* $Date$ */ |