Lines Matching refs:gk5e

166 	if (cksumout->len < kctx->gk5e->cksumlength) {  in make_checksum_hmac_md5()
168 __func__, cksumout->len, kctx->gk5e->name); in make_checksum_hmac_md5()
181 hmac_md5 = crypto_alloc_hash(kctx->gk5e->cksum_name, 0, in make_checksum_hmac_md5()
217 err = crypto_hash_setkey(hmac_md5, cksumkey, kctx->gk5e->keylength); in make_checksum_hmac_md5()
227 memcpy(cksumout->data, checksumdata, kctx->gk5e->cksumlength); in make_checksum_hmac_md5()
228 cksumout->len = kctx->gk5e->cksumlength; in make_checksum_hmac_md5()
251 if (kctx->gk5e->ctype == CKSUMTYPE_HMAC_MD5_ARCFOUR) in make_checksum()
256 if (cksumout->len < kctx->gk5e->cksumlength) { in make_checksum()
258 __func__, cksumout->len, kctx->gk5e->name); in make_checksum()
262 desc.tfm = crypto_alloc_hash(kctx->gk5e->cksum_name, 0, CRYPTO_ALG_ASYNC); in make_checksum()
271 kctx->gk5e->keylength); in make_checksum()
291 switch (kctx->gk5e->ctype) { in make_checksum()
293 err = kctx->gk5e->encrypt(kctx->seq, NULL, checksumdata, in make_checksum()
298 checksumdata + checksumlen - kctx->gk5e->cksumlength, in make_checksum()
299 kctx->gk5e->cksumlength); in make_checksum()
302 memcpy(cksumout->data, checksumdata, kctx->gk5e->cksumlength); in make_checksum()
308 cksumout->len = kctx->gk5e->cksumlength; in make_checksum()
332 if (kctx->gk5e->keyed_cksum == 0) { in make_checksum_v2()
334 __func__, kctx->gk5e->name); in make_checksum_v2()
339 __func__, kctx->gk5e->name); in make_checksum_v2()
343 desc.tfm = crypto_alloc_hash(kctx->gk5e->cksum_name, 0, in make_checksum_v2()
350 err = crypto_hash_setkey(desc.tfm, cksumkey, kctx->gk5e->keylength); in make_checksum_v2()
371 cksumout->len = kctx->gk5e->cksumlength; in make_checksum_v2()
373 switch (kctx->gk5e->ctype) { in make_checksum_v2()
377 memcpy(cksumout->data, checksumdata, kctx->gk5e->cksumlength); in make_checksum_v2()
673 if (xdr_extend_head(buf, offset, kctx->gk5e->conflen)) in gss_krb5_aes_encrypt()
675 gss_krb5_make_confounder(buf->head[0].iov_base + offset, kctx->gk5e->conflen); in gss_krb5_aes_encrypt()
750 buf->tail[0].iov_len += kctx->gk5e->cksumlength; in gss_krb5_aes_encrypt()
751 buf->len += kctx->gk5e->cksumlength; in gss_krb5_aes_encrypt()
791 kctx->gk5e->cksumlength)); in gss_krb5_aes_decrypt()
831 ret = read_bytes_from_xdr_buf(buf, buf->len - kctx->gk5e->cksumlength, in gss_krb5_aes_decrypt()
832 pkt_hmac, kctx->gk5e->cksumlength); in gss_krb5_aes_decrypt()
836 if (memcmp(pkt_hmac, our_hmac, kctx->gk5e->cksumlength) != 0) { in gss_krb5_aes_decrypt()
840 *headskip = kctx->gk5e->conflen; in gss_krb5_aes_decrypt()
841 *tailskip = kctx->gk5e->cksumlength; in gss_krb5_aes_decrypt()
865 hmac = crypto_alloc_hash(kctx->gk5e->cksum_name, 0, CRYPTO_ALG_ASYNC); in krb5_rc4_setup_seq_key()
868 __func__, PTR_ERR(hmac), kctx->gk5e->cksum_name); in krb5_rc4_setup_seq_key()
880 err = crypto_hash_setkey(hmac, kctx->Ksess, kctx->gk5e->keylength); in krb5_rc4_setup_seq_key()
892 err = crypto_hash_setkey(hmac, Kseq, kctx->gk5e->keylength); in krb5_rc4_setup_seq_key()
902 err = crypto_blkcipher_setkey(cipher, Kseq, kctx->gk5e->keylength); in krb5_rc4_setup_seq_key()
932 hmac = crypto_alloc_hash(kctx->gk5e->cksum_name, 0, CRYPTO_ALG_ASYNC); in krb5_rc4_setup_enc_key()
935 __func__, PTR_ERR(hmac), kctx->gk5e->cksum_name); in krb5_rc4_setup_enc_key()
947 for (i = 0; i < kctx->gk5e->keylength; i++) in krb5_rc4_setup_enc_key()
950 err = crypto_hash_setkey(hmac, Kcrypt, kctx->gk5e->keylength); in krb5_rc4_setup_enc_key()
962 err = crypto_hash_setkey(hmac, Kcrypt, kctx->gk5e->keylength); in krb5_rc4_setup_enc_key()
977 err = crypto_blkcipher_setkey(cipher, Kcrypt, kctx->gk5e->keylength); in krb5_rc4_setup_enc_key()