Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1691045
| From | Herbert Xu <herbert@gondor.apana.org.au> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH V6 5/7] crypto: AES CBC multi-buffer glue code |
| Date | 2017-07-19 09:10 +0200 |
| Message-ID | <u4Rhp-5as-51@gated-at.bofh.it> (permalink) |
| References | <tX8S5-7XZ-3@gated-at.bofh.it> <tX8S6-7XZ-17@gated-at.bofh.it> <u4tyq-6Oe-23@gated-at.bofh.it> <u4Lvk-15W-9@gated-at.bofh.it> <u4LEZ-1qm-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Tue, Jul 18, 2017 at 06:18:59PM -0700, Megha Dey wrote:
>
> > >> +/*
> > >> + * CRYPTO_ALG_ASYNC flag is passed to indicate we have an ablk
> > >> + * scatter-gather walk.
> > >> + */
> > >> +static struct skcipher_alg aes_cbc_mb_alg = {
> > >> + .base = {
> > >> + .cra_name = "cbc(aes)",
> > >> + .cra_driver_name = "cbc-aes-aesni-mb",
> > >> + .cra_priority = 500,
> > >> + .cra_flags = CRYPTO_ALG_INTERNAL,
> > >> + .cra_blocksize = AES_BLOCK_SIZE,
> > >> + .cra_ctxsize = CRYPTO_AES_CTX_SIZE,
> > >> + .cra_module = THIS_MODULE,
> > >> + },
> > >> + .min_keysize = AES_MIN_KEY_SIZE,
> > >> + .max_keysize = AES_MAX_KEY_SIZE,
> > >> + .ivsize = AES_BLOCK_SIZE,
> > >> + .setkey = aes_set_key,
> > >> + .encrypt = mb_aes_cbc_encrypt,
> > >> + .decrypt = mb_aes_cbc_decrypt
> > >> +};
> > >
> > > So this claims to be a sync algorithm. Is this really the case?
>
> yes, the inner algorithm is sync whereas the outer algorithm is async.
Are you saying that once mb_aes_cbc_encrypt returns it will never
touch the input/output again? This doesn't seem to agree with the
actual code:
+ if (!ret_rctx) {
+ /* we submitted a job, but none completed */
+ /* just notify the caller */
+ notify_callback(rctx, cstate, -EINPROGRESS);
+ return 0;
+ }
Just because an algorithm is internal doesn't mean that it can
arbitrarily violate the crypto API requirements.
Cheers,
--
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
Re: [PATCH V6 5/7] crypto: AES CBC multi-buffer glue code Tim Chen <tim.c.chen@linux.intel.com> - 2017-07-19 03:00 +0200
Re: [PATCH V6 5/7] crypto: AES CBC multi-buffer glue code Megha Dey <megha.dey@intel.com> - 2017-07-19 03:10 +0200
Re: [PATCH V6 5/7] crypto: AES CBC multi-buffer glue code Herbert Xu <herbert@gondor.apana.org.au> - 2017-07-19 09:10 +0200
csiph-web