Mercurial > dropbear
comparison src/encauth/gcm/gcm_add_aad.c @ 381:999a5eb4ed10 libtomcrypt-dropbear
propagate from branch 'au.asn.ucc.matt.ltc.orig' (head 52840647ac7f5c707c3bd158d119a15734a7ef28)
to branch 'au.asn.ucc.matt.ltc.dropbear' (head 20dccfc09627970a312d77fb41dc2970b62689c3)
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Thu, 11 Jan 2007 02:39:21 +0000 |
parents | d5faf4814ddb |
children |
comparison
equal
deleted
inserted
replaced
281:997e6f7dc01e | 381:999a5eb4ed10 |
---|---|
4 * algorithms in a highly modular and flexible manner. | 4 * algorithms in a highly modular and flexible manner. |
5 * | 5 * |
6 * The library is free for all purposes without any express | 6 * The library is free for all purposes without any express |
7 * guarantee it works. | 7 * guarantee it works. |
8 * | 8 * |
9 * Tom St Denis, [email protected], http://libtomcrypt.org | 9 * Tom St Denis, [email protected], http://libtomcrypt.com |
10 */ | 10 */ |
11 | 11 |
12 /** | 12 /** |
13 @file gcm_add_aad.c | 13 @file gcm_add_aad.c |
14 GCM implementation, Add AAD data to the stream, by Tom St Denis | 14 GCM implementation, Add AAD data to the stream, by Tom St Denis |
55 } | 55 } |
56 if (gcm->buflen) { | 56 if (gcm->buflen) { |
57 gcm->totlen += gcm->buflen * CONST64(8); | 57 gcm->totlen += gcm->buflen * CONST64(8); |
58 gcm_mult_h(gcm, gcm->X); | 58 gcm_mult_h(gcm, gcm->X); |
59 } | 59 } |
60 | 60 |
61 /* mix in the length */ | 61 /* mix in the length */ |
62 zeromem(gcm->buf, 8); | 62 zeromem(gcm->buf, 8); |
63 STORE64H(gcm->totlen, gcm->buf+8); | 63 STORE64H(gcm->totlen, gcm->buf+8); |
64 for (x = 0; x < 16; x++) { | 64 for (x = 0; x < 16; x++) { |
65 gcm->X[x] ^= gcm->buf[x]; | 65 gcm->X[x] ^= gcm->buf[x]; |
118 } | 118 } |
119 #endif | 119 #endif |
120 | 120 |
121 | 121 |
122 /* $Source: /cvs/libtom/libtomcrypt/src/encauth/gcm/gcm_add_aad.c,v $ */ | 122 /* $Source: /cvs/libtom/libtomcrypt/src/encauth/gcm/gcm_add_aad.c,v $ */ |
123 /* $Revision: 1.14 $ */ | 123 /* $Revision: 1.16 $ */ |
124 /* $Date: 2005/05/05 14:35:58 $ */ | 124 /* $Date: 2006/09/23 19:24:21 $ */ |