Re: [PATCH v3 01/10] crypto: ecdsa - Convert byte arrays with key coordinates to digits

Lukas Wunner
2024-03-02T21:36:11Z

On Sat, Mar 02, 2024 at 04:19:49PM -0500, Stefan Berger wrote:
> On 3/2/24 09:00, Lukas Wunner wrote:
> > Maybe eliminate the for-loop as well?
> >
> > unsigned int o = nbytes & 7;
> > u64 msd = 0;
> >
> > if (o != 0) {
> > /* if key length is not a multiple of 64 bits (NIST P521) */
> > memcpy((u8 *)&msd + sizeof(msd) - o, in, o);
> > out[--ndigits] = be64_to_cpu(msd);
> > in += o;
> > }
> >
> > ecc_swap_digits(in, out, ndigits);
>
> Will take this for v5 with your Suggested-by:, ok?

Sure, feel free to, but better test it because I haven't. :-)

I'll look through the rest of the series tomorrow. %-)

Thanks,

Lukas