Lines Matching refs:in

99 static size_t cts128_cs1_encrypt(PROV_CIPHER_CTX *ctx, const unsigned char *in,  in cts128_cs1_encrypt()  argument
107 if (!ctx->hw->cipher(ctx, out, in, len)) in cts128_cs1_encrypt()
113 in += len; in cts128_cs1_encrypt()
117 memcpy(tmp_in.c, in, residue); in cts128_cs1_encrypt()
133 static size_t cts128_cs1_decrypt(PROV_CIPHER_CTX *ctx, const unsigned char *in, in cts128_cs1_decrypt() argument
142 if (!ctx->hw->cipher(ctx, out, in, len)) in cts128_cs1_decrypt()
149 if (!ctx->hw->cipher(ctx, out, in, len)) in cts128_cs1_decrypt()
151 in += len; in cts128_cs1_decrypt()
157 memcpy(cn.c, in + residue, CTS_BLOCK_SIZE); in cts128_cs1_decrypt()
161 if (!ctx->hw->cipher(ctx, pt_last.c, in + residue, CTS_BLOCK_SIZE)) in cts128_cs1_decrypt()
169 memcpy(ct_mid.c, in, residue); in cts128_cs1_decrypt()
195 static size_t cts128_cs3_encrypt(PROV_CIPHER_CTX *ctx, const unsigned char *in, in cts128_cs3_encrypt() argument
206 return ctx->hw->cipher(ctx, out, in, len) ? len : 0; in cts128_cs3_encrypt()
213 if (!ctx->hw->cipher(ctx, out, in, len)) in cts128_cs3_encrypt()
216 in += len; in cts128_cs3_encrypt()
220 memcpy(tmp_in.c, in, residue); in cts128_cs3_encrypt()
235 static size_t cts128_cs3_decrypt(PROV_CIPHER_CTX *ctx, const unsigned char *in, in cts128_cs3_decrypt() argument
246 return ctx->hw->cipher(ctx, out, in, len) ? len : 0; in cts128_cs3_decrypt()
255 if (!ctx->hw->cipher(ctx, out, in, len)) in cts128_cs3_decrypt()
257 in += len; in cts128_cs3_decrypt()
263 memcpy(cn.c, in, CTS_BLOCK_SIZE); in cts128_cs3_decrypt()
267 if (!ctx->hw->cipher(ctx, pt_last.c, in, CTS_BLOCK_SIZE)) in cts128_cs3_decrypt()
275 memcpy(ct_mid.c, in + CTS_BLOCK_SIZE, residue); in cts128_cs3_decrypt()
301 static size_t cts128_cs2_encrypt(PROV_CIPHER_CTX *ctx, const unsigned char *in, in cts128_cs2_encrypt() argument
306 if (!ctx->hw->cipher(ctx, out, in, len)) in cts128_cs2_encrypt()
311 return cts128_cs3_encrypt(ctx, in, out, len); in cts128_cs2_encrypt()
314 static size_t cts128_cs2_decrypt(PROV_CIPHER_CTX *ctx, const unsigned char *in, in cts128_cs2_decrypt() argument
319 if (!ctx->hw->cipher(ctx, out, in, len)) in cts128_cs2_decrypt()
324 return cts128_cs3_decrypt(ctx, in, out, len); in cts128_cs2_decrypt()
328 size_t outsize, const unsigned char *in, in ossl_cipher_cbc_cts_block_update() argument
352 sz = cts128_cs1_encrypt(ctx, in, out, inl); in ossl_cipher_cbc_cts_block_update()
354 sz = cts128_cs2_encrypt(ctx, in, out, inl); in ossl_cipher_cbc_cts_block_update()
356 sz = cts128_cs3_encrypt(ctx, in, out, inl); in ossl_cipher_cbc_cts_block_update()
359 sz = cts128_cs1_decrypt(ctx, in, out, inl); in ossl_cipher_cbc_cts_block_update()
361 sz = cts128_cs2_decrypt(ctx, in, out, inl); in ossl_cipher_cbc_cts_block_update()
363 sz = cts128_cs3_decrypt(ctx, in, out, inl); in ossl_cipher_cbc_cts_block_update()