Home | History | Annotate | Download | only in lrw

Lines Matching refs:lrw

21   Set the IV for LRW
24 @param lrw The LRW state to update
27 int lrw_setiv(const unsigned char *IV, unsigned long len, symmetric_LRW *lrw)
35 LTC_ARGCHK(lrw != NULL);
41 if ((err = cipher_is_valid(lrw->cipher)) != CRYPT_OK) {
46 XMEMCPY(lrw->IV, IV, 16);
49 if (cipher_descriptor[lrw->cipher].accel_lrw_encrypt != NULL && cipher_descriptor[lrw->cipher].accel_lrw_decrypt != NULL) {
50 /* we have accelerators, let's bail since they don't use lrw->pad anyways */
55 XMEMCPY(T, &lrw->PC[0][IV[0]][0], 16);
59 *((LTC_FAST_TYPE *)(T + y)) ^= *((LTC_FAST_TYPE *)(&lrw->PC[x][IV[x]][y]));
63 T[y] ^= lrw->PC[x][IV[x]][y];
67 XMEMCPY(lrw->pad, T, 16);
69 gcm_gf_mult(lrw->tweak, IV, lrw->pad);
77 /* $Source: /cvs/libtom/libtomcrypt/src/modes/lrw/lrw_setiv.c,v $ */