lkml.org 
[lkml]   [2018]   [Nov]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3 1/3] crypto: streebog - add Streebog hash function
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,

\
 
 \ /
  Last update: 2018-11-05 19:24    [W:0.279 / U:0.112 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site