• Home
  • Raw
  • Download

Lines Matching refs:cipher

79 int rijndael_cipherInit(cipherInstance *cipher, BYTE mode, char *IV) {  in rijndael_cipherInit()  argument
81 cipher->mode = mode; in rijndael_cipherInit()
86 bcopy(IV, cipher->IV, MAX_IV_SIZE); in rijndael_cipherInit()
88 bzero(cipher->IV, MAX_IV_SIZE); in rijndael_cipherInit()
93 int rijndael_blockEncrypt(cipherInstance *cipher, keyInstance *key, in rijndael_blockEncrypt() argument
98 if (cipher == NULL || in rijndael_blockEncrypt()
109 switch (cipher->mode) { in rijndael_blockEncrypt()
120 bcopy(cipher->IV, block, 16); in rijndael_blockEncrypt()
127 ((word32*)block)[0] = ((word32*)cipher->IV)[0] ^ ((word32*)input)[0]; in rijndael_blockEncrypt()
128 ((word32*)block)[1] = ((word32*)cipher->IV)[1] ^ ((word32*)input)[1]; in rijndael_blockEncrypt()
129 ((word32*)block)[2] = ((word32*)cipher->IV)[2] ^ ((word32*)input)[2]; in rijndael_blockEncrypt()
130 ((word32*)block)[3] = ((word32*)cipher->IV)[3] ^ ((word32*)input)[3]; in rijndael_blockEncrypt()
156 bcopy(cipher->IV, iv, 16); in rijndael_blockEncrypt()
158 *((word32*)iv[0]) = *((word32*)(cipher->IV )); in rijndael_blockEncrypt()
159 *((word32*)iv[1]) = *((word32*)(cipher->IV+ 4)); in rijndael_blockEncrypt()
160 *((word32*)iv[2]) = *((word32*)(cipher->IV+ 8)); in rijndael_blockEncrypt()
161 *((word32*)iv[3]) = *((word32*)(cipher->IV+12)); in rijndael_blockEncrypt()
207 int rijndael_padEncrypt(cipherInstance *cipher, keyInstance *key, in rijndael_padEncrypt() argument
212 if (cipher == NULL || in rijndael_padEncrypt()
223 switch (cipher->mode) { in rijndael_padEncrypt()
240 iv = cipher->IV; in rijndael_padEncrypt()
270 int rijndael_blockDecrypt(cipherInstance *cipher, keyInstance *key, in rijndael_blockDecrypt() argument
275 if (cipher == NULL || in rijndael_blockDecrypt()
277 (cipher->mode != MODE_CFB1 && key->direction == DIR_ENCRYPT)) { in rijndael_blockDecrypt()
286 switch (cipher->mode) { in rijndael_blockDecrypt()
297 bcopy(cipher->IV, iv, 16); in rijndael_blockDecrypt()
299 *((word32*)iv[0]) = *((word32*)(cipher->IV )); in rijndael_blockDecrypt()
300 *((word32*)iv[1]) = *((word32*)(cipher->IV+ 4)); in rijndael_blockDecrypt()
301 *((word32*)iv[2]) = *((word32*)(cipher->IV+ 8)); in rijndael_blockDecrypt()
302 *((word32*)iv[3]) = *((word32*)(cipher->IV+12)); in rijndael_blockDecrypt()
326 bcopy(cipher->IV, iv, 16); in rijndael_blockDecrypt()
328 *((word32*)iv[0]) = *((word32*)(cipher->IV)); in rijndael_blockDecrypt()
329 *((word32*)iv[1]) = *((word32*)(cipher->IV+ 4)); in rijndael_blockDecrypt()
330 *((word32*)iv[2]) = *((word32*)(cipher->IV+ 8)); in rijndael_blockDecrypt()
331 *((word32*)iv[3]) = *((word32*)(cipher->IV+12)); in rijndael_blockDecrypt()
368 int rijndael_padDecrypt(cipherInstance *cipher, keyInstance *key, in rijndael_padDecrypt() argument
374 if (cipher == NULL || in rijndael_padDecrypt()
388 switch (cipher->mode) { in rijndael_padDecrypt()
411 bcopy(cipher->IV, iv, 16); in rijndael_padDecrypt()
460 int rijndael_cipherUpdateRounds(cipherInstance *cipher, keyInstance *key, in rijndael_cipherUpdateRounds() argument
465 if (cipher == NULL || key == NULL) { in rijndael_cipherUpdateRounds()