Status update

2021-02-25 Thread Niels Möller
moment. I often get some hacking time on Wednesdays and weekends, but not every week. Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677. Internet email is subject to wholesale government surveillance. ___ nettle-bugs ma

ANNOUNCE: Nettle-3.7.1

2021-02-17 Thread Niels Möller
/archive/nettle-3.7.1.tar.gz Happy hacking, /Niels Möller NEWS for the Nettle 3.7.1 release This is primarily a bug fix release, fixing a couple of problems found in Nettle-3.7. The new version is intended to be fully source and binary compatible with Nettle-3.6

Arcfour status

2021-02-14 Thread Niels Möller
, /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

Bug fix release Nettle-3.7.1 ?

2021-02-10 Thread Niels Möller
-- 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

Re: GnuTLS testsuite error on ppc64 after nettle upgrade

2021-02-10 Thread Niels Möller
tsuite/chacha-test.c#L193, and the code from line 219 and on is new. 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@

Re: GnuTLS testsuite error on ppc64 after nettle upgrade

2021-02-10 Thread Niels Möller
horitative test vectors. I've pushed test updates to the branch fix-chacha-counter, and ci builds now fail on ppc64. The fix posted to the list appears to work, I'll push that to the branch in a moment. Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677. Internet

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 >

Re: GnuTLS testsuite error on ppc64 after nettle upgrade

2021-02-09 Thread Niels Möller
be decrypted correctly. I'll investigate. What is the source of the incoming packets? GnuTLS of the same version, also using Nettle-3.7, or the previous version, or some prerecorded data? It's not obvious to me if the error is on the sender or the receiver side. Regards, /Niels -- Niels Mölle

Re: GnuTLS testsuite error on ppc64 after nettle upgrade

2021-02-09 Thread Niels Möller
ppc. Do you know what the code path is? Is GnuTLS using Nettle's chacha_poly1305_* functions, or is it calling chacha and poly1305 functions separately? Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677. Internet email is subject to wholesale government

Re: [AArch64] Optimize GHASH

2021-02-06 Thread Niels Möller
; Just out of curiosity: I assume there's no aesni-pmull-like GCM > implementation for x86_64? That's right. There's some assembly code, but using the same algorithm as the C implementation, based on table lookups. Regards, /Niels -- Niels Möller. PGP-encrypted em

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

2021-02-03 Thread Niels Möller
6A6A6A6A6A6 That would work for this particular value, since it is invariant under byte swapping. But in general an uint64_t iv would be endian dpendent. Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677. Internet email

Re: [S390x] Optimize AES modes

2021-02-03 Thread Niels Möller
dmins of the gnutls project, and the key will also be technically accessible by gitlab staff). [...] Do not reuse your LinuxOne Account keys on third-party applications. I also don't understand what "third-party applications" means in this context, but I'd guess gitlab could be one?

Re: [S390x] Optimize AES modes

2021-02-03 Thread Niels Möller
t clean up the remote state between builds. I wonder if it would be more reliable to run make dist PACKAGE_VERSION=snapshot on the ci build machine, and copy the resulting tarball to the remote machine for build and test. The commands run on the remote machine should unpack the snapshot in a fr

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

2021-02-03 Thread Niels Möller
ni...@lysator.liu.se (Niels Möller) writes: > So to be concrete on the interface comments, I'd suggest something like > > void > nist_keywrap16(const void *ctx, nettle_cipher_func *encrypt, >const uint8_t *iv, size_t ciphertext_length, >uint8_t

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

2021-02-03 Thread Niels Möller
file. test_main should contain one fucntion call per test case, calling whatever helper functions are needed. It's probably sufficient to test algorithm-specific convenience functions. Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677. Internet email is subject t

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)

Re: [AArch64] Optimize GHASH

2021-02-02 Thread Niels Möller
rename both the directory and the configure option then. 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.ly

Re: [AArch64] Optimize GHASH

