Lines Matching refs:op
28 static int do_cbc_encrypt(struct cipher_ctx *ctx, struct cipher_pkt *op, in do_cbc_encrypt() argument
33 if (tc_cbc_mode_encrypt(op->out_buf, in do_cbc_encrypt()
34 op->out_buf_max, in do_cbc_encrypt()
35 op->in_buf, op->in_len, in do_cbc_encrypt()
43 op->out_len = op->in_len; in do_cbc_encrypt()
48 static int do_cbc_decrypt(struct cipher_ctx *ctx, struct cipher_pkt *op, in do_cbc_decrypt() argument
56 if (iv != op->in_buf) { in do_cbc_decrypt()
61 if (tc_cbc_mode_decrypt(op->out_buf, in do_cbc_decrypt()
62 op->out_buf_max, in do_cbc_decrypt()
63 op->in_buf + TC_AES_BLOCK_SIZE, in do_cbc_decrypt()
64 op->in_len - TC_AES_BLOCK_SIZE, in do_cbc_decrypt()
65 op->in_buf, &data->session_key) == TC_CRYPTO_FAIL) { in do_cbc_decrypt()
71 op->out_len = op->in_len; in do_cbc_decrypt()
76 static int do_ctr_op(struct cipher_ctx *ctx, struct cipher_pkt *op, in do_ctr_op() argument
88 if (tc_ctr_mode(op->out_buf, op->out_buf_max, op->in_buf, in do_ctr_op()
89 op->in_len, ctr, in do_ctr_op()
96 op->out_len = op->in_len; in do_ctr_op()
107 struct cipher_pkt *op = aead_op->pkt; in do_ccm_encrypt_mac() local
116 if (tc_ccm_generation_encryption(op->out_buf, op->out_buf_max, in do_ccm_encrypt_mac()
117 aead_op->ad, aead_op->ad_len, op->in_buf, in do_ccm_encrypt_mac()
118 op->in_len, &ccm) == TC_CRYPTO_FAIL) { in do_ccm_encrypt_mac()
129 memcpy(aead_op->tag, op->out_buf + op->in_len, ccm.mlen); in do_ccm_encrypt_mac()
136 op->out_len = op->in_len + ccm.mlen; in do_ccm_encrypt_mac()
147 struct cipher_pkt *op = aead_op->pkt; in do_ccm_decrypt_auth() local
160 if (aead_op->tag != op->in_buf + op->in_len) { in do_ccm_decrypt_auth()
165 if (tc_ccm_decryption_verification(op->out_buf, op->out_buf_max, in do_ccm_decrypt_auth()
167 op->in_buf, in do_ccm_decrypt_auth()
168 op->in_len + ccm_param->tag_len, in do_ccm_decrypt_auth()
174 op->out_len = op->in_len + ccm_param->tag_len; in do_ccm_decrypt_auth()