Lines Matching refs:tctx
69 geode_aes_crypt(const struct geode_aes_tfm_ctx *tctx, const void *src,
96 _writefield(AES_WRITEKEY0_REG, tctx->key);
112 struct geode_aes_tfm_ctx *tctx = crypto_tfm_ctx(tfm);
114 tctx->keylen = len;
117 memcpy(tctx->key, key, len);
128 tctx->fallback.cip->base.crt_flags &= ~CRYPTO_TFM_REQ_MASK;
129 tctx->fallback.cip->base.crt_flags |=
132 return crypto_cipher_setkey(tctx->fallback.cip, key, len);
138 struct geode_aes_tfm_ctx *tctx = crypto_skcipher_ctx(tfm);
140 tctx->keylen = len;
143 memcpy(tctx->key, key, len);
154 crypto_skcipher_clear_flags(tctx->fallback.skcipher,
156 crypto_skcipher_set_flags(tctx->fallback.skcipher,
159 return crypto_skcipher_setkey(tctx->fallback.skcipher, key, len);
165 const struct geode_aes_tfm_ctx *tctx = crypto_tfm_ctx(tfm);
167 if (unlikely(tctx->keylen != AES_KEYSIZE_128)) {
168 crypto_cipher_encrypt_one(tctx->fallback.cip, out, in);
172 geode_aes_crypt(tctx, in, out, AES_BLOCK_SIZE, NULL,
180 const struct geode_aes_tfm_ctx *tctx = crypto_tfm_ctx(tfm);
182 if (unlikely(tctx->keylen != AES_KEYSIZE_128)) {
183 crypto_cipher_decrypt_one(tctx->fallback.cip, out, in);
187 geode_aes_crypt(tctx, in, out, AES_BLOCK_SIZE, NULL,
194 struct geode_aes_tfm_ctx *tctx = crypto_tfm_ctx(tfm);
196 tctx->fallback.cip = crypto_alloc_cipher(name, 0,
199 if (IS_ERR(tctx->fallback.cip)) {
201 return PTR_ERR(tctx->fallback.cip);
209 struct geode_aes_tfm_ctx *tctx = crypto_tfm_ctx(tfm);
211 crypto_free_cipher(tctx->fallback.cip);
240 struct geode_aes_tfm_ctx *tctx = crypto_skcipher_ctx(tfm);
242 tctx->fallback.skcipher =
245 if (IS_ERR(tctx->fallback.skcipher)) {
247 return PTR_ERR(tctx->fallback.skcipher);
251 crypto_skcipher_reqsize(tctx->fallback.skcipher));
257 struct geode_aes_tfm_ctx *tctx = crypto_skcipher_ctx(tfm);
259 crypto_free_skcipher(tctx->fallback.skcipher);
265 const struct geode_aes_tfm_ctx *tctx = crypto_skcipher_ctx(tfm);
270 if (unlikely(tctx->keylen != AES_KEYSIZE_128)) {
274 skcipher_request_set_tfm(subreq, tctx->fallback.skcipher);
284 geode_aes_crypt(tctx, walk.src.virt.addr, walk.dst.virt.addr,