Lines Matching defs:tfm
954 ctx = crypto_tfm_ctx(areq->tfm);
1155 static int atmel_aes_setkey(struct crypto_skcipher *tfm, const u8 *key,
1158 struct atmel_aes_base_ctx *ctx = crypto_skcipher_ctx(tfm);
1261 static int atmel_aes_init_tfm(struct crypto_skcipher *tfm)
1263 struct atmel_aes_ctx *ctx = crypto_skcipher_ctx(tfm);
1270 crypto_skcipher_set_reqsize(tfm, sizeof(struct atmel_aes_reqctx));
1277 static int atmel_aes_ctr_init_tfm(struct crypto_skcipher *tfm)
1279 struct atmel_aes_ctx *ctx = crypto_skcipher_ctx(tfm);
1286 crypto_skcipher_set_reqsize(tfm, sizeof(struct atmel_aes_reqctx));
1508 struct crypto_aead *tfm = crypto_aead_reqtfm(req);
1510 size_t ivsize = crypto_aead_ivsize(tfm);
1545 struct crypto_aead *tfm = crypto_aead_reqtfm(req);
1550 authsize = crypto_aead_authsize(tfm);
1696 struct crypto_aead *tfm = crypto_aead_reqtfm(req);
1708 authsize = crypto_aead_authsize(tfm);
1736 static int atmel_aes_gcm_setkey(struct crypto_aead *tfm, const u8 *key,
1739 struct atmel_aes_base_ctx *ctx = crypto_aead_ctx(tfm);
1752 static int atmel_aes_gcm_setauthsize(struct crypto_aead *tfm,
1768 static int atmel_aes_gcm_init(struct crypto_aead *tfm)
1770 struct atmel_aes_gcm_ctx *ctx = crypto_aead_ctx(tfm);
1777 crypto_aead_set_reqsize(tfm, sizeof(struct atmel_aes_reqctx));
1870 static int atmel_aes_xts_setkey(struct crypto_skcipher *tfm, const u8 *key,
1873 struct atmel_aes_xts_ctx *ctx = crypto_skcipher_ctx(tfm);
1876 err = xts_verify_key(tfm, key, keylen);
1881 crypto_skcipher_set_flags(ctx->fallback_tfm, tfm->base.crt_flags &
1904 static int atmel_aes_xts_init_tfm(struct crypto_skcipher *tfm)
1906 struct atmel_aes_xts_ctx *ctx = crypto_skcipher_ctx(tfm);
1908 const char *tfm_name = crypto_tfm_alg_name(&tfm->base);
1919 crypto_skcipher_set_reqsize(tfm, sizeof(struct atmel_aes_reqctx) +
1927 static void atmel_aes_xts_exit_tfm(struct crypto_skcipher *tfm)
1929 struct atmel_aes_xts_ctx *ctx = crypto_skcipher_ctx(tfm);
1977 struct crypto_aead *tfm = crypto_aead_reqtfm(req);
1978 struct atmel_aes_authenc_ctx *ctx = crypto_aead_ctx(tfm);
2072 struct crypto_aead *tfm = crypto_aead_reqtfm(req);
2083 authsize = crypto_aead_authsize(tfm);
2096 static int atmel_aes_authenc_setkey(struct crypto_aead *tfm, const u8 *key,
2099 struct atmel_aes_authenc_ctx *ctx = crypto_aead_ctx(tfm);
2112 crypto_aead_get_flags(tfm));
2130 static int atmel_aes_authenc_init_tfm(struct crypto_aead *tfm,
2133 struct atmel_aes_authenc_ctx *ctx = crypto_aead_ctx(tfm);
2145 crypto_aead_set_reqsize(tfm, (sizeof(struct atmel_aes_authenc_reqctx) +
2153 static int atmel_aes_authenc_hmac_sha1_init_tfm(struct crypto_aead *tfm)
2155 return atmel_aes_authenc_init_tfm(tfm, SHA_FLAGS_HMAC_SHA1);
2158 static int atmel_aes_authenc_hmac_sha224_init_tfm(struct crypto_aead *tfm)
2160 return atmel_aes_authenc_init_tfm(tfm, SHA_FLAGS_HMAC_SHA224);
2163 static int atmel_aes_authenc_hmac_sha256_init_tfm(struct crypto_aead *tfm)
2165 return atmel_aes_authenc_init_tfm(tfm, SHA_FLAGS_HMAC_SHA256);
2168 static int atmel_aes_authenc_hmac_sha384_init_tfm(struct crypto_aead *tfm)
2170 return atmel_aes_authenc_init_tfm(tfm, SHA_FLAGS_HMAC_SHA384);
2173 static int atmel_aes_authenc_hmac_sha512_init_tfm(struct crypto_aead *tfm)
2175 return atmel_aes_authenc_init_tfm(tfm, SHA_FLAGS_HMAC_SHA512);
2178 static void atmel_aes_authenc_exit_tfm(struct crypto_aead *tfm)
2180 struct atmel_aes_authenc_ctx *ctx = crypto_aead_ctx(tfm);
2189 struct crypto_aead *tfm = crypto_aead_reqtfm(req);
2190 struct atmel_aes_base_ctx *ctx = crypto_aead_ctx(tfm);
2191 u32 authsize = crypto_aead_authsize(tfm);