Lines Matching refs:gk5e

180 	if (cksumout->len < kctx->gk5e->cksumlength) {  in make_checksum_hmac_md5()
182 __func__, cksumout->len, kctx->gk5e->name); in make_checksum_hmac_md5()
203 hmac_md5 = crypto_alloc_ahash(kctx->gk5e->cksum_name, 0, in make_checksum_hmac_md5()
244 err = crypto_ahash_setkey(hmac_md5, cksumkey, kctx->gk5e->keylength); in make_checksum_hmac_md5()
255 memcpy(cksumout->data, checksumdata, kctx->gk5e->cksumlength); in make_checksum_hmac_md5()
256 cksumout->len = kctx->gk5e->cksumlength; in make_checksum_hmac_md5()
287 if (kctx->gk5e->ctype == CKSUMTYPE_HMAC_MD5_ARCFOUR) in make_checksum()
292 if (cksumout->len < kctx->gk5e->cksumlength) { in make_checksum()
294 __func__, cksumout->len, kctx->gk5e->name); in make_checksum()
302 tfm = crypto_alloc_ahash(kctx->gk5e->cksum_name, 0, CRYPTO_ALG_ASYNC); in make_checksum()
316 kctx->gk5e->keylength); in make_checksum()
338 switch (kctx->gk5e->ctype) { in make_checksum()
340 err = kctx->gk5e->encrypt(kctx->seq, NULL, checksumdata, in make_checksum()
345 checksumdata + checksumlen - kctx->gk5e->cksumlength, in make_checksum()
346 kctx->gk5e->cksumlength); in make_checksum()
349 memcpy(cksumout->data, checksumdata, kctx->gk5e->cksumlength); in make_checksum()
355 cksumout->len = kctx->gk5e->cksumlength; in make_checksum()
383 if (kctx->gk5e->keyed_cksum == 0) { in make_checksum_v2()
385 __func__, kctx->gk5e->name); in make_checksum_v2()
390 __func__, kctx->gk5e->name); in make_checksum_v2()
398 tfm = crypto_alloc_ahash(kctx->gk5e->cksum_name, 0, CRYPTO_ALG_ASYNC); in make_checksum_v2()
408 err = crypto_ahash_setkey(tfm, cksumkey, kctx->gk5e->keylength); in make_checksum_v2()
431 cksumout->len = kctx->gk5e->cksumlength; in make_checksum_v2()
433 switch (kctx->gk5e->ctype) { in make_checksum_v2()
437 memcpy(cksumout->data, checksumdata, kctx->gk5e->cksumlength); in make_checksum_v2()
761 if (xdr_extend_head(buf, offset, kctx->gk5e->conflen)) in gss_krb5_aes_encrypt()
763 gss_krb5_make_confounder(buf->head[0].iov_base + offset, kctx->gk5e->conflen); in gss_krb5_aes_encrypt()
842 buf->tail[0].iov_len += kctx->gk5e->cksumlength; in gss_krb5_aes_encrypt()
843 buf->len += kctx->gk5e->cksumlength; in gss_krb5_aes_encrypt()
883 kctx->gk5e->cksumlength)); in gss_krb5_aes_decrypt()
927 ret = read_bytes_from_xdr_buf(buf, buf->len - kctx->gk5e->cksumlength, in gss_krb5_aes_decrypt()
928 pkt_hmac, kctx->gk5e->cksumlength); in gss_krb5_aes_decrypt()
932 if (crypto_memneq(pkt_hmac, our_hmac, kctx->gk5e->cksumlength) != 0) { in gss_krb5_aes_decrypt()
936 *headskip = kctx->gk5e->conflen; in gss_krb5_aes_decrypt()
937 *tailskip = kctx->gk5e->cksumlength; in gss_krb5_aes_decrypt()
960 hmac = crypto_alloc_shash(kctx->gk5e->cksum_name, 0, 0); in krb5_rc4_setup_seq_key()
963 __func__, PTR_ERR(hmac), kctx->gk5e->cksum_name); in krb5_rc4_setup_seq_key()
971 __func__, kctx->gk5e->cksum_name); in krb5_rc4_setup_seq_key()
980 err = crypto_shash_setkey(hmac, kctx->Ksess, kctx->gk5e->keylength); in krb5_rc4_setup_seq_key()
989 err = crypto_shash_setkey(hmac, Kseq, kctx->gk5e->keylength); in krb5_rc4_setup_seq_key()
997 err = crypto_skcipher_setkey(cipher, Kseq, kctx->gk5e->keylength); in krb5_rc4_setup_seq_key()
1027 hmac = crypto_alloc_shash(kctx->gk5e->cksum_name, 0, 0); in krb5_rc4_setup_enc_key()
1030 __func__, PTR_ERR(hmac), kctx->gk5e->cksum_name); in krb5_rc4_setup_enc_key()
1038 __func__, kctx->gk5e->cksum_name); in krb5_rc4_setup_enc_key()
1047 for (i = 0; i < kctx->gk5e->keylength; i++) in krb5_rc4_setup_enc_key()
1050 err = crypto_shash_setkey(hmac, Kcrypt, kctx->gk5e->keylength); in krb5_rc4_setup_enc_key()
1059 err = crypto_shash_setkey(hmac, Kcrypt, kctx->gk5e->keylength); in krb5_rc4_setup_enc_key()
1072 err = crypto_skcipher_setkey(cipher, Kcrypt, kctx->gk5e->keylength); in krb5_rc4_setup_enc_key()