Lines Matching refs:encrypt

111 STATIC void aes_final_set_key_impl(AES_CTX_IMPL *ctx, bool encrypt) {  in aes_final_set_key_impl()  argument
112 if (!encrypt) { in aes_final_set_key_impl()
117 …void aes_process_ecb_impl(AES_CTX_IMPL *ctx, const uint8_t in[16], uint8_t out[16], bool encrypt) { in aes_process_ecb_impl() argument
125 if (encrypt) { in aes_process_ecb_impl()
135 …process_cbc_impl(AES_CTX_IMPL *ctx, const uint8_t *in, uint8_t *out, size_t in_len, bool encrypt) { in aes_process_cbc_impl() argument
136 if (encrypt) { in aes_process_cbc_impl()
181 STATIC void aes_final_set_key_impl(AES_CTX_IMPL *ctx, bool encrypt) { in aes_final_set_key_impl() argument
191 if (encrypt) { in aes_final_set_key_impl()
198 …void aes_process_ecb_impl(AES_CTX_IMPL *ctx, const uint8_t in[16], uint8_t out[16], bool encrypt) { in aes_process_ecb_impl() argument
199 …mbedtls_aes_crypt_ecb(&ctx->u.mbedtls_ctx, encrypt ? MBEDTLS_AES_ENCRYPT : MBEDTLS_AES_DECRYPT, in… in aes_process_ecb_impl()
202 …process_cbc_impl(AES_CTX_IMPL *ctx, const uint8_t *in, uint8_t *out, size_t in_len, bool encrypt) { in aes_process_cbc_impl() argument
203 …mbedtls_aes_crypt_cbc(&ctx->u.mbedtls_ctx, encrypt ? MBEDTLS_AES_ENCRYPT : MBEDTLS_AES_DECRYPT, in… in aes_process_cbc_impl()
264 STATIC mp_obj_t aes_process(size_t n_args, const mp_obj_t *args, bool encrypt) { in aes_process() argument
297 const bool encrypt_mode = encrypt || is_ctr_mode(self->block_mode); in aes_process()
299 self->key_type = encrypt ? AES_KEYTYPE_ENC : AES_KEYTYPE_DEC; in aes_process()
301 if ((encrypt && self->key_type == AES_KEYTYPE_DEC) || in aes_process()
302 (!encrypt && self->key_type == AES_KEYTYPE_ENC)) { in aes_process()
313 aes_process_ecb_impl(&self->ctx, in, out, encrypt); in aes_process()
319 aes_process_cbc_impl(&self->ctx, in_bufinfo.buf, out_buf_ptr, in_bufinfo.len, encrypt); in aes_process()