Lines Matching defs:tctx

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