Home | History | Annotate | Download | only in gcm

Lines Matching full:gcm

14    GCM implementation, initialize state, by Tom St Denis
21 Initialize a GCM state
22 @param gcm The GCM state to initialize
28 int gcm_init(gcm_state *gcm, int cipher,
37 LTC_ARGCHK(gcm != NULL);
55 if ((err = cipher_descriptor[cipher].setup(key, keylen, 0, &gcm->K)) != CRYPT_OK) {
61 if ((err = cipher_descriptor[cipher].ecb_encrypt(B, gcm->H, &gcm->K)) != CRYPT_OK) {
66 zeromem(gcm->buf, sizeof(gcm->buf));
67 zeromem(gcm->X, sizeof(gcm->X));
68 gcm->cipher = cipher;
69 gcm->mode = GCM_MODE_IV;
70 gcm->ivmode = 0;
71 gcm->buflen = 0;
72 gcm->totlen = 0;
73 gcm->pttotlen = 0;
82 gcm_gf_mult(gcm->H, B, &gcm->PC[0][y][0]);
89 t = gcm->PC[x-1][y][15];
91 gcm->PC[x][y][z] = gcm->PC[x-1][y][z-1];
93 gcm->PC[x][y][0] = gcm_shift_table[t<<1];
94 gcm->PC[x][y][1] ^= gcm_shift_table[(t<<1)+1];
105 /* $Source: /cvs/libtom/libtomcrypt/src/encauth/gcm/gcm_init.c,v $ */