linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Herbert Xu <herbert@gondor.apana.org.au>
To: Gilad Ben-Yossef <gilad@benyossef.com>
Cc: "David S. Miller" <davem@davemloft.net>,
	hadar.gat@arm.com, Ofir Drang <ofir.drang@arm.com>,
	stable@vger.kernel.org,
	Linux Crypto Mailing List <linux-crypto@vger.kernel.org>,
	Linux kernel mailing list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] crypto: ccree: fix iv copying for small buffers
Date: Tue, 19 Jun 2018 22:27:13 +0800	[thread overview]
Message-ID: <20180619142713.dzipyarpb23a7qne@gondor.apana.org.au> (raw)
In-Reply-To: <CAOtvUMdtafGwXJFD0Tm1tx1q+TxRsB4nwEKxumE7=--_PMCZrQ@mail.gmail.com>

On Sun, Jun 17, 2018 at 01:06:42PM +0300, Gilad Ben-Yossef wrote:
>
> It was ctr(aes). I wrongly assumed that we are supposed to unconditionally
> copy
> the cipher-text block post operation and let the caller do with it what it
> wants and so the
> code now does that for all cipher operations unconditionally.

For CTR it doesn't matter whether the last block is less than a
block, you should still increment the counter.

> So what is a good description of what we are supposed to provide in that
> field post operation?
> The next IV? but as you stated, that is not necessarily useful for all
> ciphers.

When in doubt, please refer to the generic implementation.  If
that is still unclear or if it seems wrong, please post to the
list.

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

  parent reply	other threads:[~2018-06-19 14:27 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-07  8:58 [PATCH] crypto: ccree: fix iv copying for small buffers Gilad Ben-Yossef
2018-06-07  9:02 ` Gilad Ben-Yossef
2018-06-08  7:30   ` Harsh Jain
2018-06-13  6:30   ` Herbert Xu
     [not found]     ` <CAOtvUMdtafGwXJFD0Tm1tx1q+TxRsB4nwEKxumE7=--_PMCZrQ@mail.gmail.com>
2018-06-19 14:27       ` Herbert Xu [this message]
2018-06-21 13:35         ` Gilad Ben-Yossef
2018-06-22  6:53           ` Herbert Xu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180619142713.dzipyarpb23a7qne@gondor.apana.org.au \
    --to=herbert@gondor.apana.org.au \
    --cc=davem@davemloft.net \
    --cc=gilad@benyossef.com \
    --cc=hadar.gat@arm.com \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ofir.drang@arm.com \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).