Lines Matching full:cipher
73 struct crypto_skcipher *cipher = crypto_skcipher_reqtfm(req); in crypto4xx_crypt() local
74 struct crypto4xx_ctx *ctx = crypto_skcipher_ctx(cipher); in crypto4xx_crypt()
121 static int crypto4xx_setkey_aes(struct crypto_skcipher *cipher, in crypto4xx_setkey_aes() argument
127 struct crypto4xx_ctx *ctx = crypto_skcipher_ctx(cipher); in crypto4xx_setkey_aes()
177 int crypto4xx_setkey_aes_cbc(struct crypto_skcipher *cipher, in crypto4xx_setkey_aes_cbc() argument
180 return crypto4xx_setkey_aes(cipher, key, keylen, CRYPTO_MODE_CBC, in crypto4xx_setkey_aes_cbc()
184 int crypto4xx_setkey_aes_ecb(struct crypto_skcipher *cipher, in crypto4xx_setkey_aes_ecb() argument
187 return crypto4xx_setkey_aes(cipher, key, keylen, CRYPTO_MODE_ECB, in crypto4xx_setkey_aes_ecb()
191 int crypto4xx_setkey_rfc3686(struct crypto_skcipher *cipher, in crypto4xx_setkey_rfc3686() argument
194 struct crypto4xx_ctx *ctx = crypto_skcipher_ctx(cipher); in crypto4xx_setkey_rfc3686()
197 rc = crypto4xx_setkey_aes(cipher, key, keylen - CTR_RFC3686_NONCE_SIZE, in crypto4xx_setkey_rfc3686()
210 struct crypto_skcipher *cipher = crypto_skcipher_reqtfm(req); in crypto4xx_rfc3686_encrypt() local
211 struct crypto4xx_ctx *ctx = crypto_skcipher_ctx(cipher); in crypto4xx_rfc3686_encrypt()
225 struct crypto_skcipher *cipher = crypto_skcipher_reqtfm(req); in crypto4xx_rfc3686_decrypt() local
226 struct crypto4xx_ctx *ctx = crypto_skcipher_ctx(cipher); in crypto4xx_rfc3686_decrypt()
241 struct crypto_skcipher *cipher = crypto_skcipher_reqtfm(req); in crypto4xx_ctr_crypt() local
242 struct crypto4xx_ctx *ctx = crypto_skcipher_ctx(cipher); in crypto4xx_ctr_crypt()
243 size_t iv_len = crypto_skcipher_ivsize(cipher); in crypto4xx_ctr_crypt()
255 SYNC_SKCIPHER_REQUEST_ON_STACK(subreq, ctx->sw_cipher.cipher); in crypto4xx_ctr_crypt()
258 skcipher_request_set_sync_tfm(subreq, ctx->sw_cipher.cipher); in crypto4xx_ctr_crypt()
274 struct crypto_skcipher *cipher, in crypto4xx_sk_setup_fallback() argument
278 crypto_sync_skcipher_clear_flags(ctx->sw_cipher.cipher, in crypto4xx_sk_setup_fallback()
280 crypto_sync_skcipher_set_flags(ctx->sw_cipher.cipher, in crypto4xx_sk_setup_fallback()
281 crypto_skcipher_get_flags(cipher) & CRYPTO_TFM_REQ_MASK); in crypto4xx_sk_setup_fallback()
282 return crypto_sync_skcipher_setkey(ctx->sw_cipher.cipher, key, keylen); in crypto4xx_sk_setup_fallback()
285 int crypto4xx_setkey_aes_ctr(struct crypto_skcipher *cipher, in crypto4xx_setkey_aes_ctr() argument
288 struct crypto4xx_ctx *ctx = crypto_skcipher_ctx(cipher); in crypto4xx_setkey_aes_ctr()
291 rc = crypto4xx_sk_setup_fallback(ctx, cipher, key, keylen); in crypto4xx_setkey_aes_ctr()
295 return crypto4xx_setkey_aes(cipher, key, keylen, in crypto4xx_setkey_aes_ctr()
353 struct crypto_aead *cipher, in crypto4xx_aead_setup_fallback() argument
359 crypto_aead_get_flags(cipher) & CRYPTO_TFM_REQ_MASK); in crypto4xx_aead_setup_fallback()
367 int crypto4xx_setkey_aes_ccm(struct crypto_aead *cipher, const u8 *key, in crypto4xx_setkey_aes_ccm() argument
370 struct crypto_tfm *tfm = crypto_aead_tfm(cipher); in crypto4xx_setkey_aes_ccm()
375 rc = crypto4xx_aead_setup_fallback(ctx, cipher, key, keylen); in crypto4xx_setkey_aes_ccm()
469 int crypto4xx_setauthsize_aead(struct crypto_aead *cipher, in crypto4xx_setauthsize_aead() argument
472 struct crypto_tfm *tfm = crypto_aead_tfm(cipher); in crypto4xx_setauthsize_aead()
513 int crypto4xx_setkey_aes_gcm(struct crypto_aead *cipher, in crypto4xx_setkey_aes_gcm() argument
516 struct crypto_tfm *tfm = crypto_aead_tfm(cipher); in crypto4xx_setkey_aes_gcm()
524 rc = crypto4xx_aead_setup_fallback(ctx, cipher, key, keylen); in crypto4xx_setkey_aes_gcm()