From: Vitaly Chikunov <vt@altlinux.org>
To: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Herbert Xu <herbert@gondor.apana.org.au>,
"David S. Miller" <davem@davemloft.net>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Thomas Gleixner <tglx@linutronix.de>,
Philippe Ombredanne <pombredanne@nexb.com>,
Kate Stewart <kstewart@linuxfoundation.org>,
"open list:HARDWARE RANDOM NUMBER GENERATOR CORE"
<linux-crypto@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v3 1/3] crypto: streebog - add Streebog hash function
Date: Mon, 5 Nov 2018 21:23:14 +0300 [thread overview]
Message-ID: <20181105182314.c7xdsolvxr2iyd5n@sole.flsd.net> (raw)
In-Reply-To: <CAKv+Gu9LSUNwW_3E3QtxV123u=mU-B+p6FFRAkWq8_e9Jsgb2w@mail.gmail.com>
Ard,
On Mon, Nov 05, 2018 at 02:22:21PM +0100, Ard Biesheuvel wrote:
>
> > +static const struct streebog_uint512 buffer512 = { {
> > + cpu_to_le64(0x200ULL),
>
> Can we keep the memory representation in native endianness, and only
> swab the in/output [where needed]?
I hope you do not insist on that?
The code is using same primitives to add/xor/permute with data from
these arrays (buffer512[] and C[], those which use cpu_to_le64), and
from generic data buffers. Having these arrays in native endianness will
cause complexities - code split and duplications. For example, XLPS
permutation will require two versions, with one accessing (y) as is and
another as cpu_to_le64(y).
The code is based on canonical implementation by RFC 6986 ("GOST R
34.11-2012: Hash Function") author, and I don't want it do deviate that
much from the original, which would complicate algorithm reviews.
Thanks,
next prev parent reply other threads:[~2018-11-05 18:23 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-24 3:23 [PATCH v3 0/3] crypto: streebog - add Streebog hash function Vitaly Chikunov
2018-10-24 3:23 ` [PATCH v3 1/3] " Vitaly Chikunov
2018-11-05 13:22 ` Ard Biesheuvel
2018-11-05 14:36 ` Vitaly Chikunov
2018-11-05 18:23 ` Vitaly Chikunov [this message]
2018-11-05 18:58 ` Ard Biesheuvel
2018-10-24 3:23 ` [PATCH v3 2/3] crypto: streebog - register Streebog in hash info for IMA Vitaly Chikunov
2018-11-05 13:23 ` Ard Biesheuvel
2018-10-24 3:23 ` [PATCH v3 3/3] crypto: streebog - add Streebog test vectors Vitaly Chikunov
2018-11-05 13:24 ` Ard Biesheuvel
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=20181105182314.c7xdsolvxr2iyd5n@sole.flsd.net \
--to=vt@altlinux.org \
--cc=ard.biesheuvel@linaro.org \
--cc=davem@davemloft.net \
--cc=gregkh@linuxfoundation.org \
--cc=herbert@gondor.apana.org.au \
--cc=kstewart@linuxfoundation.org \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pombredanne@nexb.com \
--cc=tglx@linutronix.de \
/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).