2021-02-02 Thread Niels Möller
hen. I've pushed a change to use that, instead of modifying CFLAGS. Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677. Internet email is subject to wholesale government surveillance. ___ nettle-bugs mailing list nett

Re: [AArch64] Optimize GHASH

2021-02-01 Thread Niels Möller
errors for pmull using. Is there any documentation for llvm-as? Best I could find is the minimal man page https://www.llvm.org/docs/CommandGuide/llvm-as.html, with no info whatsoever on, e.g., supported pseudoops. Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677. Int

Re: Add pbkdf2_hmac_sha384 and pbkdf2_hmac_sha512 to Nettle

2021-02-01 Thread Niels Möller
Nicolas Mora writes: > I just opened a merge request [1] to add pbkdf2_hmac_sha384 and > pbkdf2_hmac_sha512 to the Nettle library. Looks good, merged to the master-updates branch with minor comment edits. Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid 36

Re: [AArch64] Optimize GHASH

2021-01-31 Thread Niels Möller
odify CFLAGS, and in particular using compiler-specific options. Is there any way to use a pseudoop in the .asm file instead, similar to the .fpu neon used in the arm/neon/ files? One could also consider introducing a separate ASMFLAGS make variable (suggested earlier by Jeffrey Walton, for other rea

Re: [AArch64] Optimize GHASH

2021-01-31 Thread Niels Möller
main patch, I'll write that in a separate mail. 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.lys

Re: [AArch64] Optimize GHASH

2021-01-30 Thread Niels Möller
unused define") on top? 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://

Re: Old ARM Neon code for salsa20 and chacha

2021-01-28 Thread Niels Möller
ni...@lysator.liu.se (Niels Möller) writes: > For processors that can issue two instructions per cycle, and with > shorter latency, scalar code (i.e., code using only the general purpose > 32-bit registers) could get more or less the same throughput. The scalar > code also gets t

Re: [AArch64] Optimize GHASH

2021-01-26 Thread Niels Möller
en following along closely, but it would be if gcm_hash could work with a minimum of data shuffling, and let gsm_init_key move the precomputed data around for best layout. Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677. Internet email is subject to wholesal

Re: [AArch64] Optimize GHASH

2021-01-24 Thread Niels Möller
to 1000 . If I remember correctly, the implementation using 8 bit indexing, including the table layout, closely follows the original gcm papers. Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677. Internet email is subject to wholesale gove

Re: [S390x] Optimize AES modes

2021-01-20 Thread Niels Möller
rds, /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

Old ARM Neon code for salsa20 and chacha (was: Re: Release of Nettle-3.7?)

2021-01-13 Thread Niels Möller
ni...@lysator.liu.se (Niels Möller) writes: > I've done a benchmark run of nettle-3.6 on the GMP "nanot2" system, with > a Cortex-A9 processor. The installed compiler is gcc-5.4 (a few years > old). I choose Cortex-A9 for this test in attempt to reproduce my old numbers. Ev

Re: Release of Nettle-3.7?

2021-01-13 Thread Niels Möller
r in the details in how vst1.8 is scheduled, and that's why vst1.8 is more or less efficient. Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677. Internet email is subject to wholesale government surveillance. ___ nettle

Re: [AArch64] Optimize GHASH

2021-01-05 Thread Niels Möller
ni...@lysator.liu.se (Niels Möller) writes: > Maamoun TK writes: > >> I made a merge request in the main repo that enables optimized GHASH on >> AArch64 architecture. > > Nice! I've had a quick first look. For the organization, I think aarch64 > assembly should go i

Re: Compile issue on Solaris 11.3

2021-01-04 Thread Niels Möller
you using? If it's difficult to upgrade the assembler, it could be worked around by replacing the instructions with equivalent .byte sequences. Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677. Internet email is subject to wholesale government sur

ANNOUNCE: Nettle-3.7

2021-01-04 Thread Niels Möller
/~nisse/nettle/nettle.html. The release can be downloaded from https://ftp.gnu.org/gnu/nettle/nettle-3.7.tar.gz ftp://ftp.gnu.org/gnu/nettle/nettle-3.7.tar.gz https://www.lysator.liu.se/~nisse/archive/nettle-3.7.tar.gz Happy hacking, /Niels Möller NEWS for the Nettle 3.7 release

Re: Release of Nettle-3.7?

2021-01-02 Thread Niels Möller
appreciated. 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

Re: Release of Nettle-3.7?

2021-01-01 Thread Niels Möller
ni...@lysator.liu.se (Niels Möller) writes: > Thanks for investigating. So from these charts, it looks like the > single-block Neon code is of no benefit on any of the test systems. And > even significantly slower on the tinkerboard and rpi4. > > If that's right, the code shoul

Re: Release of Nettle-3.7?

2021-01-01 Thread Niels Möller
Michael Weiser writes: > Happy new year, Niels and all around, > > On Wed, Dec 30, 2020 at 09:12:24PM +0100, Niels Möller wrote: > >> > It comes out at around seven cycles per block slowdown for chacha-3core >> > and five for salsa20-2core. I trace this to vst1

Re: Release of Nettle-3.7?

2020-12-30 Thread Niels Möller
. At the time, benchmarked on a pandaboard (cortex a9), if I remember correctly. Is it for a fat build? If so, it's possibly that the fat setup logic selects the C implementation is this hacked setup (but on the other hand, I'd guess a fat build may just failed at link time if these files are remov

Re: Failing gnutls tests

2020-12-28 Thread Niels Möller
Andreas Metzler writes: > On 2020-12-28 Niels Möller > wrote: >> Hi, recent gnutls tests on the gitlab ci system all fail the test >> "testpkcs11.sh". See e.g., >> https://gitlab.com/gnutls/nettle/-/jobs/932664781. First failure was an >> a m

Failing gnutls tests

2020-12-28 Thread Niels Möller
o too, see https://gitlab.com/gnutls/gnutls/-/pipelines. Any gnutls people on the list who could have a look? Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677. Internet email is subject to wholesale government su

Make --enable-fat the default? (was: Re: Release of Nettle-3.7?)

2020-12-26 Thread Niels Möller
ni...@lysator.liu.se (Niels Möller) writes: > Hi, I wonder if it would make sense to try to cut a release pretty soon > (and without any arm64 changes)? Previous release was made end of April, > and there's been quite a few improvements since then. I've pushed a couple of changes to

Re: Release of Nettle-3.7?

2020-12-25 Thread Niels Möller
reuse SRCp32 for the second load of the same data, further down (assuming r3 really is free to use for this purpose; if we have to save and restore a register to do this, your approach with temporary use of r12 seems better). Another option, with no need for an extra registerm is to just use post-increm

Re: Release of Nettle-3.7?

2020-12-21 Thread Niels Möller
'd need a lot of vrev64.u32s to basically revert the 32-bit > transposition happening upon load and save to end up with identical > matrices to LE. If that's an easier way to get it working, I think it's a good start. I'd expect that's still give a reasonable speedup over the 1-way version

Re: [AArch64] Optimize GHASH

2020-12-21 Thread Niels Möller
Maamoun TK writes: > Thank you, I made a commit with the changes. Thanks! Merged now. Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677. Internet email is subject to wholesale government surveillance. ___ nettle-b

Re: [AArch64] Optimize GHASH

2020-12-20 Thread Niels Möller
r comments on the mr (https://git.lysator.liu.se/nettle/nettle/-/merge_requests/16 for reference). Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677. Internet email is subject to wholesale government surveillance. ___ nett

Re: [AArch64] Optimize GHASH

2020-12-19 Thread Niels Möller
are present at runtime? Some preprocessor check of glibc version in fat-ppc.c could work too, if that's simpler. Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677. Internet email is subject to wholesale government

Re: Release of Nettle-3.7?

2020-12-19 Thread Niels Möller
ction the soname. The recent release of gmp-6.2.0 is of this form, and has libtool version 14:0:4, 14 - 4 = 10. Am I getting the libtool covnentions right? Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677. Internet email is subject to wholesale governm

Re: CPU feature detection for Nettle-3.7?

2020-12-19 Thread Niels Möller
embler* needs to recognize the instructions, and that could potentially be worked around by coding instructions as equivalent byte sequences instead. Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677. Internet email is subject to wholesale government

Re: Release of Nettle-3.7?

2020-12-19 Thread Niels Möller
ge has to be prevented by other means, e.g., dependencies in the packaging system. Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677. Internet email is subject to wholesale government surveillance. ___ nettle-bugs mailing list nettl

Re: [AArch64] Optimize GHASH

2020-12-19 Thread Niels Möller
r cores. If there's some way to setup (and restore) a thread-local signal handler for SIGILL, that would be safer, but I don't know if that's at all possible. Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677. Internet email is subject to whol

Re: CPU feature detection for Nettle-3.7?

2020-12-19 Thread Niels Möller
, but I'm not aware of any easy fix. 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.li

Re: Release of Nettle-3.7?

2020-12-19 Thread Niels Möller
ies to be a bit more clever, with registers representing either odd or even words from both blocks. Not sure how endianness affects the code to move words around. Byte swapping should go close to the final stores, but after the addition of the initial state. Regards, /Niels -- Niels Möller. PGP-

Re: [AArch64] Optimize GHASH

2020-12-18 Thread Niels Möller
igured out how to build and test for that configuration. Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677. Internet email is subject to wholesale government surveillance. ___ nettle-bugs mailing list nettl

Re: Release of Nettle-3.7?

2020-12-18 Thread Niels Möller
llaneous: * Use a few more gmp-6.1 functions: mpn_cnd_add_n, mpn_cnd_sub_n, mpn_cnd_swap. Delete corresponding internal Nettle functions. * Convert all assembly files to use the default m4 quote characters. -- Niels Möller. PGP-encrypted email is p

Re: [AArch64] Optimize GHASH

2020-12-17 Thread Niels Möller
which assembly files we should use if target host is aarch64, but ABI=32? I guess the arm/v6/ code can be used unconditionally. Can we also use arm/neon/ code unconditionally? Do you agre with aiming for a release pretty soon, including the new powerpc64 code, but no aarch64 code? Regards, /Niels --

Release of Nettle-3.7?

2020-12-15 Thread Niels Möller
://lists.debian.org/debian-devel-announce/2020/11/msg2.html Nettle-3.7 should be abi-compatible, and with unchanged soname, so I'm not sure if it would count as a "transition" in the debian world. Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677. Inte

Re: PPC chacha

2020-12-02 Thread Niels Möller
t powerpc processors (starting from https://en.wikipedia.org/wiki/Power_Mac_G5, if I understand it correctly?). Probably not worth much effort to support these, but it would be good to at least know if the new assembly files are compatible with that ABI or not. Regards, /Niels -- Niels Möller. PGP-encryp

Re: PPC chacha

2020-12-01 Thread Niels Möller
code (currently on master branch) gives 686 Mbyte/2. The 4-way code you tried gives 958 MByte/s. I then replaced the innerloop with a versino with better interleaving, written by Torbjörn Granlund (just pushed to the branch). That gives 1225 Mbyte/s. And for reference, the plain C implementation

Re: PPC chacha

2020-12-01 Thread Niels Möller
Maamoun TK writes: > On Mon, Nov 30, 2020 at 10:56 PM Niels Möller wrote: > >> Hmm. I agree just lowering the stack pointer sounds a bit questionable. >> But if we use some other register to point into the protected zone, we >> should be fine? E.g., >> >>

Re: PPC chacha

2020-11-30 Thread Niels Möller
aving can help. BTW, the chacha_2core code is merged to the master branch now. Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677. Internet email is subject to wholesale government surveillance. ___ nettle-bugs mailing l

Re: PPC chacha

2020-11-30 Thread Niels Möller
Niels Möller writes: > Below code seems to work (but is not yet a drop-in replacement, since it > needs some wireup in chacha.crypt.c, and 32-bit counter variant and BE > swapping not yet implemented). I fixed these issues, as well as fat build support. Pushed to the branch ppc-cha

Re: PPC chacha

2020-11-30 Thread Niels Möller
we should be fine? E.g., addir10, r1, -0x40 C Save callee-save registers stvxv20, 0, r10 stvxv21, r6, r10 stvxv22, r7, r10 stvxv23, r8, r10 Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677. Interne

Re: PPC chacha

2020-11-30 Thread Niels Möller
Niels Möller writes: > 3. Try out if 4-way gives additional speedup. Below code seems to work (but is not yet a drop-in replacement, since it needs some wireup in chacha.crypt.c, and 32-bit counter variant and BE swapping not yet implemented). Seems to give almost a factor of 2 speedup o

Re: [PowerPC] GCM optimization

2020-11-28 Thread Niels Möller
Maamoun TK writes: > On Wed, Nov 25, 2020 at 10:13 PM Maamoun TK > wrote: > >> I'll make a pull request for fat build support. The gcm code is now merged to the master branch. Thanks! Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677.

Re: [PowerPC] GCM optimization

2020-11-28 Thread Niels Möller
declaration without function definition. It's harmless to declare a function that's neither defined nor used. Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677. Internet email is subject to wholesale government

Re: [PowerPC] GCM optimization

2020-11-27 Thread Niels Möller
ngs or errors. 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/mail

Re: [PowerPC] GCM optimization

2020-11-26 Thread Niels Möller
or these changes. If you can help out with that, that's much appreciated. Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677. Internet email is subject to wholesale government surveillance. ___ nettle-bugs mailing list

Re: [PowerPC] GCM optimization

2020-11-26 Thread Niels Möller
Niels Möller writes: > Maamoun TK writes: > >>> I'll make a pull request for fat build support. >>> >> >> Done! > > I added two comments on the merge request. I reorganized the ifdefs a bit more, and pushed to the ppc-gcm branch. Tested on g

Re: [PowerPC] GCM optimization

2020-11-25 Thread Niels Möller
Maamoun TK writes: >> I'll make a pull request for fat build support. >> > > Done! I added two comments on the merge request. Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677. Internet email is subject to wholesale gover

Re: [PowerPC] GCM optimization

2020-11-25 Thread Niels Möller
Niels Möller writes: > Maamoun TK writes: > >> Sure. I updated the pull request. > > Thanks. Merged (first time I try the merge button on gitlab). It remains to wire it up for fat-ppc.c. Anything else that is missing? Regards, /Niels -- Niels Möller. PGP-encrypted email i

Re: [PowerPC] GCM optimization

2020-11-25 Thread Niels Möller
r the main loop. 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/m

Re: PPC chacha

2020-11-25 Thread Niels Möller
Niels Möller writes: > I've got it into working shape now, at least for little-endian. See > https://git.lysator.liu.se/nettle/nettle/-/blob/ppc-chacha-2core/powerpc64/p7/chacha-2core.asm > > Next steps: > > 1. Fix it to work also for big-endian, > > 2. Wire it up for f

Re: PPC chacha

2020-11-25 Thread Niels Möller
nder if one can get close to another factor of two by going to 4 blocks. I hope to get the time to try that out, it should be fairly easy. (And if that does work out fine, maybe the code to do only 2 blocks could be removed). Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid

Re: [PowerPC] GCM optimization

2020-11-25 Thread Niels Möller
ed loads also in the main loop. 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.l

Re: PPC chacha

2020-11-23 Thread Niels Möller
Niels Möller writes: >> It could likely be speedup further by processing 2, 3 or 4 blocks in >> parallel. > > I've given 2 blocks in parallel a try, but not quite working yet. My > work-in-progress code below. I've got it into working shape now, at least for lit

Re: [PowerPC] GCM optimization

2020-11-22 Thread Niels Möller
tory in this way, I hope you don't mind dealing > with the future patches the same way. Thanks, that's fine. But you may need to ping me, since I don't look at the gitlab web interface that often. Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677. Internet ema

Re: PPC chacha

2020-11-21 Thread Niels Möller
of the function). 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/m

Re: [PowerPC] GCM optimization

2020-11-21 Thread Niels Möller
be fine). If your mail client doesn't cooperate, feel free to create a pull request on git.lysator.liu.se instead (and ping the list). Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677. Internet email is subject to wholesale government surveillance. __

Re: PPC chacha

2020-11-21 Thread Niels Möller
10001 > vsldoi ONE, ONE, ZERO,12 C 0x00010000 Thanks, I'll try that. Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677. Internet email is subject to wholesale government surveillance. ___ nettle-bug

Re: PPC chacha

2020-11-20 Thread Niels Möller
ni...@lysator.liu.se (Niels Möller) writes: > It could likely be speedup further by processing 2, 3 or 4 blocks in > parallel. I've given 2 blocks in parallel a try, but not quite working yet. My work-in-progress code below. When I test it on the gcc112 machine, it fails with an i

Re: [PowerPC] GCM optimization

2020-11-20 Thread Niels Möller
at about test coverage? It looks like we have test cases for sizes up to 8 blocks, and for partial blocks, so I guess that should be fine? Reards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677. Internet email is subject to wholesale government surveillance. ___

Re: [PowerPC] GCM optimization

2020-11-20 Thread Niels Möller
Maamoun TK writes: > This implementation takes advantage of research made by Niels Möller to > optimize GCM on PowerPC, this optimization yields a +27.7% performance > boost on POWER8 over the previous implementation that was based on intel > documents. The performance compar

Re: [PATCH] "PowerPC" Detect VSX support on AIX and FreeBSD

2020-11-11 Thread Niels Möller
Maamoun TK writes: > --- > fat-ppc.c | 25 + > 1 file changed, 21 insertions(+), 4 deletions(-) Thanks, merged to the master branch now. Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677. Internet email is subject to

Re: Modular inversion via powering

2020-11-09 Thread Niels Möller
ni...@lysator.liu.se (Niels Möller) writes: > The code for curve25519 and curve448 has been using powering to invert > for a long time. I've now spent some time writing specific powering code > for the five secp curves as well. I've found fairly efficient addition > chains wh

Re: [PATCH] "PowerPC64" chacha-core big-endian support "Shorter version"

2020-11-07 Thread Niels Möller
. I have some work-in progress code to do 2 or 4 chacha blocks in parallel, but not sure when I will get that into working shape. Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677. Internet email is subject to wholesale government surveillance. _

Re: SHA1 Collision Detection

2020-11-04 Thread Niels Möller
_digest, we might need to provide a version number for the counter-cryptanalysis used. * Consider if it's worth doing also for md5? Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677. Internet email is subject to wholesale government surveillance. _

Re: SHA1 Collision Detection

2020-11-02 Thread Niels Möller
three operations need new functions? Do you need an extended context struct too? Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677. Internet email is subject to wholesale government surveillance. ___ nettle-bugs mailing li

Re: Blowfish integer overshift (undefined behavior)

2020-10-29 Thread Niels Möller
d a fix, see https://git.lysator.liu.se/nettle/nettle/-/commit/4c8b0cdd97ffec3ae3f8d995afdfccbc261b3c79. Thanks for the report. /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677. Internet email is subject to wholesale government surveillance.

Modular inversion via powering

2020-10-23 Thread Niels Möller
and platform. Not all inversions are rewritten. I haven't changed the modq inversion which is needed for ecdsa, and I haven't changed the code for the two supported gost curves. Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677. Internet email is subject

Re: [PATCH] "PowerPC64" GCM support

2020-10-11 Thread Niels Möller
eded for the inputs corresponding to message blocks. To compute more powers of H, one could do the standard reduction only once, essentially transforming H to montgomery form, H' = H(x) x^128 (mod P(x)), then further powers of H can use the reduction of least significant coefficients,

Re: GCM with ARM Neon

2020-10-11 Thread Niels Möller
been part of the Neon instruction set for a long time, at least since I wrote my first ARM code back in 2013. It's just a bit annoyning that one needs so many of them to do a wide multiply. Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677. Internet email i

GCM with ARM Neon (was: Re: [PATCH] "PowerPC64" GCM support)

2020-10-11 Thread Niels Möller
ni...@lysator.liu.se (Niels Möller) writes: > So if we have the input in register A (loaded from memory with no > processing besides ensuring proper *byte* order), and precompute two > values, M representing b_1(x) x^64 + c_1(x), and L representing b_0(x) > x^64 + d_1(x)), then we

