Lines Matching refs:enc
276 packet_start_discard(Enc *enc, Mac *mac, u_int packet_length, u_int discard)
278 if (enc == NULL || !cipher_is_cbc(enc->cipher))
735 Enc *enc;
758 enc = &active_state->newkeys[mode]->enc;
762 xfree(enc->name);
763 xfree(enc->iv);
764 xfree(enc->key);
773 enc = &active_state->newkeys[mode]->enc;
779 cipher_init(cc, enc->cipher, enc->key, enc->key_len,
780 enc->iv, enc->block_size, crypt_type);
782 /* memset(enc->iv, 0, enc->block_size);
783 memset(enc->key, 0, enc->key_len);
799 if (enc->block_size >= 16)
800 *max_blocks = (u_int64_t)1 << (enc->block_size*2);
802 *max_blocks = ((u_int64_t)1 << 30) / enc->block_size;
805 active_state->rekey_limit / enc->block_size);
851 Enc *enc = NULL;
857 enc = &active_state->newkeys[MODE_OUT]->enc;
861 block_size = enc ? enc->block_size : 8;
909 if (enc && !active_state->send_context.plaintext) {
1240 Enc *enc = NULL;
1248 enc = &active_state->newkeys[MODE_IN]->enc;
1253 block_size = enc ? enc->block_size : 8;
1275 packet_start_discard(enc, mac, active_state->packlen,
1289 packet_start_discard(enc, mac, active_state->packlen,
1300 fprintf(stderr, "read_poll enc/full: ");
1320 packet_start_discard(enc, mac, active_state->packlen,