Lines Matching defs:tfm
282 aesni_rfc4106_gcm_ctx *aesni_rfc4106_gcm_ctx_get(struct crypto_aead *tfm)
288 return PTR_ALIGN(crypto_aead_ctx(tfm), align);
292 generic_gcmaes_ctx *generic_gcmaes_ctx_get(struct crypto_aead *tfm)
298 return PTR_ALIGN(crypto_aead_ctx(tfm), align);
312 static int aes_set_key_common(struct crypto_tfm *tfm, void *raw_ctx,
333 static int aes_set_key(struct crypto_tfm *tfm, const u8 *in_key,
336 return aes_set_key_common(tfm, crypto_tfm_ctx(tfm), in_key, key_len);
339 static void aesni_encrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src)
341 struct crypto_aes_ctx *ctx = aes_ctx(crypto_tfm_ctx(tfm));
352 static void aesni_decrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src)
354 struct crypto_aes_ctx *ctx = aes_ctx(crypto_tfm_ctx(tfm));
365 static int aesni_skcipher_setkey(struct crypto_skcipher *tfm, const u8 *key,
368 return aes_set_key_common(crypto_skcipher_tfm(tfm),
369 crypto_skcipher_ctx(tfm), key, len);
374 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req);
375 struct crypto_aes_ctx *ctx = aes_ctx(crypto_skcipher_ctx(tfm));
396 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req);
397 struct crypto_aes_ctx *ctx = aes_ctx(crypto_skcipher_ctx(tfm));
418 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req);
419 struct crypto_aes_ctx *ctx = aes_ctx(crypto_skcipher_ctx(tfm));
440 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req);
441 struct crypto_aes_ctx *ctx = aes_ctx(crypto_skcipher_ctx(tfm));
495 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req);
496 struct crypto_aes_ctx *ctx = aes_ctx(crypto_skcipher_ctx(tfm));
519 static int xts_aesni_setkey(struct crypto_skcipher *tfm, const u8 *key,
522 struct aesni_xts_ctx *ctx = crypto_skcipher_ctx(tfm);
525 err = xts_verify_key(tfm, key, keylen);
532 err = aes_set_key_common(crypto_skcipher_tfm(tfm), ctx->raw_crypt_ctx,
538 return aes_set_key_common(crypto_skcipher_tfm(tfm), ctx->raw_tweak_ctx,
591 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req);
592 struct aesni_xts_ctx *ctx = crypto_skcipher_ctx(tfm);
602 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req);
603 struct aesni_xts_ctx *ctx = crypto_skcipher_ctx(tfm);
666 static int generic_gcmaes_set_authsize(struct crypto_aead *tfm,
689 struct crypto_aead *tfm = crypto_aead_reqtfm(req);
690 unsigned long auth_tag_len = crypto_aead_authsize(tfm);
831 struct crypto_aead *tfm = crypto_aead_reqtfm(req);
832 struct aesni_rfc4106_gcm_ctx *ctx = aesni_rfc4106_gcm_ctx_get(tfm);
859 struct crypto_aead *tfm = crypto_aead_reqtfm(req);
860 struct aesni_rfc4106_gcm_ctx *ctx = aesni_rfc4106_gcm_ctx_get(tfm);
990 struct crypto_aead *tfm = crypto_aead_reqtfm(req);
991 struct generic_gcmaes_ctx *ctx = generic_gcmaes_ctx_get(tfm);
1007 struct crypto_aead *tfm = crypto_aead_reqtfm(req);
1008 struct generic_gcmaes_ctx *ctx = generic_gcmaes_ctx_get(tfm);