Lines Matching defs:soft_aes_ctx

76 	soft_aes_ctx_t *soft_aes_ctx;
78 soft_aes_ctx = calloc(1, sizeof (soft_aes_ctx_t));
79 if (soft_aes_ctx == NULL) {
83 soft_aes_ctx->key_sched = aes_alloc_keysched(&size, 0);
84 if (soft_aes_ctx->key_sched == NULL) {
85 free(soft_aes_ctx);
89 soft_aes_ctx->keysched_len = size;
109 free(soft_aes_ctx->key_sched);
110 free(soft_aes_ctx);
126 (void) memcpy(soft_aes_ctx->key_sched, OBJ_KEY_SCHED(key_p),
128 soft_aes_ctx->keysched_len = OBJ_KEY_SCHED_LEN(key_p);
137 (OBJ_SEC_VALUE_LEN(key_p) * 8), soft_aes_ctx->key_sched);
140 (OBJ_SEC_VALUE_LEN(key_p) * 8), soft_aes_ctx->key_sched);
144 soft_set_session_context(session_p, op, soft_aes_ctx, pMechanism);
181 soft_aes_ctx_t *soft_aes_ctx =
261 total_len = soft_aes_ctx->remain_len + ulDataLen;
278 (void) memcpy(soft_aes_ctx->data +
279 soft_aes_ctx->remain_len, pData, ulDataLen);
280 soft_aes_ctx->remain_len += ulDataLen;
312 if (soft_aes_ctx->remain_len != 0) {
317 (void) memmove(pEncrypted + soft_aes_ctx->remain_len,
318 pData, out_len - soft_aes_ctx->remain_len);
319 (void) memcpy(pEncrypted, soft_aes_ctx->data,
320 soft_aes_ctx->remain_len);
321 bzero(soft_aes_ctx->data, soft_aes_ctx->remain_len);
358 soft_aes_ctx->key_sched,
378 (aes_ctx_t *)soft_aes_ctx->mode_ctx,
394 (void) memcpy(soft_aes_ctx->data, pData +
396 soft_aes_ctx->remain_len = remain;
416 (aes_ctx_t *)soft_aes_ctx->mode_ctx,
431 (void) memcpy(soft_aes_ctx->data, pData +
433 soft_aes_ctx->remain_len = remain;
456 (aes_ctx_t *)soft_aes_ctx->mode_ctx,
482 rc = aes_encrypt_contiguous_blocks(soft_aes_ctx->mode_ctx,
504 aes_ctx = (aes_ctx_t *)soft_aes_ctx->mode_ctx;
507 free(soft_aes_ctx->mode_ctx);
510 bzero(soft_aes_ctx->key_sched, soft_aes_ctx->keysched_len);
511 free(soft_aes_ctx->key_sched);
553 soft_aes_ctx_t *soft_aes_ctx =
619 total_len = soft_aes_ctx->remain_len + ulEncryptedLen;
636 (void) memcpy(soft_aes_ctx->data +
637 soft_aes_ctx->remain_len,
639 soft_aes_ctx->remain_len += ulEncryptedLen;
686 if (soft_aes_ctx->remain_len != 0) {
691 (void) memmove(pData + soft_aes_ctx->remain_len,
692 pEncrypted, out_len - soft_aes_ctx->remain_len);
693 (void) memcpy(pData, soft_aes_ctx->data,
694 soft_aes_ctx->remain_len);
695 bzero(soft_aes_ctx->data, soft_aes_ctx->remain_len);
732 soft_aes_ctx->key_sched,
752 (aes_ctx_t *)soft_aes_ctx->mode_ctx,
768 (void) memcpy(soft_aes_ctx->data, pEncrypted +
770 soft_aes_ctx->remain_len = remain;
793 (aes_ctx_t *)soft_aes_ctx->mode_ctx,
811 (aes_ctx_t *)soft_aes_ctx->mode_ctx,
846 (void) memcpy(soft_aes_ctx->data, pEncrypted +
848 soft_aes_ctx->remain_len = remain;
870 rc = aes_decrypt_contiguous_blocks(soft_aes_ctx->mode_ctx,
892 aes_ctx = (aes_ctx_t *)soft_aes_ctx->mode_ctx;
895 free(soft_aes_ctx->mode_ctx);
898 bzero(soft_aes_ctx->key_sched, soft_aes_ctx->keysched_len);
899 free(soft_aes_ctx->key_sched);