Mercurial > dropbear
comparison libtomcrypt/src/encauth/gcm/gcm_add_aad.c @ 382:0cbe8f6dbf9e
propagate from branch 'au.asn.ucc.matt.ltc.dropbear' (head 2af22fb4e878750b88f80f90d439b316d229796f)
to branch 'au.asn.ucc.matt.dropbear' (head 02c413252c90e9de8e03d91e9939dde3029f5c0a)
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Thu, 11 Jan 2007 02:41:05 +0000 |
parents | 1b9e69c058d2 |
children | f849a5ca2efc |
comparison
equal
deleted
inserted
replaced
379:b66a00272a90 | 382:0cbe8f6dbf9e |
---|---|
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 $ */ |