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()
133 crypto_skcipher_set_flags(cipher, in crypto4xx_setkey_aes()
180 int crypto4xx_setkey_aes_cbc(struct crypto_skcipher *cipher, in crypto4xx_setkey_aes_cbc() argument
183 return crypto4xx_setkey_aes(cipher, key, keylen, CRYPTO_MODE_CBC, in crypto4xx_setkey_aes_cbc()
187 int crypto4xx_setkey_aes_cfb(struct crypto_skcipher *cipher, in crypto4xx_setkey_aes_cfb() argument
190 return crypto4xx_setkey_aes(cipher, key, keylen, CRYPTO_MODE_CFB, in crypto4xx_setkey_aes_cfb()
194 int crypto4xx_setkey_aes_ecb(struct crypto_skcipher *cipher, in crypto4xx_setkey_aes_ecb() argument
197 return crypto4xx_setkey_aes(cipher, key, keylen, CRYPTO_MODE_ECB, in crypto4xx_setkey_aes_ecb()
201 int crypto4xx_setkey_aes_ofb(struct crypto_skcipher *cipher, in crypto4xx_setkey_aes_ofb() argument
204 return crypto4xx_setkey_aes(cipher, key, keylen, CRYPTO_MODE_OFB, in crypto4xx_setkey_aes_ofb()
208 int crypto4xx_setkey_rfc3686(struct crypto_skcipher *cipher, in crypto4xx_setkey_rfc3686() argument
211 struct crypto4xx_ctx *ctx = crypto_skcipher_ctx(cipher); in crypto4xx_setkey_rfc3686()
214 rc = crypto4xx_setkey_aes(cipher, key, keylen - CTR_RFC3686_NONCE_SIZE, in crypto4xx_setkey_rfc3686()
227 struct crypto_skcipher *cipher = crypto_skcipher_reqtfm(req); in crypto4xx_rfc3686_encrypt() local
228 struct crypto4xx_ctx *ctx = crypto_skcipher_ctx(cipher); in crypto4xx_rfc3686_encrypt()
242 struct crypto_skcipher *cipher = crypto_skcipher_reqtfm(req); in crypto4xx_rfc3686_decrypt() local
243 struct crypto4xx_ctx *ctx = crypto_skcipher_ctx(cipher); in crypto4xx_rfc3686_decrypt()
258 struct crypto_skcipher *cipher = crypto_skcipher_reqtfm(req); in crypto4xx_ctr_crypt() local
259 struct crypto4xx_ctx *ctx = crypto_skcipher_ctx(cipher); in crypto4xx_ctr_crypt()
260 size_t iv_len = crypto_skcipher_ivsize(cipher); in crypto4xx_ctr_crypt()
272 SYNC_SKCIPHER_REQUEST_ON_STACK(subreq, ctx->sw_cipher.cipher); in crypto4xx_ctr_crypt()
275 skcipher_request_set_sync_tfm(subreq, ctx->sw_cipher.cipher); in crypto4xx_ctr_crypt()
291 struct crypto_skcipher *cipher, in crypto4xx_sk_setup_fallback() argument
297 crypto_sync_skcipher_clear_flags(ctx->sw_cipher.cipher, in crypto4xx_sk_setup_fallback()
299 crypto_sync_skcipher_set_flags(ctx->sw_cipher.cipher, in crypto4xx_sk_setup_fallback()
300 crypto_skcipher_get_flags(cipher) & CRYPTO_TFM_REQ_MASK); in crypto4xx_sk_setup_fallback()
301 rc = crypto_sync_skcipher_setkey(ctx->sw_cipher.cipher, key, keylen); in crypto4xx_sk_setup_fallback()
302 crypto_skcipher_clear_flags(cipher, CRYPTO_TFM_RES_MASK); in crypto4xx_sk_setup_fallback()
303 crypto_skcipher_set_flags(cipher, in crypto4xx_sk_setup_fallback()
304 crypto_sync_skcipher_get_flags(ctx->sw_cipher.cipher) & in crypto4xx_sk_setup_fallback()
310 int crypto4xx_setkey_aes_ctr(struct crypto_skcipher *cipher, in crypto4xx_setkey_aes_ctr() argument
313 struct crypto4xx_ctx *ctx = crypto_skcipher_ctx(cipher); in crypto4xx_setkey_aes_ctr()
316 rc = crypto4xx_sk_setup_fallback(ctx, cipher, key, keylen); in crypto4xx_setkey_aes_ctr()
320 return crypto4xx_setkey_aes(cipher, key, keylen, in crypto4xx_setkey_aes_ctr()
378 struct crypto_aead *cipher, in crypto4xx_aead_setup_fallback() argument
386 crypto_aead_get_flags(cipher) & CRYPTO_TFM_REQ_MASK); in crypto4xx_aead_setup_fallback()
388 crypto_aead_clear_flags(cipher, CRYPTO_TFM_RES_MASK); in crypto4xx_aead_setup_fallback()
389 crypto_aead_set_flags(cipher, in crypto4xx_aead_setup_fallback()
400 int crypto4xx_setkey_aes_ccm(struct crypto_aead *cipher, const u8 *key, in crypto4xx_setkey_aes_ccm() argument
403 struct crypto_tfm *tfm = crypto_aead_tfm(cipher); in crypto4xx_setkey_aes_ccm()
408 rc = crypto4xx_aead_setup_fallback(ctx, cipher, key, keylen); in crypto4xx_setkey_aes_ccm()
502 int crypto4xx_setauthsize_aead(struct crypto_aead *cipher, in crypto4xx_setauthsize_aead() argument
505 struct crypto_tfm *tfm = crypto_aead_tfm(cipher); in crypto4xx_setauthsize_aead()
546 int crypto4xx_setkey_aes_gcm(struct crypto_aead *cipher, in crypto4xx_setkey_aes_gcm() argument
549 struct crypto_tfm *tfm = crypto_aead_tfm(cipher); in crypto4xx_setkey_aes_gcm()
555 crypto_aead_set_flags(cipher, CRYPTO_TFM_RES_BAD_KEY_LEN); in crypto4xx_setkey_aes_gcm()
559 rc = crypto4xx_aead_setup_fallback(ctx, cipher, key, keylen); in crypto4xx_setkey_aes_gcm()