Re: [PATCH] "PowerPC64" GCM support

2020-10-11 Thread Niels Möller
x^64 to x^64 + x^63 + x^62 + x^58, or b_0(x) / x^64 (mod P(x)) = b_0(x) (x^64 to x^64 + x^63 + x^62 + x^58) So no reduction needed, just split the product in high and low part to get c_1 and c_0. Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid

Re: [PATCH] "PowerPC64" GCM support

2020-10-05 Thread Niels Möller
ni...@lysator.liu.se (Niels Möller) writes: > Maamoun TK writes: > >> +L4x_loop: > [...] >> +C polynomial multiplication "classical" pre-processing >> +xxmrghdVSR(C23h),VSR(C2),VSR(C3) >> +xxmrgldVSR(C23l),VSR(C2),VSR(C3) &

Re: [PATCH] "PowerPC64" GCM support

2020-10-05 Thread Niels Möller
duct one bit left, or premultiply one of the factors with x mod p'(x). 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-bu

Re: [PATCH] "PowerPC64" GCM support

2020-10-04 Thread Niels Möller
ni...@lysator.liu.se (Niels Möller) writes: > Maamoun TK writes: > >> I would like to explain more about 'vpmsumd' instruction, in x86 arch the >> 'pclmulqdq' instruction is used for carry-less operations. To use >> 'pclmulqdq' an immediate value should be passe

