Lines Matching refs:tfm
104 struct crypto_sync_skcipher *tfm, in krb5_encrypt() argument
113 SYNC_SKCIPHER_REQUEST_ON_STACK(req, tfm); in krb5_encrypt()
115 if (length % crypto_sync_skcipher_blocksize(tfm) != 0) in krb5_encrypt()
118 if (crypto_sync_skcipher_ivsize(tfm) > GSS_KRB5_MAX_BLOCKSIZE) { in krb5_encrypt()
120 crypto_sync_skcipher_ivsize(tfm)); in krb5_encrypt()
125 memcpy(local_iv, iv, crypto_sync_skcipher_ivsize(tfm)); in krb5_encrypt()
130 skcipher_request_set_sync_tfm(req, tfm); in krb5_encrypt()
159 struct crypto_sync_skcipher *tfm, in krb5_decrypt() argument
168 SYNC_SKCIPHER_REQUEST_ON_STACK(req, tfm); in krb5_decrypt()
170 if (length % crypto_sync_skcipher_blocksize(tfm) != 0) in krb5_decrypt()
173 if (crypto_sync_skcipher_ivsize(tfm) > GSS_KRB5_MAX_BLOCKSIZE) { in krb5_decrypt()
175 crypto_sync_skcipher_ivsize(tfm)); in krb5_decrypt()
179 memcpy(local_iv, iv, crypto_sync_skcipher_ivsize(tfm)); in krb5_decrypt()
184 skcipher_request_set_sync_tfm(req, tfm); in krb5_decrypt()
215 struct crypto_ahash *tfm; in make_checksum() local
232 tfm = crypto_alloc_ahash(kctx->gk5e->cksum_name, 0, CRYPTO_ALG_ASYNC); in make_checksum()
233 if (IS_ERR(tfm)) in make_checksum()
236 req = ahash_request_alloc(tfm, GFP_KERNEL); in make_checksum()
242 checksumlen = crypto_ahash_digestsize(tfm); in make_checksum()
245 err = crypto_ahash_setkey(tfm, cksumkey, in make_checksum()
289 crypto_free_ahash(tfm); in make_checksum()
314 gss_krb5_checksum(struct crypto_ahash *tfm, char *header, int hdrlen, in gss_krb5_checksum() argument
322 checksumdata = kmalloc(crypto_ahash_digestsize(tfm), GFP_KERNEL); in gss_krb5_checksum()
326 req = ahash_request_alloc(tfm, GFP_KERNEL); in gss_krb5_checksum()
358 min_t(int, cksumout->len, crypto_ahash_digestsize(tfm))); in gss_krb5_checksum()
385 struct crypto_sync_skcipher *tfm = in encryptor() local
412 fraglen = thislen & (crypto_sync_skcipher_blocksize(tfm) - 1); in encryptor()
446 gss_encrypt_xdr_buf(struct crypto_sync_skcipher *tfm, struct xdr_buf *buf, in gss_encrypt_xdr_buf() argument
451 SYNC_SKCIPHER_REQUEST_ON_STACK(req, tfm); in gss_encrypt_xdr_buf()
453 BUG_ON((buf->len - offset) % crypto_sync_skcipher_blocksize(tfm) != 0); in gss_encrypt_xdr_buf()
455 skcipher_request_set_sync_tfm(req, tfm); in gss_encrypt_xdr_buf()
487 struct crypto_sync_skcipher *tfm = in decryptor() local
499 fraglen = thislen & (crypto_sync_skcipher_blocksize(tfm) - 1); in decryptor()
529 gss_decrypt_xdr_buf(struct crypto_sync_skcipher *tfm, struct xdr_buf *buf, in gss_decrypt_xdr_buf() argument
534 SYNC_SKCIPHER_REQUEST_ON_STACK(req, tfm); in gss_decrypt_xdr_buf()
537 BUG_ON((buf->len - offset) % crypto_sync_skcipher_blocksize(tfm) != 0); in gss_decrypt_xdr_buf()
539 skcipher_request_set_sync_tfm(req, tfm); in gss_decrypt_xdr_buf()
930 struct crypto_ahash *tfm, const struct xdr_buf *body, in krb5_etm_checksum() argument
939 checksumdata = kmalloc(crypto_ahash_digestsize(tfm), GFP_KERNEL); in krb5_etm_checksum()
947 req = ahash_request_alloc(tfm, GFP_KERNEL); in krb5_etm_checksum()