Home
last modified time | relevance | path

Searched refs:ctr_ctx (Results 1 – 5 of 5) sorted by relevance

/titanic_50/usr/src/common/crypto/modes/
H A Dctr.c207 ctr_init_ctx(ctr_ctx_t *ctr_ctx, ulong_t count, uint8_t *cb, in ctr_init_ctx() argument
225 ctr_ctx->ctr_lower_mask = htonll(lower_mask); in ctr_init_ctx()
226 ctr_ctx->ctr_upper_mask = htonll(upper_mask); in ctr_init_ctx()
228 copy_block(cb, (uchar_t *)ctr_ctx->ctr_cb); in ctr_init_ctx()
229 ctr_ctx->ctr_lastp = (uint8_t *)&ctr_ctx->ctr_cb[0]; in ctr_init_ctx()
230 ctr_ctx->ctr_flags |= CTR_MODE; in ctr_init_ctx()
238 ctr_ctx_t *ctr_ctx; in ctr_alloc_ctx() local
241 if ((ctr_ctx = kmem_zalloc(sizeof (ctr_ctx_t), kmflag)) == NULL) in ctr_alloc_ctx()
243 if ((ctr_ctx = calloc(1, sizeof (ctr_ctx_t))) == NULL) in ctr_alloc_ctx()
247 ctr_ctx->ctr_flags = CTR_MODE; in ctr_alloc_ctx()
[all …]
H A Dmodes.h121 typedef struct ctr_ctx { struct
/titanic_50/usr/src/lib/pkcs11/pkcs11_softtoken/common/
H A DsoftAESCrypt.c852 ctr_ctx_t *ctr_ctx; in aes_ctr_ctx_init() local
858 if ((ctr_ctx = calloc(1, sizeof (ctr_ctx_t))) == NULL) in aes_ctr_ctx_init()
861 ctr_ctx->ctr_keysched = key_sched; in aes_ctr_ctx_init()
862 ctr_ctx->ctr_keysched_len = size; in aes_ctr_ctx_init()
864 if (ctr_init_ctx(ctr_ctx, pp->ulCounterBits, pp->cb, aes_copy_block) in aes_ctr_ctx_init()
866 free(ctr_ctx); in aes_ctr_ctx_init()
870 return (ctr_ctx); in aes_ctr_ctx_init()
H A DsoftDecryptUtil.c759 ctr_ctx_t *ctr_ctx; in soft_decrypt_final() local
763 ctr_ctx = soft_aes_ctx->aes_cbc; in soft_decrypt_final()
764 len = ctr_ctx->ctr_remainder_len; in soft_decrypt_final()
776 rv = ctr_mode_final(ctr_ctx, &out, aes_encrypt_block); in soft_decrypt_final()
786 free(ctr_ctx); in soft_decrypt_final()
H A DsoftEncryptUtil.c750 ctr_ctx_t *ctr_ctx; in soft_encrypt_final() local
754 ctr_ctx = soft_aes_ctx->aes_cbc; in soft_encrypt_final()
755 len = ctr_ctx->ctr_remainder_len; in soft_encrypt_final()
768 rv = ctr_mode_final(ctr_ctx, &out, aes_encrypt_block); in soft_encrypt_final()
776 free(ctr_ctx); in soft_encrypt_final()