Re: [PATCH] nettle-types: drop w field from nettle_block16

2019-07-04 Thread Dmitry Eremin-Solenikov
Hello,

чт, 4 июл. 2019 г. в 10:06, Niels Möller :
>
> Dmitry Eremin-Solenikov  writes:
>
> > Hmm. This patch has to wait a bit, sent it without actual testing.
> > nettle_block16.w is used by eax (easy to copy with) and gcm
> > (might need performance checks on 32-bit architectures).
>
> I would expect that using the uint64_t field is as efficient (or better,
> if compilers do it really well), but I haven't checked the generated
> code on 32-bit archs.
>
> Can we delete the w field from the union without considering it an abi
> break? I'd expect size and alignment of the union to be unchanged on all
> but the most obscure architectures. If not, that part of the change has
> to wait.

I don't know. Size remains the same. And I'd assume that alignment
is controlled by uint64_t in this case (rather than unsigned long). However
these 3 patches (eax, gcm, nettle-types) are completely undependent
from the rest of CMAC-64, so they can be applied at any order.

-- 
With best wishes
Dmitry
___
nettle-bugs mailing list
nettle-bugs@lists.lysator.liu.se
http://lists.lysator.liu.se/mailman/listinfo/nettle-bugs


Re: SIV-CMAC

2019-07-04 Thread Miroslav Lichvar
On Wed, Jul 03, 2019 at 06:26:07AM +0200, Nikos Mavrogiannopoulos wrote:
> Looks good to me, but I'm adding Mirek in CC who is using SIV-AES-CMAC
> for NTS/NTP implementation to verify that the final code is sufficient
> for this implementation.

I've updated my code to use the Nettle's SIV-CMAC and it seems to be
working fine. It interoperates with the previous version of itself
(using Nikos' original SIV-CMAC implementation with slightly different
API) and two other NTS implementations (one based on openssl, not sure
about the other).

Thank you both!

-- 
Miroslav Lichvar
___
nettle-bugs mailing list
nettle-bugs@lists.lysator.liu.se
http://lists.lysator.liu.se/mailman/listinfo/nettle-bugs


Re: [PATCH] nettle-types: drop w field from nettle_block16

2019-07-04 Thread Niels Möller
Dmitry Eremin-Solenikov  writes:

> Hmm. This patch has to wait a bit, sent it without actual testing.
> nettle_block16.w is used by eax (easy to copy with) and gcm
> (might need performance checks on 32-bit architectures).

I would expect that using the uint64_t field is as efficient (or better,
if compilers do it really well), but I haven't checked the generated
code on 32-bit archs.

Can we delete the w field from the union without considering it an abi
break? I'd expect size and alignment of the union to be unchanged on all
but the most obscure architectures. If not, that part of the change has
to wait.

Regards,
/Niels

-- 
Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677.
Internet email is subject to wholesale government surveillance.
___
nettle-bugs mailing list
nettle-bugs@lists.lysator.liu.se
http://lists.lysator.liu.se/mailman/listinfo/nettle-bugs