Re: GnuTLS testsuite error on ppc64 after nettle upgrade

2021-02-10 Thread Andreas Metzler
On 2021-02-10 Daiki Ueno wrote: > ni...@lysator.liu.se (Niels Möller) writes: [...] > > Tentative patch below, but I need to extend the tests to get proper test > > coverage of this case. > Thank you so much! The patch fixes the issue (tested on gcc cfarm). Hello, Just for completeness sake I

Re: GnuTLS testsuite error on ppc64 after nettle upgrade

2021-02-10 Thread Niels Möller
Daiki Ueno writes: > Thank you so much! The patch fixes the issue (tested on gcc cfarm). Thanks for testing. Pushed to master branch now. BTW, I could test ppc64el locally on my laptop fairly easily, I used: # apt-get install -t testing gcc-powerpc64le-linux-gnu # dpkg --add-architecture

Re: GnuTLS testsuite error on ppc64 after nettle upgrade

2021-02-10 Thread Daiki Ueno
Hello, ni...@lysator.liu.se (Niels Möller) writes: > ni...@lysator.liu.se (Niels Möller) writes: > >> I would guess that means that we got 209 bytes, including the 16-byte >> poly1305 authentication tag. Message size is then 209 - 16 = 193 bytes. >> If the first byte is a TLS packet type, the

Re: GnuTLS testsuite error on ppc64 after nettle upgrade

2021-02-10 Thread Niels Möller
Jeffrey Walton writes: > Or you can use the test vectors from Wei Dai's Crypto++. The project > already generated test vectors for 1x, 4x and 12x blocks. The test > vectors include Bernstein's ChaCha and the IETF version. Also see >

Re: GnuTLS testsuite error on ppc64 after nettle upgrade

2021-02-09 Thread Jeffrey Walton
On Tue, Feb 9, 2021 at 3:07 PM Niels Möller wrote: > > ni...@lysator.liu.se (Niels Möller) writes: > > > I would guess that means that we got 209 bytes, including the 16-byte > > poly1305 authentication tag. Message size is then 209 - 16 = 193 bytes. > > If the first byte is a TLS packet type,

Re: GnuTLS testsuite error on ppc64 after nettle upgrade

2021-02-09 Thread Niels Möller
ni...@lysator.liu.se (Niels Möller) writes: > I would guess that means that we got 209 bytes, including the 16-byte > poly1305 authentication tag. Message size is then 209 - 16 = 193 bytes. > If the first byte is a TLS packet type, the "length: 192" in the next to > last line makes sense if the

Re: GnuTLS testsuite error on ppc64 after nettle upgrade

2021-02-09 Thread Niels Möller
Andreas Metzler writes: > Afaict from > https://gitlab.com/gnutls/gnutls/-/blob/master/lib/nettle/cipher.c#L815 > it does use chacha_poly1305_encrypt/decrypt/update/digest/set_key/set_nonce. I see. (But closer to line 857). I wonder what the precise message size was. Log says server|<5>|

Re: GnuTLS testsuite error on ppc64 after nettle upgrade

2021-02-09 Thread Andreas Metzler
On 2021-02-09 Niels Möller wrote: > Andreas Metzler writes: > > I have bisected this[1] in nettle git and found > > > > 58a0301437e9beb23130423ff1063a67b6f2b43b > > ppc: New assembly for chacha_core4, doing four blocks in parallel. > This is indeed new code in nettle-3.7, and particularly

Re: GnuTLS testsuite error on ppc64 after nettle upgrade

2021-02-09 Thread Niels Möller
Andreas Metzler writes: > I have bisected this[1] in nettle git and found > > 58a0301437e9beb23130423ff1063a67b6f2b43b > ppc: New assembly for chacha_core4, doing four blocks in parallel. This is indeed new code in nettle-3.7, and particularly suspect since the test fails only on ppc. Do you

Re: GnuTLS testsuite error on ppc64 after nettle upgrade

2021-02-09 Thread Andreas Metzler
On 2021-02-09 Andreas Metzler wrote: > Hello, > Upgrading nettle from 3.6 to 3.7 triggers a GnuTLS 3.7.0 testsuite > error on both ppc64 and ppc64el: > (sid_ppc64el-dchroot)ametzler@plummer:~/GNUTLS/gnutls28-3.7.0/b4deb/tests$ > ./min [...] > testing chacha20-poly1305 > testing

GnuTLS testsuite error on ppc64 after nettle upgrade

2021-02-08 Thread Andreas Metzler
Hello, Upgrading nettle from 3.6 to 3.7 triggers a GnuTLS 3.7.0 testsuite error on both ppc64 and ppc64el: (sid_ppc64el-dchroot)ametzler@plummer:~/GNUTLS/gnutls28-3.7.0/b4deb/tests$ ./min i-record-2 testing aes-cbc testing aes-cbc-sha256 testing aes-gcm testing aes-ccm testing aes-ccm-8 testing