Lines Matching refs:md

61     sctx->md = sctx->head;  in aesni_cbc_hmac_sha256_init_key()
182 memcpy(blocks[0].c, sctx->md.data, 8); in tls1_multi_block_encrypt()
192 mctx->A[i] = sctx->md.h[0]; in tls1_multi_block_encrypt()
193 mctx->B[i] = sctx->md.h[1]; in tls1_multi_block_encrypt()
194 mctx->C[i] = sctx->md.h[2]; in tls1_multi_block_encrypt()
195 mctx->D[i] = sctx->md.h[3]; in tls1_multi_block_encrypt()
196 mctx->E[i] = sctx->md.h[4]; in tls1_multi_block_encrypt()
197 mctx->F[i] = sctx->md.h[5]; in tls1_multi_block_encrypt()
198 mctx->G[i] = sctx->md.h[6]; in tls1_multi_block_encrypt()
199 mctx->H[i] = sctx->md.h[7]; in tls1_multi_block_encrypt()
206 blocks[i].c[j] = ((u8 *)sctx->md.data)[j] + carry; in tls1_multi_block_encrypt()
210 blocks[i].c[8] = ((u8 *)sctx->md.data)[8]; in tls1_multi_block_encrypt()
211 blocks[i].c[9] = ((u8 *)sctx->md.data)[9]; in tls1_multi_block_encrypt()
212 blocks[i].c[10] = ((u8 *)sctx->md.data)[10]; in tls1_multi_block_encrypt()
375 out0[0] = ((u8 *)sctx->md.data)[8]; in tls1_multi_block_encrypt()
376 out0[1] = ((u8 *)sctx->md.data)[9]; in tls1_multi_block_encrypt()
377 out0[2] = ((u8 *)sctx->md.data)[10]; in tls1_multi_block_encrypt()
405 size_t sha_off = SHA256_CBLOCK - sctx->md.num; in aesni_cbc_hmac_sha256_cipher()
438 sha256_update(&sctx->md, in + iv, sha_off); in aesni_cbc_hmac_sha256_cipher()
442 &sctx->md, in + iv + sha_off); in aesni_cbc_hmac_sha256_cipher()
446 sctx->md.Nh += blocks >> 29; in aesni_cbc_hmac_sha256_cipher()
447 sctx->md.Nl += blocks <<= 3; in aesni_cbc_hmac_sha256_cipher()
448 if (sctx->md.Nl < (unsigned int)blocks) in aesni_cbc_hmac_sha256_cipher()
449 sctx->md.Nh++; in aesni_cbc_hmac_sha256_cipher()
454 sha256_update(&sctx->md, in + sha_off, plen - sha_off); in aesni_cbc_hmac_sha256_cipher()
461 SHA256_Final(out + plen, &sctx->md); in aesni_cbc_hmac_sha256_cipher()
462 sctx->md = sctx->tail; in aesni_cbc_hmac_sha256_cipher()
463 sha256_update(&sctx->md, out + plen, SHA256_DIGEST_LENGTH); in aesni_cbc_hmac_sha256_cipher()
464 SHA256_Final(out + plen, &sctx->md); in aesni_cbc_hmac_sha256_cipher()
497 } *data = (void *)sctx->md.data; in aesni_cbc_hmac_sha256_cipher()
532 sctx->md = sctx->head; in aesni_cbc_hmac_sha256_cipher()
533 sha256_update(&sctx->md, ctx->aux.tls_aad, plen); in aesni_cbc_hmac_sha256_cipher()
539 j += SHA256_CBLOCK - sctx->md.num; in aesni_cbc_hmac_sha256_cipher()
540 sha256_update(&sctx->md, out, j); in aesni_cbc_hmac_sha256_cipher()
547 bitlen = sctx->md.Nl + (inp_len << 3); /* at most 18 bits */ in aesni_cbc_hmac_sha256_cipher()
567 for (res = sctx->md.num, j = 0; j < len; j++) { in aesni_cbc_hmac_sha256_cipher()
580 sha256_block_data_order(&sctx->md, data, 1); in aesni_cbc_hmac_sha256_cipher()
582 pmac->u[0] |= sctx->md.h[0] & mask; in aesni_cbc_hmac_sha256_cipher()
583 pmac->u[1] |= sctx->md.h[1] & mask; in aesni_cbc_hmac_sha256_cipher()
584 pmac->u[2] |= sctx->md.h[2] & mask; in aesni_cbc_hmac_sha256_cipher()
585 pmac->u[3] |= sctx->md.h[3] & mask; in aesni_cbc_hmac_sha256_cipher()
586 pmac->u[4] |= sctx->md.h[4] & mask; in aesni_cbc_hmac_sha256_cipher()
587 pmac->u[5] |= sctx->md.h[5] & mask; in aesni_cbc_hmac_sha256_cipher()
588 pmac->u[6] |= sctx->md.h[6] & mask; in aesni_cbc_hmac_sha256_cipher()
589 pmac->u[7] |= sctx->md.h[7] & mask; in aesni_cbc_hmac_sha256_cipher()
599 sha256_block_data_order(&sctx->md, data, 1); in aesni_cbc_hmac_sha256_cipher()
601 pmac->u[0] |= sctx->md.h[0] & mask; in aesni_cbc_hmac_sha256_cipher()
602 pmac->u[1] |= sctx->md.h[1] & mask; in aesni_cbc_hmac_sha256_cipher()
603 pmac->u[2] |= sctx->md.h[2] & mask; in aesni_cbc_hmac_sha256_cipher()
604 pmac->u[3] |= sctx->md.h[3] & mask; in aesni_cbc_hmac_sha256_cipher()
605 pmac->u[4] |= sctx->md.h[4] & mask; in aesni_cbc_hmac_sha256_cipher()
606 pmac->u[5] |= sctx->md.h[5] & mask; in aesni_cbc_hmac_sha256_cipher()
607 pmac->u[6] |= sctx->md.h[6] & mask; in aesni_cbc_hmac_sha256_cipher()
608 pmac->u[7] |= sctx->md.h[7] & mask; in aesni_cbc_hmac_sha256_cipher()
614 sha256_block_data_order(&sctx->md, data, 1); in aesni_cbc_hmac_sha256_cipher()
616 pmac->u[0] |= sctx->md.h[0] & mask; in aesni_cbc_hmac_sha256_cipher()
617 pmac->u[1] |= sctx->md.h[1] & mask; in aesni_cbc_hmac_sha256_cipher()
618 pmac->u[2] |= sctx->md.h[2] & mask; in aesni_cbc_hmac_sha256_cipher()
619 pmac->u[3] |= sctx->md.h[3] & mask; in aesni_cbc_hmac_sha256_cipher()
620 pmac->u[4] |= sctx->md.h[4] & mask; in aesni_cbc_hmac_sha256_cipher()
621 pmac->u[5] |= sctx->md.h[5] & mask; in aesni_cbc_hmac_sha256_cipher()
622 pmac->u[6] |= sctx->md.h[6] & mask; in aesni_cbc_hmac_sha256_cipher()
623 pmac->u[7] |= sctx->md.h[7] & mask; in aesni_cbc_hmac_sha256_cipher()
644 sctx->md = sctx->tail; in aesni_cbc_hmac_sha256_cipher()
645 sha256_update(&sctx->md, pmac->c, SHA256_DIGEST_LENGTH); in aesni_cbc_hmac_sha256_cipher()
646 SHA256_Final(pmac->c, &sctx->md); in aesni_cbc_hmac_sha256_cipher()
676 sha256_update(&sctx->md, out, len); in aesni_cbc_hmac_sha256_cipher()
739 sctx->md = sctx->head; in aesni_cbc_hmac_sha256_set_tls1_aad()
740 sha256_update(&sctx->md, p, aad_len); in aesni_cbc_hmac_sha256_set_tls1_aad()
791 sctx->md = sctx->head; in aesni_cbc_hmac_sha256_tls1_multiblock_aad()
792 sha256_update(&sctx->md, param->inp, 13); in aesni_cbc_hmac_sha256_tls1_multiblock_aad()