Lines Matching refs:encrypt_key
123 if (crypt->encrypt_key) { in std_finish()
124 free(crypt->encrypt_key); in std_finish()
125 crypt->encrypt_key = NULL; in std_finish()
136 if (crypt->encrypt_key) { in cast5_init()
137 free(crypt->encrypt_key); in cast5_init()
139 if ((crypt->encrypt_key = calloc(1, sizeof(CAST_KEY))) == NULL) { in cast5_init()
143 CAST_set_key(crypt->encrypt_key, (int)crypt->keysize, crypt->key); in cast5_init()
155 CAST_ecb_encrypt(in, out, crypt->encrypt_key, CAST_ENCRYPT); in cast5_block_encrypt()
161 CAST_ecb_encrypt(in, out, crypt->encrypt_key, CAST_DECRYPT); in cast5_block_decrypt()
168 crypt->encrypt_key, crypt->iv, &crypt->num, in cast5_cfb_encrypt()
176 crypt->encrypt_key, crypt->iv, &crypt->num, in cast5_cfb_decrypt()
207 if (crypt->encrypt_key) { in blowfish_init()
208 free(crypt->encrypt_key); in blowfish_init()
214 if ((crypt->encrypt_key = calloc(1, sizeof(BF_KEY))) == NULL) { in blowfish_init()
218 BF_set_key(crypt->encrypt_key, (int)crypt->keysize, crypt->key); in blowfish_init()
230 BF_ecb_encrypt(in, out, crypt->encrypt_key, BF_ENCRYPT); in blowfish_block_encrypt()
236 BF_ecb_encrypt(in, out, crypt->encrypt_key, BF_DECRYPT); in blowfish_block_decrypt()
243 crypt->encrypt_key, crypt->iv, &crypt->num, in blowfish_cfb_encrypt()
251 crypt->encrypt_key, crypt->iv, &crypt->num, in blowfish_cfb_decrypt()
283 if (crypt->encrypt_key) { in idea_init()
284 free(crypt->encrypt_key); in idea_init()
286 if ((crypt->encrypt_key = calloc(1, sizeof(IDEA_KEY_SCHEDULE))) == NULL) { in idea_init()
292 idea_set_encrypt_key(crypt->key, crypt->encrypt_key); in idea_init()
302 idea_set_decrypt_key(crypt->encrypt_key, crypt->decrypt_key); in idea_init()
309 idea_ecb_encrypt(in, out, crypt->encrypt_key); in idea_block_encrypt()
322 crypt->encrypt_key, crypt->iv, &crypt->num, in idea_cfb_encrypt()
359 if (crypt->encrypt_key) { in aes128_init()
360 free(crypt->encrypt_key); in aes128_init()
362 if ((crypt->encrypt_key = calloc(1, sizeof(AES_KEY))) == NULL) { in aes128_init()
367 crypt->encrypt_key)) { in aes128_init()
388 AES_encrypt(in, out, crypt->encrypt_key); in aes_block_encrypt()
401 crypt->encrypt_key, crypt->iv, &crypt->num, in aes_cfb_encrypt()
409 crypt->encrypt_key, crypt->iv, &crypt->num, in aes_cfb_decrypt()
437 if (crypt->encrypt_key) { in aes256_init()
438 free(crypt->encrypt_key); in aes256_init()
440 if ((crypt->encrypt_key = calloc(1, sizeof(AES_KEY))) == NULL) { in aes256_init()
445 crypt->encrypt_key)) { in aes256_init()
447 free(crypt->encrypt_key); in aes256_init()
448 crypt->encrypt_key = NULL; in aes256_init()
456 free(crypt->encrypt_key); in aes256_init()
457 crypt->encrypt_key = NULL; in aes256_init()
463 free(crypt->encrypt_key); in aes256_init()
464 crypt->encrypt_key = NULL; in aes256_init()
497 if (crypt->encrypt_key) { in tripledes_init()
498 free(crypt->encrypt_key); in tripledes_init()
500 if ((keys = crypt->encrypt_key = calloc(1, 3 * sizeof(DES_key_schedule))) == NULL) { in tripledes_init()
514 DES_key_schedule *keys = crypt->encrypt_key; in tripledes_block_encrypt()
523 DES_key_schedule *keys = crypt->encrypt_key; in tripledes_block_decrypt()
533 DES_key_schedule *keys = crypt->encrypt_key; in tripledes_cfb_encrypt()
544 DES_key_schedule *keys = crypt->encrypt_key; in tripledes_cfb_decrypt()
576 if (crypt->encrypt_key) { in camellia128_init()
577 free(crypt->encrypt_key); in camellia128_init()
579 if ((crypt->encrypt_key = calloc(1, sizeof(CAMELLIA_KEY))) == NULL) { in camellia128_init()
583 if (Camellia_set_key(crypt->key, KEYBITS_CAMELLIA128, crypt->encrypt_key)) { in camellia128_init()
602 Camellia_encrypt(in, out, crypt->encrypt_key); in camellia_block_encrypt()
615 crypt->encrypt_key, crypt->iv, &crypt->num, in camellia_cfb_encrypt()
623 crypt->encrypt_key, crypt->iv, &crypt->num, in camellia_cfb_decrypt()
651 if (crypt->encrypt_key) { in camellia256_init()
652 free(crypt->encrypt_key); in camellia256_init()
654 if ((crypt->encrypt_key = calloc(1, sizeof(CAMELLIA_KEY))) == NULL) { in camellia256_init()
658 if (Camellia_set_key(crypt->key, KEYBITS_CAMELLIA256, crypt->encrypt_key)) { in camellia256_init()