Lines Matching defs:op
70 geode_aes_crypt(struct geode_aes_op *op)
76 if (op->len == 0)
86 if (op->dir == AES_DIR_ENCRYPT)
93 if (op->mode == AES_MODE_CBC) {
95 _writefield(AES_WRITEIV0_REG, op->iv);
98 if (!(op->flags & AES_FLAGS_HIDDENKEY)) {
100 _writefield(AES_WRITEKEY0_REG, op->key);
103 ret = do_crypt(op->src, op->dst, op->len, flags);
106 if (op->mode == AES_MODE_CBC)
107 _readfield(AES_WRITEIV0_REG, op->iv);
111 return op->len;
119 struct geode_aes_op *op = crypto_tfm_ctx(tfm);
122 op->keylen = len;
125 memcpy(op->key, key, len);
138 op->fallback.cip->base.crt_flags &= ~CRYPTO_TFM_REQ_MASK;
139 op->fallback.cip->base.crt_flags |= (tfm->crt_flags & CRYPTO_TFM_REQ_MASK);
141 ret = crypto_cipher_setkey(op->fallback.cip, key, len);
144 tfm->crt_flags |= (op->fallback.cip->base.crt_flags & CRYPTO_TFM_RES_MASK);
152 struct geode_aes_op *op = crypto_tfm_ctx(tfm);
155 op->keylen = len;
158 memcpy(op->key, key, len);
171 op->fallback.blk->base.crt_flags &= ~CRYPTO_TFM_REQ_MASK;
172 op->fallback.blk->base.crt_flags |= (tfm->crt_flags & CRYPTO_TFM_REQ_MASK);
174 ret = crypto_blkcipher_setkey(op->fallback.blk, key, len);
177 tfm->crt_flags |= (op->fallback.blk->base.crt_flags & CRYPTO_TFM_RES_MASK);
188 struct geode_aes_op *op = crypto_blkcipher_ctx(desc->tfm);
191 desc->tfm = op->fallback.blk;
204 struct geode_aes_op *op = crypto_blkcipher_ctx(desc->tfm);
207 desc->tfm = op->fallback.blk;
218 struct geode_aes_op *op = crypto_tfm_ctx(tfm);
220 if (unlikely(op->keylen != AES_KEYSIZE_128)) {
221 crypto_cipher_encrypt_one(op->fallback.cip, out, in);
225 op->src = (void *) in;
226 op->dst = (void *) out;
227 op->mode = AES_MODE_ECB;
228 op->flags = 0;
229 op->len = AES_MIN_BLOCK_SIZE;
230 op->dir = AES_DIR_ENCRYPT;
232 geode_aes_crypt(op);
239 struct geode_aes_op *op = crypto_tfm_ctx(tfm);
241 if (unlikely(op->keylen != AES_KEYSIZE_128)) {
242 crypto_cipher_decrypt_one(op->fallback.cip, out, in);
246 op->src = (void *) in;
247 op->dst = (void *) out;
248 op->mode = AES_MODE_ECB;
249 op->flags = 0;
250 op->len = AES_MIN_BLOCK_SIZE;
251 op->dir = AES_DIR_DECRYPT;
253 geode_aes_crypt(op);
259 struct geode_aes_op *op = crypto_tfm_ctx(tfm);
261 op->fallback.cip = crypto_alloc_cipher(name, 0,
264 if (IS_ERR(op->fallback.cip)) {
266 return PTR_ERR(op->fallback.cip);
274 struct geode_aes_op *op = crypto_tfm_ctx(tfm);
276 crypto_free_cipher(op->fallback.cip);
277 op->fallback.cip = NULL;
309 struct geode_aes_op *op = crypto_blkcipher_ctx(desc->tfm);
313 if (unlikely(op->keylen != AES_KEYSIZE_128))
318 op->iv = walk.iv;
321 op->src = walk.src.virt.addr,
322 op->dst = walk.dst.virt.addr;
323 op->mode = AES_MODE_CBC;
324 op->len = nbytes - (nbytes % AES_MIN_BLOCK_SIZE);
325 op->dir = AES_DIR_DECRYPT;
327 ret = geode_aes_crypt(op);
341 struct geode_aes_op *op = crypto_blkcipher_ctx(desc->tfm);
345 if (unlikely(op->keylen != AES_KEYSIZE_128))
350 op->iv = walk.iv;
353 op->src = walk.src.virt.addr,
354 op->dst = walk.dst.virt.addr;
355 op->mode = AES_MODE_CBC;
356 op->len = nbytes - (nbytes % AES_MIN_BLOCK_SIZE);
357 op->dir = AES_DIR_ENCRYPT;
359 ret = geode_aes_crypt(op);
370 struct geode_aes_op *op = crypto_tfm_ctx(tfm);
372 op->fallback.blk = crypto_alloc_blkcipher(name, 0,
375 if (IS_ERR(op->fallback.blk)) {
377 return PTR_ERR(op->fallback.blk);
385 struct geode_aes_op *op = crypto_tfm_ctx(tfm);
387 crypto_free_blkcipher(op->fallback.blk);
388 op->fallback.blk = NULL;
422 struct geode_aes_op *op = crypto_blkcipher_ctx(desc->tfm);
426 if (unlikely(op->keylen != AES_KEYSIZE_128))
433 op->src = walk.src.virt.addr,
434 op->dst = walk.dst.virt.addr;
435 op->mode = AES_MODE_ECB;
436 op->len = nbytes - (nbytes % AES_MIN_BLOCK_SIZE);
437 op->dir = AES_DIR_DECRYPT;
439 ret = geode_aes_crypt(op);
452 struct geode_aes_op *op = crypto_blkcipher_ctx(desc->tfm);
456 if (unlikely(op->keylen != AES_KEYSIZE_128))
463 op->src = walk.src.virt.addr,
464 op->dst = walk.dst.virt.addr;
465 op->mode = AES_MODE_ECB;
466 op->len = nbytes - (nbytes % AES_MIN_BLOCK_SIZE);
467 op->dir = AES_DIR_ENCRYPT;
469 ret = geode_aes_crypt(op);