Lines Matching refs:tfm

202 aesni_rfc4106_gcm_ctx *aesni_rfc4106_gcm_ctx_get(struct crypto_aead *tfm)  in aesni_rfc4106_gcm_ctx_get()  argument
208 return PTR_ALIGN(crypto_aead_ctx(tfm), align); in aesni_rfc4106_gcm_ctx_get()
212 generic_gcmaes_ctx *generic_gcmaes_ctx_get(struct crypto_aead *tfm) in generic_gcmaes_ctx_get() argument
218 return PTR_ALIGN(crypto_aead_ctx(tfm), align); in generic_gcmaes_ctx_get()
252 static int aes_set_key(struct crypto_tfm *tfm, const u8 *in_key, in aes_set_key() argument
255 return aes_set_key_common(aes_ctx(crypto_tfm_ctx(tfm)), in_key, in aes_set_key()
259 static void aesni_encrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) in aesni_encrypt() argument
261 struct crypto_aes_ctx *ctx = aes_ctx(crypto_tfm_ctx(tfm)); in aesni_encrypt()
272 static void aesni_decrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) in aesni_decrypt() argument
274 struct crypto_aes_ctx *ctx = aes_ctx(crypto_tfm_ctx(tfm)); in aesni_decrypt()
285 static int aesni_skcipher_setkey(struct crypto_skcipher *tfm, const u8 *key, in aesni_skcipher_setkey() argument
288 return aes_set_key_common(aes_ctx(crypto_skcipher_ctx(tfm)), key, len); in aesni_skcipher_setkey()
293 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); in ecb_encrypt() local
294 struct crypto_aes_ctx *ctx = aes_ctx(crypto_skcipher_ctx(tfm)); in ecb_encrypt()
315 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); in ecb_decrypt() local
316 struct crypto_aes_ctx *ctx = aes_ctx(crypto_skcipher_ctx(tfm)); in ecb_decrypt()
337 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); in cbc_encrypt() local
338 struct crypto_aes_ctx *ctx = aes_ctx(crypto_skcipher_ctx(tfm)); in cbc_encrypt()
359 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); in cbc_decrypt() local
360 struct crypto_aes_ctx *ctx = aes_ctx(crypto_skcipher_ctx(tfm)); in cbc_decrypt()
381 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); in cts_cbc_encrypt() local
382 struct crypto_aes_ctx *ctx = aes_ctx(crypto_skcipher_ctx(tfm)); in cts_cbc_encrypt()
390 skcipher_request_set_tfm(&subreq, tfm); in cts_cbc_encrypt()
437 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); in cts_cbc_decrypt() local
438 struct crypto_aes_ctx *ctx = aes_ctx(crypto_skcipher_ctx(tfm)); in cts_cbc_decrypt()
446 skcipher_request_set_tfm(&subreq, tfm); in cts_cbc_decrypt()
511 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); in ctr_crypt() local
512 struct crypto_aes_ctx *ctx = aes_ctx(crypto_skcipher_ctx(tfm)); in ctr_crypt()
560 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); in xctr_crypt() local
561 struct crypto_aes_ctx *ctx = aes_ctx(crypto_skcipher_ctx(tfm)); in xctr_crypt()
650 static int generic_gcmaes_set_authsize(struct crypto_aead *tfm, in generic_gcmaes_set_authsize() argument
782 struct crypto_aead *tfm = crypto_aead_reqtfm(req); in gcmaes_encrypt() local
783 unsigned long auth_tag_len = crypto_aead_authsize(tfm); in gcmaes_encrypt()
801 struct crypto_aead *tfm = crypto_aead_reqtfm(req); in gcmaes_decrypt() local
802 unsigned long auth_tag_len = crypto_aead_authsize(tfm); in gcmaes_decrypt()
827 struct crypto_aead *tfm = crypto_aead_reqtfm(req); in helper_rfc4106_encrypt() local
828 struct aesni_rfc4106_gcm_ctx *ctx = aesni_rfc4106_gcm_ctx_get(tfm); in helper_rfc4106_encrypt()
855 struct crypto_aead *tfm = crypto_aead_reqtfm(req); in helper_rfc4106_decrypt() local
856 struct aesni_rfc4106_gcm_ctx *ctx = aesni_rfc4106_gcm_ctx_get(tfm); in helper_rfc4106_decrypt()
881 static int xts_aesni_setkey(struct crypto_skcipher *tfm, const u8 *key, in xts_aesni_setkey() argument
884 struct aesni_xts_ctx *ctx = crypto_skcipher_ctx(tfm); in xts_aesni_setkey()
887 err = xts_verify_key(tfm, key, keylen); in xts_aesni_setkey()
905 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); in xts_crypt() local
906 struct aesni_xts_ctx *ctx = crypto_skcipher_ctx(tfm); in xts_crypt()
924 skcipher_request_set_tfm(&subreq, tfm); in xts_crypt()
1156 struct crypto_aead *tfm = crypto_aead_reqtfm(req); in generic_gcmaes_encrypt() local
1157 struct generic_gcmaes_ctx *ctx = generic_gcmaes_ctx_get(tfm); in generic_gcmaes_encrypt()
1173 struct crypto_aead *tfm = crypto_aead_reqtfm(req); in generic_gcmaes_decrypt() local
1174 struct generic_gcmaes_ctx *ctx = generic_gcmaes_ctx_get(tfm); in generic_gcmaes_decrypt()