Re: Add AES Key Wrap (RFC 3394) in Nettle

2021-02-02 Thread Nicolas Mora
Le 2021-02-02 à 17 h 44, Nicolas Mora a écrit : Hello, I've added a merge request to implement AES key wrap and unwrap in Nettle [1]. Of course I forgot the link to the MR... https://git.lysator.liu.se/nettle/nettle/-/merge_requests/19 /Nicolas OpenPGP_signature Description: OpenPGP

Add AES Key Wrap (RFC 3394) in Nettle

2021-02-02 Thread Nicolas Mora
Hello, I've added a merge request to implement AES key wrap and unwrap in Nettle [1]. The MR is not complete, because the tests haven't been pushed yet and the documentation is missing, but if the new functionality is welcome to Nettle, I'd rather have some feedback on the code first, to

Re: [AArch64] Optimize GHASH

2021-02-02 Thread Martin Storsjö
On Tue, 2 Feb 2021, Michael Weiser wrote: clang does not, however, support the .arch_extension directive. 3.9.1 complains about the directive, 11.0.0 seems to silently ignore it: $ cat t.s .arch_extension crypto pmull v2.1q, v2.1d, v1.1d $ aarch64-unknown-linux-gnu-as -o t.o t.s $

Re: [AArch64] Optimize GHASH

2021-02-02 Thread Niels Möller
Maamoun TK writes: > On Sun, Jan 31, 2021 at 10:35 AM Niels Möller wrote: > >> For consistency, I'd prefer defining all needed macros using m4. > > The macros in gcm-hash.asm file are dependent on defines in the same file > (shared for macros and function implementation) as they are relevant

Re: [AArch64] Optimize GHASH

2021-02-02 Thread Maamoun TK
On Sun, Jan 31, 2021 at 10:35 AM Niels Möller wrote: > > --- /dev/null > > +++ b/arm64/v8/gcm-hash.asm > > @@ -0,0 +1,343 @@ > > > +C common macros: > > +.macro PMUL in, param1, param2 > > +pmull F.1q,\param2\().1d,\in\().1d > > +pmull2 F1.1q,\param2\().2d,\in\().2d > >

Re: [AArch64] Optimize GHASH

2021-02-02 Thread Maamoun TK
On Tue, Feb 2, 2021 at 7:22 PM Niels Möller wrote: > Michael Weiser writes: > > > FWIW, I like --enable-arm64-crypto because it would nicely match with a > > directory arm64/crypto for the source and the idea of enabling the > > crypto extension for the arm64 target of nettle and be in line

Re: [AArch64] Optimize GHASH

2021-02-02 Thread Niels Möller
Michael Weiser writes: > FWIW, I like --enable-arm64-crypto because it would nicely match with a > directory arm64/crypto for the source and the idea of enabling the > crypto extension for the arm64 target of nettle and be in line with > --enable-arm-neon and arm/neon as well. I'll rename both

Re: [AArch64] Optimize GHASH

2021-02-02 Thread Niels Möller
Michael Weiser writes: > I've downloaded binary builds of clang for aarch64 from > https://releases.llvm.org/download.html. 3.9.1 was the oldest prebuilt > toolchain I could find there and 11.0.0 the most recent. [...] > They also all support the .arch directive: > > $ cat t.s > .arch

Re: [AArch64] Optimize GHASH

2021-02-02 Thread Michael Weiser
Hi all, On Tue, Feb 02, 2021 at 08:23:39AM -0500, Jeffrey Walton wrote: > > > I think my mentioning of llvm-as was a red herring. Looking at the > > > output of clang -v, llvm-as isn't involved at all. This is supported by > > > the man page stating that llvm-as accepts LLVM assembly and emits

Re: [AArch64] Optimize GHASH

2021-02-02 Thread Jeffrey Walton
On Tue, Feb 2, 2021 at 8:19 AM Jeffrey Walton wrote: > > On Tue, Feb 2, 2021 at 8:00 AM Michael Weiser wrote: > > > > > > llvm-as wouldn't recognize pmull instruction without > > > > adding -march=armv8-a+crypto flag at least with the version I use > > > > "3.8.1" > > > > 3.8.1 was released in

Re: [AArch64] Optimize GHASH

2021-02-02 Thread Jeffrey Walton
On Tue, Feb 2, 2021 at 8:00 AM Michael Weiser wrote: > > > > llvm-as wouldn't recognize pmull instruction without > > > adding -march=armv8-a+crypto flag at least with the version I use "3.8.1" > > 3.8.1 was released in 2017. It might not support recent > aarch64 additions regarding .arch

Re: [AArch64] Optimize GHASH

2021-02-02 Thread Michael Weiser
Hello Niels, On Tue, Feb 02, 2021 at 07:40:44AM +0100, Niels Möller wrote: > > llvm-as wouldn't recognize pmull instruction without > > adding -march=armv8-a+crypto flag at least with the version I use "3.8.1" 3.8.1 was released in 2017. It might not support recent aarch64 additions regarding