Lines Matching refs:tctx
70 geode_aes_crypt(const struct geode_aes_tfm_ctx *tctx, const void *src, in geode_aes_crypt() argument
97 _writefield(AES_WRITEKEY0_REG, tctx->key); in geode_aes_crypt()
113 struct geode_aes_tfm_ctx *tctx = crypto_tfm_ctx(tfm); in geode_setkey_cip() local
115 tctx->keylen = len; in geode_setkey_cip()
118 memcpy(tctx->key, key, len); in geode_setkey_cip()
129 tctx->fallback.cip->base.crt_flags &= ~CRYPTO_TFM_REQ_MASK; in geode_setkey_cip()
130 tctx->fallback.cip->base.crt_flags |= in geode_setkey_cip()
133 return crypto_cipher_setkey(tctx->fallback.cip, key, len); in geode_setkey_cip()
139 struct geode_aes_tfm_ctx *tctx = crypto_skcipher_ctx(tfm); in geode_setkey_skcipher() local
141 tctx->keylen = len; in geode_setkey_skcipher()
144 memcpy(tctx->key, key, len); in geode_setkey_skcipher()
155 crypto_skcipher_clear_flags(tctx->fallback.skcipher, in geode_setkey_skcipher()
157 crypto_skcipher_set_flags(tctx->fallback.skcipher, in geode_setkey_skcipher()
160 return crypto_skcipher_setkey(tctx->fallback.skcipher, key, len); in geode_setkey_skcipher()
166 const struct geode_aes_tfm_ctx *tctx = crypto_tfm_ctx(tfm); in geode_encrypt() local
168 if (unlikely(tctx->keylen != AES_KEYSIZE_128)) { in geode_encrypt()
169 crypto_cipher_encrypt_one(tctx->fallback.cip, out, in); in geode_encrypt()
173 geode_aes_crypt(tctx, in, out, AES_BLOCK_SIZE, NULL, in geode_encrypt()
181 const struct geode_aes_tfm_ctx *tctx = crypto_tfm_ctx(tfm); in geode_decrypt() local
183 if (unlikely(tctx->keylen != AES_KEYSIZE_128)) { in geode_decrypt()
184 crypto_cipher_decrypt_one(tctx->fallback.cip, out, in); in geode_decrypt()
188 geode_aes_crypt(tctx, in, out, AES_BLOCK_SIZE, NULL, in geode_decrypt()
195 struct geode_aes_tfm_ctx *tctx = crypto_tfm_ctx(tfm); in fallback_init_cip() local
197 tctx->fallback.cip = crypto_alloc_cipher(name, 0, in fallback_init_cip()
200 if (IS_ERR(tctx->fallback.cip)) { in fallback_init_cip()
202 return PTR_ERR(tctx->fallback.cip); in fallback_init_cip()
210 struct geode_aes_tfm_ctx *tctx = crypto_tfm_ctx(tfm); in fallback_exit_cip() local
212 crypto_free_cipher(tctx->fallback.cip); in fallback_exit_cip()
241 struct geode_aes_tfm_ctx *tctx = crypto_skcipher_ctx(tfm); in geode_init_skcipher() local
243 tctx->fallback.skcipher = in geode_init_skcipher()
246 if (IS_ERR(tctx->fallback.skcipher)) { in geode_init_skcipher()
248 return PTR_ERR(tctx->fallback.skcipher); in geode_init_skcipher()
252 crypto_skcipher_reqsize(tctx->fallback.skcipher)); in geode_init_skcipher()
258 struct geode_aes_tfm_ctx *tctx = crypto_skcipher_ctx(tfm); in geode_exit_skcipher() local
260 crypto_free_skcipher(tctx->fallback.skcipher); in geode_exit_skcipher()
266 const struct geode_aes_tfm_ctx *tctx = crypto_skcipher_ctx(tfm); in geode_skcipher_crypt() local
271 if (unlikely(tctx->keylen != AES_KEYSIZE_128)) { in geode_skcipher_crypt()
275 skcipher_request_set_tfm(subreq, tctx->fallback.skcipher); in geode_skcipher_crypt()
285 geode_aes_crypt(tctx, walk.src.virt.addr, walk.dst.virt.addr, in geode_skcipher_crypt()