linux-crypto.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Herbert Xu <herbert@gondor.apana.org.au>
To: Corentin Labbe <clabbe.montjoie@gmail.com>
Cc: Eric Biggers <ebiggers@kernel.org>,
	davem@davemloft.net, linux-crypto@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [BUG] crypto: export() overran state buffer on test vector
Date: Sat, 8 Feb 2020 16:57:13 +0800	[thread overview]
Message-ID: <20200208085713.ftuqxhatk6iioz7e@gondor.apana.org.au> (raw)
In-Reply-To: <20200207104659.GA10979@Red>

On Fri, Feb 07, 2020 at 11:46:59AM +0100, Corentin Labbe wrote:
>
> My goal is to do like n2-crypto/rk3288crypto/etc..., fallback for init/update/final/finup and only do stuff with digest().
> So I have just exactly copied what they do.

n2 at least is totally broken wrt import/export.  The other ones
would work provided that the fallback have the same statesize as
the generic sha implementations.

Are you not using the standard state sizes?

This should probably be switched over to lib/crypto or at least
shash.

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

  reply	other threads:[~2020-02-08  8:58 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-06  8:54 [BUG] crypto: export() overran state buffer on test vector Corentin Labbe
2020-02-07  6:57 ` Eric Biggers
2020-02-07 10:46   ` Corentin Labbe
2020-02-08  8:57     ` Herbert Xu [this message]
2020-02-11 19:21       ` Corentin Labbe
2020-02-12  2:06         ` Herbert Xu
2020-02-12 18:57           ` Corentin Labbe
2020-02-13  5:05             ` 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=20200208085713.ftuqxhatk6iioz7e@gondor.apana.org.au \
    --to=herbert@gondor.apana.org.au \
    --cc=clabbe.montjoie@gmail.com \
    --cc=davem@davemloft.net \
    --cc=ebiggers@kernel.org \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@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).