• Home
  • Raw
  • Download

Lines Matching refs:tfm

131 static int skcipher_aes_setkey(struct crypto_skcipher *tfm, const u8 *in_key,  in skcipher_aes_setkey()  argument
134 struct crypto_aes_ctx *ctx = crypto_skcipher_ctx(tfm); in skcipher_aes_setkey()
139 crypto_skcipher_set_flags(tfm, CRYPTO_TFM_RES_BAD_KEY_LEN); in skcipher_aes_setkey()
144 static int __maybe_unused xts_set_key(struct crypto_skcipher *tfm, in xts_set_key() argument
147 struct crypto_aes_xts_ctx *ctx = crypto_skcipher_ctx(tfm); in xts_set_key()
150 ret = xts_verify_key(tfm, in_key, key_len); in xts_set_key()
161 crypto_skcipher_set_flags(tfm, CRYPTO_TFM_RES_BAD_KEY_LEN); in xts_set_key()
165 static int __maybe_unused essiv_cbc_set_key(struct crypto_skcipher *tfm, in essiv_cbc_set_key() argument
169 struct crypto_aes_essiv_cbc_ctx *ctx = crypto_skcipher_ctx(tfm); in essiv_cbc_set_key()
178 desc->tfm = ctx->hash; in essiv_cbc_set_key()
187 crypto_skcipher_set_flags(tfm, CRYPTO_TFM_RES_BAD_KEY_LEN); in essiv_cbc_set_key()
193 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); in ecb_encrypt() local
194 struct crypto_aes_ctx *ctx = crypto_skcipher_ctx(tfm); in ecb_encrypt()
213 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); in ecb_decrypt() local
214 struct crypto_aes_ctx *ctx = crypto_skcipher_ctx(tfm); in ecb_decrypt()
234 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); in cbc_encrypt_walk() local
235 struct crypto_aes_ctx *ctx = crypto_skcipher_ctx(tfm); in cbc_encrypt_walk()
263 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); in cbc_decrypt_walk() local
264 struct crypto_aes_ctx *ctx = crypto_skcipher_ctx(tfm); in cbc_decrypt_walk()
291 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); in cts_cbc_encrypt() local
292 struct crypto_aes_ctx *ctx = crypto_skcipher_ctx(tfm); in cts_cbc_encrypt()
300 skcipher_request_set_tfm(&subreq, tfm); in cts_cbc_encrypt()
348 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); in cts_cbc_decrypt() local
349 struct crypto_aes_ctx *ctx = crypto_skcipher_ctx(tfm); in cts_cbc_decrypt()
357 skcipher_request_set_tfm(&subreq, tfm); in cts_cbc_decrypt()
403 static int __maybe_unused essiv_cbc_init_tfm(struct crypto_skcipher *tfm) in essiv_cbc_init_tfm() argument
405 struct crypto_aes_essiv_cbc_ctx *ctx = crypto_skcipher_ctx(tfm); in essiv_cbc_init_tfm()
412 static void __maybe_unused essiv_cbc_exit_tfm(struct crypto_skcipher *tfm) in essiv_cbc_exit_tfm() argument
414 struct crypto_aes_essiv_cbc_ctx *ctx = crypto_skcipher_ctx(tfm); in essiv_cbc_exit_tfm()
421 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); in essiv_cbc_encrypt() local
422 struct crypto_aes_essiv_cbc_ctx *ctx = crypto_skcipher_ctx(tfm); in essiv_cbc_encrypt()
443 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); in essiv_cbc_decrypt() local
444 struct crypto_aes_essiv_cbc_ctx *ctx = crypto_skcipher_ctx(tfm); in essiv_cbc_decrypt()
465 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); in ctr_encrypt() local
466 struct crypto_aes_ctx *ctx = crypto_skcipher_ctx(tfm); in ctr_encrypt()
502 static void ctr_encrypt_one(struct crypto_skcipher *tfm, const u8 *src, u8 *dst) in ctr_encrypt_one() argument
504 const struct crypto_aes_ctx *ctx = crypto_skcipher_ctx(tfm); in ctr_encrypt_one()
527 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); in xts_encrypt() local
528 struct crypto_aes_xts_ctx *ctx = crypto_skcipher_ctx(tfm); in xts_encrypt()
547 skcipher_request_set_tfm(&subreq, tfm); in xts_encrypt()
599 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); in xts_decrypt() local
600 struct crypto_aes_xts_ctx *ctx = crypto_skcipher_ctx(tfm); in xts_decrypt()
619 skcipher_request_set_tfm(&subreq, tfm); in xts_decrypt()
790 static int cbcmac_setkey(struct crypto_shash *tfm, const u8 *in_key, in cbcmac_setkey() argument
793 struct mac_tfm_ctx *ctx = crypto_shash_ctx(tfm); in cbcmac_setkey()
798 crypto_shash_set_flags(tfm, CRYPTO_TFM_RES_BAD_KEY_LEN); in cbcmac_setkey()
812 static int cmac_setkey(struct crypto_shash *tfm, const u8 *in_key, in cmac_setkey() argument
815 struct mac_tfm_ctx *ctx = crypto_shash_ctx(tfm); in cmac_setkey()
820 err = cbcmac_setkey(tfm, in_key, key_len); in cmac_setkey()
836 static int xcbc_setkey(struct crypto_shash *tfm, const u8 *in_key, in xcbc_setkey() argument
845 struct mac_tfm_ctx *ctx = crypto_shash_ctx(tfm); in xcbc_setkey()
850 err = cbcmac_setkey(tfm, in_key, key_len); in xcbc_setkey()
859 return cbcmac_setkey(tfm, key, sizeof(key)); in xcbc_setkey()
898 struct mac_tfm_ctx *tctx = crypto_shash_ctx(desc->tfm); in mac_update()
938 struct mac_tfm_ctx *tctx = crypto_shash_ctx(desc->tfm); in cbcmac_final()
950 struct mac_tfm_ctx *tctx = crypto_shash_ctx(desc->tfm); in cmac_final()