Lines Matching refs:cipher
27 int xcbc_init(xcbc_state *xcbc, int cipher, const unsigned char *key, unsigned long keylen) in xcbc_init() argument
36 if ((err = cipher_is_valid(cipher)) != CRYPT_OK) { in xcbc_init()
41 if (cipher_descriptor[cipher].block_length % sizeof(LTC_FAST_TYPE)) { in xcbc_init()
52 if ((err = cipher_descriptor[cipher].setup(key, keylen, 0, skey)) != CRYPT_OK) { in xcbc_init()
58 for (x = 0; x < cipher_descriptor[cipher].block_length; x++) { in xcbc_init()
61 cipher_descriptor[cipher].ecb_encrypt(xcbc->K[y], xcbc->K[y], skey); in xcbc_init()
65 …err = cipher_descriptor[cipher].setup(xcbc->K[0], cipher_descriptor[cipher].block_length, 0, &xcbc… in xcbc_init()
68 zeromem(xcbc->IV, cipher_descriptor[cipher].block_length); in xcbc_init()
69 xcbc->blocksize = cipher_descriptor[cipher].block_length; in xcbc_init()
70 xcbc->cipher = cipher; in xcbc_init()
73 cipher_descriptor[cipher].done(skey); in xcbc_init()