Lines Matching full:fallback

10  *		Sebastian Siewior (sebastian@breakpoint.cc> SW-Fallback
49 } fallback; member
57 struct crypto_skcipher *fallback; member
76 sctx->fallback.cip->base.crt_flags &= ~CRYPTO_TFM_REQ_MASK; in setkey_fallback_cip()
77 sctx->fallback.cip->base.crt_flags |= (tfm->crt_flags & in setkey_fallback_cip()
80 return crypto_cipher_setkey(sctx->fallback.cip, in_key, key_len); in setkey_fallback_cip()
109 crypto_cipher_encrypt_one(sctx->fallback.cip, out, in); in crypto_aes_encrypt()
120 crypto_cipher_decrypt_one(sctx->fallback.cip, out, in); in crypto_aes_decrypt()
132 sctx->fallback.cip = crypto_alloc_cipher(name, 0, in fallback_init_cip()
135 if (IS_ERR(sctx->fallback.cip)) { in fallback_init_cip()
136 pr_err("Allocating AES fallback algorithm %s failed\n", in fallback_init_cip()
138 return PTR_ERR(sctx->fallback.cip); in fallback_init_cip()
148 crypto_free_cipher(sctx->fallback.cip); in fallback_exit_cip()
149 sctx->fallback.cip = NULL; in fallback_exit_cip()
179 crypto_skcipher_clear_flags(sctx->fallback.skcipher, in setkey_fallback_skcipher()
181 crypto_skcipher_set_flags(sctx->fallback.skcipher, in setkey_fallback_skcipher()
184 return crypto_skcipher_setkey(sctx->fallback.skcipher, key, len); in setkey_fallback_skcipher()
194 skcipher_request_set_tfm(subreq, sctx->fallback.skcipher); in fallback_skcipher_crypt()
258 sctx->fallback.skcipher = crypto_alloc_skcipher(name, 0, in fallback_init_skcipher()
261 if (IS_ERR(sctx->fallback.skcipher)) { in fallback_init_skcipher()
262 pr_err("Allocating AES fallback algorithm %s failed\n", in fallback_init_skcipher()
264 return PTR_ERR(sctx->fallback.skcipher); in fallback_init_skcipher()
268 crypto_skcipher_reqsize(sctx->fallback.skcipher)); in fallback_init_skcipher()
276 crypto_free_skcipher(sctx->fallback.skcipher); in fallback_exit_skcipher()
382 crypto_skcipher_clear_flags(xts_ctx->fallback, CRYPTO_TFM_REQ_MASK); in xts_fallback_setkey()
383 crypto_skcipher_set_flags(xts_ctx->fallback, in xts_fallback_setkey()
386 return crypto_skcipher_setkey(xts_ctx->fallback, key, len); in xts_fallback_setkey()
447 skcipher_request_set_tfm(subreq, xts_ctx->fallback); in xts_aes_crypt()
494 xts_ctx->fallback = crypto_alloc_skcipher(name, 0, in xts_fallback_init()
497 if (IS_ERR(xts_ctx->fallback)) { in xts_fallback_init()
498 pr_err("Allocating XTS fallback algorithm %s failed\n", in xts_fallback_init()
500 return PTR_ERR(xts_ctx->fallback); in xts_fallback_init()
503 crypto_skcipher_reqsize(xts_ctx->fallback)); in xts_fallback_init()
511 crypto_free_skcipher(xts_ctx->fallback); in xts_fallback_exit()