Lines Matching refs:md

59     sctx->md = sctx->head;  in aesni_cbc_hmac_sha1_init_key()
178 memcpy(blocks[0].c, sctx->md.data, 8); in tls1_multi_block_encrypt()
187 mctx->A[i] = sctx->md.h0; in tls1_multi_block_encrypt()
188 mctx->B[i] = sctx->md.h1; in tls1_multi_block_encrypt()
189 mctx->C[i] = sctx->md.h2; in tls1_multi_block_encrypt()
190 mctx->D[i] = sctx->md.h3; in tls1_multi_block_encrypt()
191 mctx->E[i] = sctx->md.h4; in tls1_multi_block_encrypt()
198 blocks[i].c[j] = ((u8 *)sctx->md.data)[j] + carry; in tls1_multi_block_encrypt()
202 blocks[i].c[8] = ((u8 *)sctx->md.data)[8]; in tls1_multi_block_encrypt()
203 blocks[i].c[9] = ((u8 *)sctx->md.data)[9]; in tls1_multi_block_encrypt()
204 blocks[i].c[10] = ((u8 *)sctx->md.data)[10]; in tls1_multi_block_encrypt()
352 out0[0] = ((u8 *)sctx->md.data)[8]; in tls1_multi_block_encrypt()
353 out0[1] = ((u8 *)sctx->md.data)[9]; in tls1_multi_block_encrypt()
354 out0[2] = ((u8 *)sctx->md.data)[10]; in tls1_multi_block_encrypt()
382 size_t sha_off = SHA_CBLOCK - sctx->md.num; in aesni_cbc_hmac_sha1_cipher()
401 sha1_update(&sctx->md, in + iv, sha_off); in aesni_cbc_hmac_sha1_cipher()
404 &sctx->md, in + iv + sha_off); in aesni_cbc_hmac_sha1_cipher()
408 sctx->md.Nh += blocks >> 29; in aesni_cbc_hmac_sha1_cipher()
409 sctx->md.Nl += blocks <<= 3; in aesni_cbc_hmac_sha1_cipher()
410 if (sctx->md.Nl < (unsigned int)blocks) in aesni_cbc_hmac_sha1_cipher()
411 sctx->md.Nh++; in aesni_cbc_hmac_sha1_cipher()
416 sha1_update(&sctx->md, in + sha_off, plen - sha_off); in aesni_cbc_hmac_sha1_cipher()
423 SHA1_Final(out + plen, &sctx->md); in aesni_cbc_hmac_sha1_cipher()
424 sctx->md = sctx->tail; in aesni_cbc_hmac_sha1_cipher()
425 sha1_update(&sctx->md, out + plen, SHA_DIGEST_LENGTH); in aesni_cbc_hmac_sha1_cipher()
426 SHA1_Final(out + plen, &sctx->md); in aesni_cbc_hmac_sha1_cipher()
455 } *data = (void *)sctx->md.data; in aesni_cbc_hmac_sha1_cipher()
496 sctx->md = sctx->head; in aesni_cbc_hmac_sha1_cipher()
497 sha1_update(&sctx->md, ctx->aux.tls_aad, plen); in aesni_cbc_hmac_sha1_cipher()
503 j += SHA_CBLOCK - sctx->md.num; in aesni_cbc_hmac_sha1_cipher()
504 sha1_update(&sctx->md, out, j); in aesni_cbc_hmac_sha1_cipher()
511 bitlen = sctx->md.Nl + (inp_len << 3); /* at most 18 bits */ in aesni_cbc_hmac_sha1_cipher()
528 for (res = sctx->md.num, j = 0; j < len; j++) { in aesni_cbc_hmac_sha1_cipher()
541 sha1_block_data_order(&sctx->md, data, 1); in aesni_cbc_hmac_sha1_cipher()
543 pmac->u[0] |= sctx->md.h0 & mask; in aesni_cbc_hmac_sha1_cipher()
544 pmac->u[1] |= sctx->md.h1 & mask; in aesni_cbc_hmac_sha1_cipher()
545 pmac->u[2] |= sctx->md.h2 & mask; in aesni_cbc_hmac_sha1_cipher()
546 pmac->u[3] |= sctx->md.h3 & mask; in aesni_cbc_hmac_sha1_cipher()
547 pmac->u[4] |= sctx->md.h4 & mask; in aesni_cbc_hmac_sha1_cipher()
557 sha1_block_data_order(&sctx->md, data, 1); in aesni_cbc_hmac_sha1_cipher()
559 pmac->u[0] |= sctx->md.h0 & mask; in aesni_cbc_hmac_sha1_cipher()
560 pmac->u[1] |= sctx->md.h1 & mask; in aesni_cbc_hmac_sha1_cipher()
561 pmac->u[2] |= sctx->md.h2 & mask; in aesni_cbc_hmac_sha1_cipher()
562 pmac->u[3] |= sctx->md.h3 & mask; in aesni_cbc_hmac_sha1_cipher()
563 pmac->u[4] |= sctx->md.h4 & mask; in aesni_cbc_hmac_sha1_cipher()
569 sha1_block_data_order(&sctx->md, data, 1); in aesni_cbc_hmac_sha1_cipher()
571 pmac->u[0] |= sctx->md.h0 & mask; in aesni_cbc_hmac_sha1_cipher()
572 pmac->u[1] |= sctx->md.h1 & mask; in aesni_cbc_hmac_sha1_cipher()
573 pmac->u[2] |= sctx->md.h2 & mask; in aesni_cbc_hmac_sha1_cipher()
574 pmac->u[3] |= sctx->md.h3 & mask; in aesni_cbc_hmac_sha1_cipher()
575 pmac->u[4] |= sctx->md.h4 & mask; in aesni_cbc_hmac_sha1_cipher()
593 sctx->md = sctx->tail; in aesni_cbc_hmac_sha1_cipher()
594 sha1_update(&sctx->md, pmac->c, SHA_DIGEST_LENGTH); in aesni_cbc_hmac_sha1_cipher()
595 SHA1_Final(pmac->c, &sctx->md); in aesni_cbc_hmac_sha1_cipher()
624 sha1_update(&sctx->md, out, len); in aesni_cbc_hmac_sha1_cipher()
686 sctx->md = sctx->head; in aesni_cbc_hmac_sha1_set_tls1_aad()
687 sha1_update(&sctx->md, p, aad_len); in aesni_cbc_hmac_sha1_set_tls1_aad()
739 sctx->md = sctx->head; in aesni_cbc_hmac_sha1_tls1_multiblock_aad()
740 sha1_update(&sctx->md, param->inp, 13); in aesni_cbc_hmac_sha1_tls1_multiblock_aad()