Lines Matching refs:md
33 SHA_CTX head, tail, md; member
88 key->md = key->head; in aesni_cbc_hmac_sha1_init_key()
216 memcpy(blocks[0].c, key->md.data, 8); in tls1_1_multi_block_encrypt()
225 ctx->A[i] = key->md.h0; in tls1_1_multi_block_encrypt()
226 ctx->B[i] = key->md.h1; in tls1_1_multi_block_encrypt()
227 ctx->C[i] = key->md.h2; in tls1_1_multi_block_encrypt()
228 ctx->D[i] = key->md.h3; in tls1_1_multi_block_encrypt()
229 ctx->E[i] = key->md.h4; in tls1_1_multi_block_encrypt()
236 blocks[i].c[j] = ((u8 *)key->md.data)[j] + carry; in tls1_1_multi_block_encrypt()
240 blocks[i].c[8] = ((u8 *)key->md.data)[8]; in tls1_1_multi_block_encrypt()
241 blocks[i].c[9] = ((u8 *)key->md.data)[9]; in tls1_1_multi_block_encrypt()
242 blocks[i].c[10] = ((u8 *)key->md.data)[10]; in tls1_1_multi_block_encrypt()
390 out0[0] = ((u8 *)key->md.data)[8]; in tls1_1_multi_block_encrypt()
391 out0[1] = ((u8 *)key->md.data)[9]; in tls1_1_multi_block_encrypt()
392 out0[2] = ((u8 *)key->md.data)[10]; in tls1_1_multi_block_encrypt()
420 sha_off = SHA_CBLOCK - key->md.num; in aesni_cbc_hmac_sha1_cipher()
441 SHA1_Update(&key->md, in + iv, sha_off); in aesni_cbc_hmac_sha1_cipher()
444 &key->md, in + iv + sha_off); in aesni_cbc_hmac_sha1_cipher()
448 key->md.Nh += blocks >> 29; in aesni_cbc_hmac_sha1_cipher()
449 key->md.Nl += blocks <<= 3; in aesni_cbc_hmac_sha1_cipher()
450 if (key->md.Nl < (unsigned int)blocks) in aesni_cbc_hmac_sha1_cipher()
451 key->md.Nh++; in aesni_cbc_hmac_sha1_cipher()
457 SHA1_Update(&key->md, in + sha_off, plen - sha_off); in aesni_cbc_hmac_sha1_cipher()
464 SHA1_Final(out + plen, &key->md); in aesni_cbc_hmac_sha1_cipher()
465 key->md = key->tail; in aesni_cbc_hmac_sha1_cipher()
466 SHA1_Update(&key->md, out + plen, SHA_DIGEST_LENGTH); in aesni_cbc_hmac_sha1_cipher()
467 SHA1_Final(out + plen, &key->md); in aesni_cbc_hmac_sha1_cipher()
496 } *data = (void *)key->md.data; in aesni_cbc_hmac_sha1_cipher()
559 key->md = key->head; in aesni_cbc_hmac_sha1_cipher()
560 SHA1_Update(&key->md, key->aux.tls_aad, plen); in aesni_cbc_hmac_sha1_cipher()
570 SHA1_Update(&key->md, out, sha_off); in aesni_cbc_hmac_sha1_cipher()
573 ctx->iv, &key->md, out + sha_off); in aesni_cbc_hmac_sha1_cipher()
580 key->md.Nl += (blocks << 3); /* at most 18 bits */ in aesni_cbc_hmac_sha1_cipher()
589 j += SHA_CBLOCK - key->md.num; in aesni_cbc_hmac_sha1_cipher()
590 SHA1_Update(&key->md, out, j); in aesni_cbc_hmac_sha1_cipher()
597 bitlen = key->md.Nl + (inp_len << 3); /* at most 18 bits */ in aesni_cbc_hmac_sha1_cipher()
614 for (res = key->md.num, j = 0; j < len; j++) { in aesni_cbc_hmac_sha1_cipher()
627 sha1_block_data_order(&key->md, data, 1); in aesni_cbc_hmac_sha1_cipher()
629 pmac->u[0] |= key->md.h0 & mask; in aesni_cbc_hmac_sha1_cipher()
630 pmac->u[1] |= key->md.h1 & mask; in aesni_cbc_hmac_sha1_cipher()
631 pmac->u[2] |= key->md.h2 & mask; in aesni_cbc_hmac_sha1_cipher()
632 pmac->u[3] |= key->md.h3 & mask; in aesni_cbc_hmac_sha1_cipher()
633 pmac->u[4] |= key->md.h4 & mask; in aesni_cbc_hmac_sha1_cipher()
643 sha1_block_data_order(&key->md, data, 1); in aesni_cbc_hmac_sha1_cipher()
645 pmac->u[0] |= key->md.h0 & mask; in aesni_cbc_hmac_sha1_cipher()
646 pmac->u[1] |= key->md.h1 & mask; in aesni_cbc_hmac_sha1_cipher()
647 pmac->u[2] |= key->md.h2 & mask; in aesni_cbc_hmac_sha1_cipher()
648 pmac->u[3] |= key->md.h3 & mask; in aesni_cbc_hmac_sha1_cipher()
649 pmac->u[4] |= key->md.h4 & mask; in aesni_cbc_hmac_sha1_cipher()
655 sha1_block_data_order(&key->md, data, 1); in aesni_cbc_hmac_sha1_cipher()
657 pmac->u[0] |= key->md.h0 & mask; in aesni_cbc_hmac_sha1_cipher()
658 pmac->u[1] |= key->md.h1 & mask; in aesni_cbc_hmac_sha1_cipher()
659 pmac->u[2] |= key->md.h2 & mask; in aesni_cbc_hmac_sha1_cipher()
660 pmac->u[3] |= key->md.h3 & mask; in aesni_cbc_hmac_sha1_cipher()
661 pmac->u[4] |= key->md.h4 & mask; in aesni_cbc_hmac_sha1_cipher()
680 SHA1_Update(&key->md, out, inp_len); in aesni_cbc_hmac_sha1_cipher()
681 res = key->md.num; in aesni_cbc_hmac_sha1_cipher()
682 SHA1_Final(pmac->c, &key->md); in aesni_cbc_hmac_sha1_cipher()
696 sha1_block_data_order(&key->md, data, 1); in aesni_cbc_hmac_sha1_cipher()
699 key->md = key->tail; in aesni_cbc_hmac_sha1_cipher()
700 SHA1_Update(&key->md, pmac->c, SHA_DIGEST_LENGTH); in aesni_cbc_hmac_sha1_cipher()
701 SHA1_Final(pmac->c, &key->md); in aesni_cbc_hmac_sha1_cipher()
752 SHA1_Update(&key->md, out, sha_off); in aesni_cbc_hmac_sha1_cipher()
755 ctx->iv, &key->md, out + sha_off); in aesni_cbc_hmac_sha1_cipher()
761 key->md.Nh += blocks >> 29; in aesni_cbc_hmac_sha1_cipher()
762 key->md.Nl += blocks <<= 3; in aesni_cbc_hmac_sha1_cipher()
763 if (key->md.Nl < (unsigned int)blocks) in aesni_cbc_hmac_sha1_cipher()
764 key->md.Nh++; in aesni_cbc_hmac_sha1_cipher()
771 SHA1_Update(&key->md, out, len); in aesni_cbc_hmac_sha1_cipher()
833 key->md = key->head; in aesni_cbc_hmac_sha1_ctrl()
834 SHA1_Update(&key->md, p, arg); in aesni_cbc_hmac_sha1_ctrl()
876 key->md = key->head; in aesni_cbc_hmac_sha1_ctrl()
877 SHA1_Update(&key->md, param->inp, 13); in aesni_cbc_hmac_sha1_ctrl()