Re: [PATCH] "PowerPC64" GCM support

2020-10-04 Thread Niels Möller
around? I guess one can also do some interesting things of other selected parts of the inputs zero, for example, the middle word of one of the operands, or all odd-numbered bits, or... Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677. Internet email is subject to who

Re: [PATCH] "PowerPC64" chacha-core big-endian support "Shorter version"

2020-09-28 Thread Niels Möller
ni...@lysator.liu.se (Niels Möller) writes: > Maamoun TK writes: > >> The last patch follows the C implementation but I just figured out a decent >> way to do it. > > Thanks! Applied, and pushed on the ppc-chacha-core branch for testing. > (Had apply it semi-manual

Re: [PATCH] "PowerPC64" GCM support

2020-09-28 Thread Niels Möller
for the used algorithm, but it would be helpful to have the main ideas in comments close to the code. Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677. Internet email is subject to wholesale government surveillance

Re: [PATCH] "PowerPC64" GCM support

2020-09-28 Thread Niels Möller
gt; margin fits with the library's convention of optimizing such functions. We can revisit it later, but lets go for the low-hanging fruit first. Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677. Internet email is subject to wholesale governme

Re: [PATCH] "PowerPC64" chacha-core big-endian support "Shorter version"

2020-09-28 Thread Niels Möller
ponds to xoring the byte indices with 3. 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 htt

Re: PPC chacha

2020-09-25 Thread Niels Möller
GN, is that a problem? 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.li

<    1   2   3   4   5   6   7   8   9   10   >