Lines Matching refs:cipher

70 	struct crypto_skcipher *cipher = crypto_skcipher_reqtfm(req);  in crypto4xx_crypt()  local
71 struct crypto4xx_ctx *ctx = crypto_skcipher_ctx(cipher); in crypto4xx_crypt()
118 static int crypto4xx_setkey_aes(struct crypto_skcipher *cipher, in crypto4xx_setkey_aes() argument
124 struct crypto4xx_ctx *ctx = crypto_skcipher_ctx(cipher); in crypto4xx_setkey_aes()
174 int crypto4xx_setkey_aes_cbc(struct crypto_skcipher *cipher, in crypto4xx_setkey_aes_cbc() argument
177 return crypto4xx_setkey_aes(cipher, key, keylen, CRYPTO_MODE_CBC, in crypto4xx_setkey_aes_cbc()
181 int crypto4xx_setkey_aes_ecb(struct crypto_skcipher *cipher, in crypto4xx_setkey_aes_ecb() argument
184 return crypto4xx_setkey_aes(cipher, key, keylen, CRYPTO_MODE_ECB, in crypto4xx_setkey_aes_ecb()
188 int crypto4xx_setkey_rfc3686(struct crypto_skcipher *cipher, in crypto4xx_setkey_rfc3686() argument
191 struct crypto4xx_ctx *ctx = crypto_skcipher_ctx(cipher); in crypto4xx_setkey_rfc3686()
194 rc = crypto4xx_setkey_aes(cipher, key, keylen - CTR_RFC3686_NONCE_SIZE, in crypto4xx_setkey_rfc3686()
207 struct crypto_skcipher *cipher = crypto_skcipher_reqtfm(req); in crypto4xx_rfc3686_encrypt() local
208 struct crypto4xx_ctx *ctx = crypto_skcipher_ctx(cipher); in crypto4xx_rfc3686_encrypt()
222 struct crypto_skcipher *cipher = crypto_skcipher_reqtfm(req); in crypto4xx_rfc3686_decrypt() local
223 struct crypto4xx_ctx *ctx = crypto_skcipher_ctx(cipher); in crypto4xx_rfc3686_decrypt()
238 struct crypto_skcipher *cipher = crypto_skcipher_reqtfm(req); in crypto4xx_ctr_crypt() local
239 struct crypto4xx_ctx *ctx = crypto_skcipher_ctx(cipher); in crypto4xx_ctr_crypt()
240 size_t iv_len = crypto_skcipher_ivsize(cipher); in crypto4xx_ctr_crypt()
252 SYNC_SKCIPHER_REQUEST_ON_STACK(subreq, ctx->sw_cipher.cipher); in crypto4xx_ctr_crypt()
255 skcipher_request_set_sync_tfm(subreq, ctx->sw_cipher.cipher); in crypto4xx_ctr_crypt()
271 struct crypto_skcipher *cipher, in crypto4xx_sk_setup_fallback() argument
275 crypto_sync_skcipher_clear_flags(ctx->sw_cipher.cipher, in crypto4xx_sk_setup_fallback()
277 crypto_sync_skcipher_set_flags(ctx->sw_cipher.cipher, in crypto4xx_sk_setup_fallback()
278 crypto_skcipher_get_flags(cipher) & CRYPTO_TFM_REQ_MASK); in crypto4xx_sk_setup_fallback()
279 return crypto_sync_skcipher_setkey(ctx->sw_cipher.cipher, key, keylen); in crypto4xx_sk_setup_fallback()
282 int crypto4xx_setkey_aes_ctr(struct crypto_skcipher *cipher, in crypto4xx_setkey_aes_ctr() argument
285 struct crypto4xx_ctx *ctx = crypto_skcipher_ctx(cipher); in crypto4xx_setkey_aes_ctr()
288 rc = crypto4xx_sk_setup_fallback(ctx, cipher, key, keylen); in crypto4xx_setkey_aes_ctr()
292 return crypto4xx_setkey_aes(cipher, key, keylen, in crypto4xx_setkey_aes_ctr()
350 struct crypto_aead *cipher, in crypto4xx_aead_setup_fallback() argument
356 crypto_aead_get_flags(cipher) & CRYPTO_TFM_REQ_MASK); in crypto4xx_aead_setup_fallback()
364 int crypto4xx_setkey_aes_ccm(struct crypto_aead *cipher, const u8 *key, in crypto4xx_setkey_aes_ccm() argument
367 struct crypto_tfm *tfm = crypto_aead_tfm(cipher); in crypto4xx_setkey_aes_ccm()
372 rc = crypto4xx_aead_setup_fallback(ctx, cipher, key, keylen); in crypto4xx_setkey_aes_ccm()
466 int crypto4xx_setauthsize_aead(struct crypto_aead *cipher, in crypto4xx_setauthsize_aead() argument
469 struct crypto_tfm *tfm = crypto_aead_tfm(cipher); in crypto4xx_setauthsize_aead()
510 int crypto4xx_setkey_aes_gcm(struct crypto_aead *cipher, in crypto4xx_setkey_aes_gcm() argument
513 struct crypto_tfm *tfm = crypto_aead_tfm(cipher); in crypto4xx_setkey_aes_gcm()
521 rc = crypto4xx_aead_setup_fallback(ctx, cipher, key, keylen); in crypto4xx_setkey_aes_gcm()