Lines Matching refs:kctx

211 make_checksum(struct krb5_ctx *kctx, char *header, int hdrlen,  in make_checksum()  argument
222 if (cksumout->len < kctx->gk5e->cksumlength) { in make_checksum()
224 __func__, cksumout->len, kctx->gk5e->name); in make_checksum()
232 tfm = crypto_alloc_ahash(kctx->gk5e->cksum_name, 0, CRYPTO_ALG_ASYNC); in make_checksum()
246 kctx->gk5e->keylength); in make_checksum()
268 switch (kctx->gk5e->ctype) { in make_checksum()
270 err = krb5_encrypt(kctx->seq, NULL, checksumdata, in make_checksum()
275 checksumdata + checksumlen - kctx->gk5e->cksumlength, in make_checksum()
276 kctx->gk5e->cksumlength); in make_checksum()
279 memcpy(cksumout->data, checksumdata, kctx->gk5e->cksumlength); in make_checksum()
285 cksumout->len = kctx->gk5e->cksumlength; in make_checksum()
781 gss_krb5_aes_encrypt(struct krb5_ctx *kctx, u32 offset, in gss_krb5_aes_encrypt() argument
792 if (kctx->initiate) { in gss_krb5_aes_encrypt()
793 cipher = kctx->initiator_enc; in gss_krb5_aes_encrypt()
794 aux_cipher = kctx->initiator_enc_aux; in gss_krb5_aes_encrypt()
795 ahash = kctx->initiator_integ; in gss_krb5_aes_encrypt()
797 cipher = kctx->acceptor_enc; in gss_krb5_aes_encrypt()
798 aux_cipher = kctx->acceptor_enc_aux; in gss_krb5_aes_encrypt()
799 ahash = kctx->acceptor_integ; in gss_krb5_aes_encrypt()
824 hmac.len = kctx->gk5e->cksumlength; in gss_krb5_aes_encrypt()
850 buf->tail[0].iov_len += kctx->gk5e->cksumlength; in gss_krb5_aes_encrypt()
851 buf->len += kctx->gk5e->cksumlength; in gss_krb5_aes_encrypt()
857 gss_krb5_aes_decrypt(struct krb5_ctx *kctx, u32 offset, u32 len, in gss_krb5_aes_decrypt() argument
868 if (kctx->initiate) { in gss_krb5_aes_decrypt()
869 cipher = kctx->acceptor_enc; in gss_krb5_aes_decrypt()
870 aux_cipher = kctx->acceptor_enc_aux; in gss_krb5_aes_decrypt()
871 ahash = kctx->acceptor_integ; in gss_krb5_aes_decrypt()
873 cipher = kctx->initiator_enc; in gss_krb5_aes_decrypt()
874 aux_cipher = kctx->initiator_enc_aux; in gss_krb5_aes_decrypt()
875 ahash = kctx->initiator_integ; in gss_krb5_aes_decrypt()
881 kctx->gk5e->cksumlength)); in gss_krb5_aes_decrypt()
887 our_hmac_obj.len = kctx->gk5e->cksumlength; in gss_krb5_aes_decrypt()
894 ret = read_bytes_from_xdr_buf(buf, len - kctx->gk5e->cksumlength, in gss_krb5_aes_decrypt()
895 pkt_hmac, kctx->gk5e->cksumlength); in gss_krb5_aes_decrypt()
899 if (crypto_memneq(pkt_hmac, our_hmac, kctx->gk5e->cksumlength) != 0) { in gss_krb5_aes_decrypt()
904 *tailskip = kctx->gk5e->cksumlength; in gss_krb5_aes_decrypt()
1012 krb5_etm_encrypt(struct krb5_ctx *kctx, u32 offset, in krb5_etm_encrypt() argument
1022 if (kctx->initiate) { in krb5_etm_encrypt()
1023 cipher = kctx->initiator_enc; in krb5_etm_encrypt()
1024 aux_cipher = kctx->initiator_enc_aux; in krb5_etm_encrypt()
1025 ahash = kctx->initiator_integ; in krb5_etm_encrypt()
1027 cipher = kctx->acceptor_enc; in krb5_etm_encrypt()
1028 aux_cipher = kctx->acceptor_enc_aux; in krb5_etm_encrypt()
1029 ahash = kctx->acceptor_integ; in krb5_etm_encrypt()
1059 hmac.len = kctx->gk5e->cksumlength; in krb5_etm_encrypt()
1064 buf->tail[0].iov_len += kctx->gk5e->cksumlength; in krb5_etm_encrypt()
1065 buf->len += kctx->gk5e->cksumlength; in krb5_etm_encrypt()
1100 krb5_etm_decrypt(struct krb5_ctx *kctx, u32 offset, u32 len, in krb5_etm_decrypt() argument
1111 if (kctx->initiate) { in krb5_etm_decrypt()
1112 cipher = kctx->acceptor_enc; in krb5_etm_decrypt()
1113 aux_cipher = kctx->acceptor_enc_aux; in krb5_etm_decrypt()
1114 ahash = kctx->acceptor_integ; in krb5_etm_decrypt()
1116 cipher = kctx->initiator_enc; in krb5_etm_decrypt()
1117 aux_cipher = kctx->initiator_enc_aux; in krb5_etm_decrypt()
1118 ahash = kctx->initiator_integ; in krb5_etm_decrypt()
1124 kctx->gk5e->cksumlength)); in krb5_etm_decrypt()
1127 our_hmac_obj.len = kctx->gk5e->cksumlength; in krb5_etm_decrypt()
1131 ret = read_bytes_from_xdr_buf(buf, len - kctx->gk5e->cksumlength, in krb5_etm_decrypt()
1132 pkt_hmac, kctx->gk5e->cksumlength); in krb5_etm_decrypt()
1135 if (crypto_memneq(pkt_hmac, our_hmac, kctx->gk5e->cksumlength) != 0) { in krb5_etm_decrypt()
1147 *tailskip = kctx->gk5e->cksumlength; in krb5_etm_decrypt()