Home | History | Annotate | Download | only in lrw

Lines Matching refs:lrw

21   Process blocks with LRW, since decrypt/encrypt are largely the same they share this code.
26 @param lrw The LRW state
29 int lrw_process(const unsigned char *pt, unsigned char *ct, unsigned long len, int mode, symmetric_LRW *lrw)
39 LTC_ARGCHK(lrw != NULL);
47 XMEMCPY(prod, lrw->pad, 16);
51 lrw->IV[x] = (lrw->IV[x] + 1) & 255;
52 if (lrw->IV[x]) {
63 *((LTC_FAST_TYPE *)(lrw->pad + y)) ^= *((LTC_FAST_TYPE *)(&lrw->PC[x][lrw->IV[x]][y])) ^ *((LTC_FAST_TYPE *)(&lrw->PC[x][(lrw->IV[x]-1)&255][y]));
67 lrw->pad[y] ^= lrw->PC[x][lrw->IV[x]][y] ^ lrw->PC[x][(lrw->IV[x]-1)&255][y];
72 gcm_gf_mult(lrw->tweak, lrw->IV, lrw->pad);
88 if ((err = cipher_descriptor[lrw->cipher].ecb_encrypt(ct, ct, &lrw->key)) != CRYPT_OK) {
92 if ((err = cipher_descriptor[lrw->cipher].ecb_decrypt(ct, ct, &lrw->key)) != CRYPT_OK) {
118 /* $Source: /cvs/libtom/libtomcrypt/src/modes/lrw/lrw_process.c,v $ */