Lines Matching refs: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_cfb(struct crypto_skcipher *cipher, in crypto4xx_setkey_aes_cfb() argument
187 return crypto4xx_setkey_aes(cipher, key, keylen, CRYPTO_MODE_CFB, in crypto4xx_setkey_aes_cfb()
191 int crypto4xx_setkey_aes_ecb(struct crypto_skcipher *cipher, in crypto4xx_setkey_aes_ecb() argument
194 return crypto4xx_setkey_aes(cipher, key, keylen, CRYPTO_MODE_ECB, in crypto4xx_setkey_aes_ecb()
198 int crypto4xx_setkey_aes_ofb(struct crypto_skcipher *cipher, in crypto4xx_setkey_aes_ofb() argument
201 return crypto4xx_setkey_aes(cipher, key, keylen, CRYPTO_MODE_OFB, in crypto4xx_setkey_aes_ofb()
205 int crypto4xx_setkey_rfc3686(struct crypto_skcipher *cipher, in crypto4xx_setkey_rfc3686() argument
208 struct crypto4xx_ctx *ctx = crypto_skcipher_ctx(cipher); in crypto4xx_setkey_rfc3686()
211 rc = crypto4xx_setkey_aes(cipher, key, keylen - CTR_RFC3686_NONCE_SIZE, in crypto4xx_setkey_rfc3686()
224 struct crypto_skcipher *cipher = crypto_skcipher_reqtfm(req); in crypto4xx_rfc3686_encrypt() local
225 struct crypto4xx_ctx *ctx = crypto_skcipher_ctx(cipher); in crypto4xx_rfc3686_encrypt()
239 struct crypto_skcipher *cipher = crypto_skcipher_reqtfm(req); in crypto4xx_rfc3686_decrypt() local
240 struct crypto4xx_ctx *ctx = crypto_skcipher_ctx(cipher); in crypto4xx_rfc3686_decrypt()
255 struct crypto_skcipher *cipher = crypto_skcipher_reqtfm(req); in crypto4xx_ctr_crypt() local
256 struct crypto4xx_ctx *ctx = crypto_skcipher_ctx(cipher); in crypto4xx_ctr_crypt()
257 size_t iv_len = crypto_skcipher_ivsize(cipher); in crypto4xx_ctr_crypt()
269 SYNC_SKCIPHER_REQUEST_ON_STACK(subreq, ctx->sw_cipher.cipher); in crypto4xx_ctr_crypt()
272 skcipher_request_set_sync_tfm(subreq, ctx->sw_cipher.cipher); in crypto4xx_ctr_crypt()
288 struct crypto_skcipher *cipher, in crypto4xx_sk_setup_fallback() argument
292 crypto_sync_skcipher_clear_flags(ctx->sw_cipher.cipher, in crypto4xx_sk_setup_fallback()
294 crypto_sync_skcipher_set_flags(ctx->sw_cipher.cipher, in crypto4xx_sk_setup_fallback()
295 crypto_skcipher_get_flags(cipher) & CRYPTO_TFM_REQ_MASK); in crypto4xx_sk_setup_fallback()
296 return crypto_sync_skcipher_setkey(ctx->sw_cipher.cipher, key, keylen); in crypto4xx_sk_setup_fallback()
299 int crypto4xx_setkey_aes_ctr(struct crypto_skcipher *cipher, in crypto4xx_setkey_aes_ctr() argument
302 struct crypto4xx_ctx *ctx = crypto_skcipher_ctx(cipher); in crypto4xx_setkey_aes_ctr()
305 rc = crypto4xx_sk_setup_fallback(ctx, cipher, key, keylen); in crypto4xx_setkey_aes_ctr()
309 return crypto4xx_setkey_aes(cipher, key, keylen, in crypto4xx_setkey_aes_ctr()
367 struct crypto_aead *cipher, in crypto4xx_aead_setup_fallback() argument
373 crypto_aead_get_flags(cipher) & CRYPTO_TFM_REQ_MASK); in crypto4xx_aead_setup_fallback()
381 int crypto4xx_setkey_aes_ccm(struct crypto_aead *cipher, const u8 *key, in crypto4xx_setkey_aes_ccm() argument
384 struct crypto_tfm *tfm = crypto_aead_tfm(cipher); in crypto4xx_setkey_aes_ccm()
389 rc = crypto4xx_aead_setup_fallback(ctx, cipher, key, keylen); in crypto4xx_setkey_aes_ccm()
483 int crypto4xx_setauthsize_aead(struct crypto_aead *cipher, in crypto4xx_setauthsize_aead() argument
486 struct crypto_tfm *tfm = crypto_aead_tfm(cipher); in crypto4xx_setauthsize_aead()
527 int crypto4xx_setkey_aes_gcm(struct crypto_aead *cipher, in crypto4xx_setkey_aes_gcm() argument
530 struct crypto_tfm *tfm = crypto_aead_tfm(cipher); in crypto4xx_setkey_aes_gcm()
538 rc = crypto4xx_aead_setup_fallback(ctx, cipher, key, keylen); in crypto4xx_setkey_aes_gcm()