Lines Matching refs:cipher

81 	struct crypto_skcipher *cipher = crypto_skcipher_reqtfm(req);  in crypto4xx_crypt()  local
82 struct crypto4xx_ctx *ctx = crypto_skcipher_ctx(cipher); in crypto4xx_crypt()
116 static int crypto4xx_setkey_aes(struct crypto_skcipher *cipher, in crypto4xx_setkey_aes() argument
122 struct crypto4xx_ctx *ctx = crypto_skcipher_ctx(cipher); in crypto4xx_setkey_aes()
128 crypto_skcipher_set_flags(cipher, in crypto4xx_setkey_aes()
169 int crypto4xx_setkey_aes_cbc(struct crypto_skcipher *cipher, in crypto4xx_setkey_aes_cbc() argument
172 return crypto4xx_setkey_aes(cipher, key, keylen, CRYPTO_MODE_CBC, in crypto4xx_setkey_aes_cbc()
176 int crypto4xx_setkey_aes_cfb(struct crypto_skcipher *cipher, in crypto4xx_setkey_aes_cfb() argument
179 return crypto4xx_setkey_aes(cipher, key, keylen, CRYPTO_MODE_CFB, in crypto4xx_setkey_aes_cfb()
183 int crypto4xx_setkey_aes_ecb(struct crypto_skcipher *cipher, in crypto4xx_setkey_aes_ecb() argument
186 return crypto4xx_setkey_aes(cipher, key, keylen, CRYPTO_MODE_ECB, in crypto4xx_setkey_aes_ecb()
190 int crypto4xx_setkey_aes_ofb(struct crypto_skcipher *cipher, in crypto4xx_setkey_aes_ofb() argument
193 return crypto4xx_setkey_aes(cipher, key, keylen, CRYPTO_MODE_OFB, in crypto4xx_setkey_aes_ofb()
197 int crypto4xx_setkey_rfc3686(struct crypto_skcipher *cipher, in crypto4xx_setkey_rfc3686() argument
200 struct crypto4xx_ctx *ctx = crypto_skcipher_ctx(cipher); in crypto4xx_setkey_rfc3686()
203 rc = crypto4xx_setkey_aes(cipher, key, keylen - CTR_RFC3686_NONCE_SIZE, in crypto4xx_setkey_rfc3686()
216 struct crypto_skcipher *cipher = crypto_skcipher_reqtfm(req); in crypto4xx_rfc3686_encrypt() local
217 struct crypto4xx_ctx *ctx = crypto_skcipher_ctx(cipher); in crypto4xx_rfc3686_encrypt()
231 struct crypto_skcipher *cipher = crypto_skcipher_reqtfm(req); in crypto4xx_rfc3686_decrypt() local
232 struct crypto4xx_ctx *ctx = crypto_skcipher_ctx(cipher); in crypto4xx_rfc3686_decrypt()
247 struct crypto_skcipher *cipher = crypto_skcipher_reqtfm(req); in crypto4xx_ctr_crypt() local
248 struct crypto4xx_ctx *ctx = crypto_skcipher_ctx(cipher); in crypto4xx_ctr_crypt()
249 size_t iv_len = crypto_skcipher_ivsize(cipher); in crypto4xx_ctr_crypt()
264 skcipher_request_set_tfm(subreq, ctx->sw_cipher.cipher); in crypto4xx_ctr_crypt()
280 struct crypto_skcipher *cipher, in crypto4xx_sk_setup_fallback() argument
286 crypto_skcipher_clear_flags(ctx->sw_cipher.cipher, in crypto4xx_sk_setup_fallback()
288 crypto_skcipher_set_flags(ctx->sw_cipher.cipher, in crypto4xx_sk_setup_fallback()
289 crypto_skcipher_get_flags(cipher) & CRYPTO_TFM_REQ_MASK); in crypto4xx_sk_setup_fallback()
290 rc = crypto_skcipher_setkey(ctx->sw_cipher.cipher, key, keylen); in crypto4xx_sk_setup_fallback()
291 crypto_skcipher_clear_flags(cipher, CRYPTO_TFM_RES_MASK); in crypto4xx_sk_setup_fallback()
292 crypto_skcipher_set_flags(cipher, in crypto4xx_sk_setup_fallback()
293 crypto_skcipher_get_flags(ctx->sw_cipher.cipher) & 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
375 crypto_aead_get_flags(cipher) & CRYPTO_TFM_REQ_MASK); in crypto4xx_aead_setup_fallback()
377 crypto_aead_clear_flags(cipher, CRYPTO_TFM_RES_MASK); in crypto4xx_aead_setup_fallback()
378 crypto_aead_set_flags(cipher, in crypto4xx_aead_setup_fallback()
389 int crypto4xx_setkey_aes_ccm(struct crypto_aead *cipher, const u8 *key, in crypto4xx_setkey_aes_ccm() argument
392 struct crypto_tfm *tfm = crypto_aead_tfm(cipher); in crypto4xx_setkey_aes_ccm()
397 rc = crypto4xx_aead_setup_fallback(ctx, cipher, key, keylen); in crypto4xx_setkey_aes_ccm()
491 int crypto4xx_setauthsize_aead(struct crypto_aead *cipher, in crypto4xx_setauthsize_aead() argument
494 struct crypto_tfm *tfm = crypto_aead_tfm(cipher); in crypto4xx_setauthsize_aead()
544 int crypto4xx_setkey_aes_gcm(struct crypto_aead *cipher, in crypto4xx_setkey_aes_gcm() argument
547 struct crypto_tfm *tfm = crypto_aead_tfm(cipher); in crypto4xx_setkey_aes_gcm()
553 crypto_aead_set_flags(cipher, CRYPTO_TFM_RES_BAD_KEY_LEN); in crypto4xx_setkey_aes_gcm()
557 rc = crypto4xx_aead_setup_fallback(ctx, cipher, key, keylen); in crypto4xx_setkey_aes_gcm()