Re: [PATCH] nettle-pbkdf2.c: change the initialization for salt

2019-04-12 Thread Niels Möller
n via argv, even if it might be possible. So when I wrote this tool, always allocating a writable copy, and calling free unconditionally, seemed nice and easy, Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677. Inter

Re: nettle-pbkdf2 Segmentation fault

2019-04-10 Thread Niels Möller
;, salt); + salt_length = strlen(argv[0]); if (hex_salt) >>>> What kind of machine, operating system, and compiler are you using? >>>> Since the testsuite passes on the test systems (including x86_64 and >>> >>> I work on x86_6

Re: nettle-pbkdf2 Segmentation fault

2019-04-09 Thread Niels Möller
ting system, and compiler are you using? Since the testsuite passes on the test systems (including x86_64 and cross-compile setup for arm and mips), I imagine it's something somewhat unusual. Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Key

Re: nettle-pbkdf2 Segmentation fault

2019-04-09 Thread Niels Möller
you get a backtrace? (start "gdb nettle-pbkdf2", at the gdb prompt type "run -i 1 -l 16", if it crashes, type "bt" for backtrace). Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677. Internet email is subject to wholesale government surv

Re: [WIP] aes arm asm from libgcrypt

2019-03-24 Thread Niels Möller
tch seems to alternate between three different temporaries. 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@list

Re: Implement XTS block cipher mode

2019-03-24 Thread Niels Möller
ni...@lysator.liu.se (Niels Möller) writes: > Simo Sorce writes: > >> I am attaching all 3 patches anew as I also fixed the other issues you >> mentioned in a previous email. > > Thanks. I'm about to merge. I've run cross-compile+qemu tests also on > big-e

Re: Implement XTS block cipher mode

2019-03-24 Thread Niels Möller
xts_aes128_ctx} > +Holds state corresponding to the AES-128 block cipher. > +@end deftp > + > +@deftp {Context struct} {struct xts_aes256_ctx} > +Holds state corresponding to the AES-256 block cipher. > +@end deftp These structs were renamed from _ctx to _key, right? Rega

Re: Implement XTS block cipher mode

2019-03-20 Thread Niels Möller
Simo Sorce writes: > On Wed, 2019-03-20 at 06:14 +0100, Niels Möller wrote: >> And another possible trick for big-endian is to do an "opposite-endian" >> left shift as >> >> ((x & 0x7f7f7f7f7f7f7f7f) << 1) | ((x & 0x8080808080808080) >&g

Re: Implement XTS block cipher mode

2019-03-20 Thread Niels Möller
we should use __builtin_bswap64 when provided by gcc or its look-alikes. 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: Implement XTS block cipher mode

2019-03-19 Thread Niels Möller
* case the buffer contains sensitive data (like the clear text for >> > inplace >> > + * encryption) */ >> > + if (length < XTS_BLOCK_SIZE) >> > +memxor(dst, dst, length); >> > +} Why memxor rather than mems

Re: Implement XTS block cipher mode

2019-03-19 Thread Niels Möller
ni...@lysator.liu.se (Niels Möller) writes: > 3. Big-endian system, no __builtin_bswap64. Here we can either use the >current code, with byte accesses only. Or attempt to define byteswap >without builtins and follow 2. I'd lean towards using the current >code, un

Re: Implement XTS block cipher mode

2019-03-19 Thread Niels Möller
mediate values back from memory to registers. That has been a significant optimization for both ctr mode and cbc decrypt. I haven't reviewed the new version of the patch yet, I hope to get to that in a day or two. Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid 368C66

Re: Implement XTS block cipher mode

2019-03-18 Thread Niels Möller
ntirely obvious, though). > +/* XTS Mode with AES-128 */ > +struct xts_aes128_ctx { > +struct aes128_ctx cipher; > +struct aes128_ctx tweak_cipher; > +}; Could consider renaming it to xts_aes128_key, somewhat analogous to struct eax_key and struct gcm_key. This represents mess

Re: [WIP] aes arm asm from libgcrypt

2019-03-17 Thread Niels Möller
.cfi_rel_offset lr, 44 Are these .cfi_* pseudoops essential? I'm afraid I'm ignorant of the fine details here; I just see from the gas manual that they appear to be related to stack unwinding. Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677. Internet

Re: Implement XTS block cipher mode

2019-03-15 Thread Niels Möller
the READ/WRITE_UINT macros are adequate in most places where unaligned application data is read and written by C code. 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

Re: Implement XTS block cipher mode

2019-03-15 Thread Niels Möller
64, since arguments are aligned. It would be preferable to load 64-bit values and use __builtin_bswap64 when needed and available (see ctr.c for a similar hack). But that's an independent improvement. Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Key

Re: Implement XTS block cipher mode

2019-03-15 Thread Niels Möller
> + XTSXOR(P, T); /* P -> PP */ > + XTSENC(enc_ctx, C, P); /* CC */ > + XTSXOR(C, T); /* CC -> C */ I think it would be clearer with encf being an explicit argument to the macros that need it (or maybe do it without the macros, if they e

Re: [WIP][PATCH][v2] Add fast constant-time ARM NEON ghash/gcm

2019-03-13 Thread Niels Möller
me reason uses different bitorder, I hope it should be possible to do any needed bit reversal at key-setup only. > +.macro MUL64k3t4 rq rl rh ad bd k16 k32 k48 t0q t0l t0h t1q t1l t1h t2q t2l > t2h t3q t3l t3h Could you do these as m4 macros, like in the rest of the Nettle asm code? Rega

Re: [PATCH] fat-arm.c: prefer getauxval() over /proc/cpuinfo parsing

2019-03-13 Thread Niels Möller
runtime? In the docs (https://github.com/torvalds/linux/blob/master/arch/arm/include/uapi/asm/hwcap.h) I don't see anything corresponding to the "CPU arcitecture" line in /proc/cpuinfo. I'd be happier about getauxval if we could find a way to also get the arch version witho

Re: nettle-stdint.h

2019-02-01 Thread Niels Möller
. Excellent! And now the gnutls build in nettle's gitlab ci succeed. Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677. Internet email is subject to wholesale government surveillance. ___ nettle-bugs mai

nettle-stdint.h (was: Re: sec_powm.c:293: GNU MP assertion failed: enb >= windowsize)

2019-01-22 Thread Niels Möller
applications to include it directly. According to https://codesearch.debian.net/search?q=nettle-stdint.h, nettle and gnutls are the only debian packages doing that. Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677. Internet email is subject to wholesale governm

gitlab-ci builds (was: Re: Nettle-3.4.1rc1, addressing PKCS#1 side-channel leaks)

2019-01-22 Thread Niels Möller
ni...@lysator.liu.se (Niels Möller) writes: > I'm also considering adding a few more configurations to the ci, > including "CC=gcc -std=c89", CPPFLAGS=-DNODEBUG and --disable-assembler. Done (but with -DNDEBUG, not -DNODEBUG). Seems to pass. For the fat builds, it would m

Re: sec_powm.c:293: GNU MP assertion failed: enb >= windowsize

2019-01-22 Thread Niels Möller
ni...@lysator.liu.se (Niels Möller) writes: > That said, I'm about to delete nettle-stdint.h, and require that the > compiler supplies a (as was discussed quite a while ago). I've now merged changes to do that to the master-updates branch. It breaks the gnutls build, see ht

Re: [repost] [PATCH] Add --enable-fat support for arm neon chacha20

2019-01-19 Thread Niels Möller
there. If I delete them, this works fine using debian's cross compilers and qemu. Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677. Internet email is subject to wholesale government surveillance. ___ nettle-

Re: [repost] [PATCH] Add --enable-fat support for arm neon chacha20

2019-01-19 Thread Niels Möller
"Yuriy M. Kaminskiy" writes: > [PATCH] Add --enable-fat support for arm neon chacha20 Thanks, applied! Just pushed to the master-updates branch. When the currrent ARM assembly was written, it was benchmarked on cortex a9 and a15. Regards, /Niels -- Niels Möller. PGP-encry

Re: Nettle-3.4.1rc1, addressing PKCS#1 side-channel leaks

2019-01-13 Thread Niels Möller
Jeffrey Walton writes: > My bad, I was speaking to the proposed -DNODEBUG macro presented earlier: Sorry for that typo; I intended to use the standard assert.h facility, i.e., -DNDEBUG. Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677. Internet email

Re: Nettle-3.4.1rc1, addressing PKCS#1 side-channel leaks

2019-01-12 Thread Niels Möller
use bugs are expected to have particularly subtle and hard-to-debug effects, one may well want that extra correctness assurance also when using the installed program in a "release" build). Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677. Internet em

Re: Nettle-3.4.1rc1, addressing PKCS#1 side-channel leaks

2019-01-12 Thread Niels Möller
lalyzer's remaining complaints on eccdata.c. I'm also considering adding a few more configurations to the ci, including "CC=gcc -std=c89", CPPFLAGS=-DNODEBUG and --disable-assembler. Anything I have to keep in mind (e.g., limits on builder resources?) Regards, /Niels -- Niels M

Re: sec_powm.c:293: GNU MP assertion failed: enb >= windowsize

2019-01-07 Thread Niels Möller
the compiler supplies a (as was discussed quite a while ago). Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677. Internet email is subject to wholesale government surveillance. ___ nettle-bugs mailing lis

Re: sec_powm.c:293: GNU MP assertion failed: enb >= windowsize

2019-01-06 Thread Niels Möller
a 3.4.2 release fixing these problems? 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

Re: sec_powm.c:293: GNU MP assertion failed: enb >= windowsize

2018-12-31 Thread Niels Möller
th debug info enabled), set a break point on __gmpn_sec_powm (name-mangled symbol name for mpn_pown_sec), and try to find out where the bad value for windowsize comes from. BTW, you did run gmp's make check, I hope? Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid 368C

Re: sec_powm.c:293: GNU MP assertion failed: enb >= windowsize

2018-12-31 Thread Niels Möller
, I run configure. There's nothing special about what I am doing. > I'm just getting into a Release Build state. What platform did configure detect? And in particular, which file is the gmp-mparam.h symlink at the top of the gmp build tree pointed to, and what's the definitio

Re: sec_powm.c:293: GNU MP assertion failed: enb >= windowsize

2018-12-30 Thread Niels Möller
leading to some memory overwrite. Try running the test program under valgrind and/or asan? Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677. Internet email is subject to wholesale government surveillance. ___ nettle-

Re: error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode

2018-12-30 Thread Niels Möller
9, -std=c11 > or -std=gnu11 to compile your code This has been fixed in https://git.lysator.liu.se/nettle/nettle/commit/f5a3a224bf00bef5669366d2ae23c2b2b13b8016 Not sure if there will be a bug-fix release 3.4.2, before we get till 3.5. Regards, /Niels -- Niels Möller. PGP-encrypted email is p

Re: Nettle-3.4.1rc1, addressing PKCS#1 side-channel leaks

2018-12-29 Thread Niels Möller
afraid I don't recall what tools were used to prepare those tables. 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: Nettle-3.4.1rc1, addressing PKCS#1 side-channel leaks

2018-12-26 Thread Niels Möller
See https://gitlab.com/gnutls/nettle/pipelines/41333133. But at least it seems to build fine now. Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677. Internet email is subject to wholesale government surveillance. ___

ANNOUNCE: Nettle-3.4.1

2018-12-04 Thread Niels Möller
The shared library names are libnettle.so.6.5 and libhogweed.so.4.5, with sonames still libnettle.so.6 and libhogweed.so.4. It is intended to be fully binary compatible with nettle-3.1. -- Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677. Internet email is subject to w

Re: Nettle-3.4.1rc1, addressing PKCS#1 side-channel leaks

2018-12-02 Thread Niels Möller
uot;, and a tag "nettle_3.4.1rc1". Could you use either of them for the Nettle dependency in the mean time? Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677. Internet email is subject to wholesale government surveillance.

Nettle-3.4.1rc1, addressing PKCS#1 side-channel leaks

2018-11-30 Thread Niels Möller
The shared library names are libnettle.so.6.5 and libhogweed.so.4.5, with sonames still libnettle.so.6 and libhogweed.so.4. It is intended to be fully binary compatible with nettle-3.1. -- Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677. Internet ema

nettle-3.4.1

2018-11-18 Thread Niels Möller
/ChangeLog I'm sorry I haven't been able to respond to the recently posted patches on this list. I'll get back to that after 3.4.1. If you think I've missed some important bugfixes, please speak up. Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid 368C6

Re: [PATCH] ctr16: fix encryption if src == dst

2018-10-10 Thread Niels Möller
sing >= 1024 bytes (2 * CTR_BUFFER_LIMIT) at a time. If you would like to write a test case, that's appreciated. Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677. Internet email is subject to wholesale government surveillance. _

Re: [PATCH] ctr16: fix encryption if src == dst

2018-10-09 Thread Niels Möller
egards, /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

Leading underscores (was: Re: Deprecation)

2018-08-13 Thread Niels Möller
erscore or nettle__ (double underscore). But not now. Which static analyzers complain? Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677. Internet email is subject to wholesale government surveillance. ___ nettle-bugs maili

Deprecation

2018-08-09 Thread Niels Möller
Nettle-1.0 was brand new. 2. The "general" hmac functions: hmac_set_key, hmac_update, hmac_digest. Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677. Internet email is subject to wholesale government surveillance. __

Re: [RFC 3/4] md5: split context into compress and block states

2018-07-30 Thread Niels Möller
them (without immediately breaking them); I find no usage on codesearch.debian.net. We'de get more flexibility if we could implement hmac_md5_* without going via struct nettle_hash nettle_md5. I think it would make sense to start with reordering fields in the

Re: [PATCH] Add benchmarking for HMAC functions

2018-07-30 Thread Niels Möller
Dmitry Eremin-Solenikov writes: > In preparation of changing internal HMAC interface add benchmarking for > HMAC functions. > > Signed-off-by: Dmitry Eremin-Solenikov Thanks, applied. Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677. Inter

Re: [PATCH 0/2] Rework HMAC interface

2018-07-24 Thread Niels Möller
nternal _FOO_* functions. What would _FOO_digest be used for? Also note that all functions needed by hmac would need to be exposed in struct nettle_hash. We already have a couple of FOO_compress functions, mainly because those functions are candidates for assembly implementation. Regards, /Niels

Re: [PATCH 0/2] Rework HMAC interface

2018-07-24 Thread Niels Möller
cpy(&hmac_ctx->hash_ctx, hmac_ctx->inner /* or outer */, hash->state_size); And the nice thing is that any hash function not matching this internal structure can let state_size == context_size, and things will keep working. What do you think? Regards, /Niels -- Niels Möller. PGP-encrypted

Re: Static analyzer

2018-07-16 Thread Niels Möller
ing less drastic. 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: Static analyzer

2018-07-13 Thread Niels Möller
ni...@lysator.liu.se (Niels Möller) writes: > Nikos Mavrogiannopoulos writes: > >> An assert() should be sufficient to inform it of the constraints. > > I've added two asserts for the eratosthenes.c warning, we'lll see if > that helps (only vector_alloc wasn'

Re: Static analyzer

2018-07-13 Thread Niels Möller
hecks of the input arguments would be appropriate, in addition to an assert. Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677. Internet email is subject to wholesale government surveillance. ___ nettle-bugs mailin

Static analyzer (was: Re: nettle symbols: improve map files)

2018-07-13 Thread Niels Möller
lt; 2 (and again, in that case, it's an out of bounds access). I don't have that much experience with the static analyzer. Should I just add error handling for the corner cases, and see if that solves the problem? Regards, /Niels -- Niels Möller. PGP-encrypted em

Re: nettle symbols: improve map files

2018-07-12 Thread Niels Möller
are mem leaks on examples and one which relates to gmp-mini. I'll try to take care of the examples. The mini-gmp issue is more confusing. Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677. Internet email is subject to wholesale government surveillance. _

Re: nettle symbols: improve map files

2018-07-12 Thread Niels Möller
branch to get it back in sync. Sorry about that. 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.s

Re: nettle symbols: improve map files

2018-07-12 Thread Niels Möller
Nikos Mavrogiannopoulos writes: > Patch is attached adding the builds from gnutls (mips,arm,aarch64). Excellent! Now applied to the master-updates branch, together with arm fat fixes. Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677. Internet email is subj

Re: nettle symbols: improve map files

2018-07-12 Thread Niels Möller
rently only has arm-specific code for 32-bit arm; portability considerations for 64-bit arm may be different since there's less old stuff to care about). Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677. Internet email is subject to wholesale govern

Re: nettle symbols: improve map files

2018-07-09 Thread Niels Möller
Nikos Mavrogiannopoulos writes: > On Sun, Jul 8, 2018 at 8:36 AM Niels Möller wrote: > >>We have to decide if the name of this assembly function should be >>"nettle_sha1_compress_sha_ni" (and if so, update the macro >>DECLARE_FAT_FUNC_VA

Re: nettle symbols: improve map files

2018-07-07 Thread Niels Möller
be more complicated, I'll back out of these changes, and try to do the sha1_compress and md5_compress renaming first, to get less problems at a time. Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677. Internet email is subject to wholesale government surve

Re: nettle symbols: improve map files

2018-06-17 Thread Niels Möller
ing all symbols explicitly? It might make sense to do this in three steps: 1. Rename the above compress functions. 2. Move declarations if internal functions to uninstalled headers. 3. Update the linker script to handle _nettle_*-symbols differently. Regards, /Niels -- Niels Möller. PGP-encrypted ema

Re: [PATCH] Add support for reading/writing integers in Little Endian format

2018-06-17 Thread Niels Möller
(for internal use only), mpn_set_base256_le mpn_get_base256_le but those work with the mpn layer, which lacks the general export/import functions. What use for these functions do you have in mind? Application use, or some code you'd like to add to Nettle? Regards, /Niels -- Niels Möller. PGP-

Re: [PATCH] Fix quoting in autoconf ifunc test

2018-06-17 Thread Niels Möller
Dmitry Eremin-Solenikov writes: > * aclocal.m4 (NETTLE_CHECK_IFUNC): fix quoting so that > AC_LINK_IFELSE/AC_TRY_LINK is defined outside of this test. Thanks, applied. What concrete errors did the incorrect quoting cause? Regards, /Niels -- Niels Möller. PGP-encrypted email is pre

Re: Xcode/CLT 10+ Patch

2018-06-17 Thread Niels Möller
13/10.14. Thanks, looks like an easy fix. Applied Context isn't entirely clear to me, though. "CLT" means command line tools, it seems, it's not a particular piece of software? So I take it the name and version of the compiler package is simply "Xcode 10"? Regards, /

[Dominyk Tiller] Fwd: Xcode/CLT 10+ Patch

2018-06-14 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: nettle symbols: improve map files

2018-06-08 Thread Niels Möller
> see: _nettle_md5_compress (sogo), _nettle_sha1_compress > (filezilla/putty) We could promote those to advertised ABI, then. I.e., linker symbols nettle_*_compress after the ABI change, while we could keep _nettle_*_compress as aliases in the header file, not not also break the API. Regards, /Niels

Re: nettle symbols: improve map files

2018-06-08 Thread Niels Möller
e and header files, both for maintenance and for user documentation. What do you think? Are there any of the current _nettle_* symbols that should be in the advertised API (and hence renamed)? Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677. Internet email

Re: symbol versioning update

2018-03-30 Thread Niels Möller
rst time I mess up an update to that file. > and this is pretty > minor IME maintaining such version files for libvirt. How do you write testcases to verify that the version list is correct? Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid 36

Re: What should nettle-3.5 be like?

2018-03-27 Thread Niels Möller
Nikos Mavrogiannopoulos writes: > Yes. It is at: > https://gitlab.com/gnutls/nettle/-/jobs/59417145 > > and seems to pass. Thank you. Good! Change now merged to master-updates. Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677. Internet email i

Re: symbol versioning update

2018-03-27 Thread Niels Möller
rsion. That way, when a > dependency is tracked, the version with the right symbol will be > retrieved. That's clever, and should work fine for packages that make the extra effort to have fine-grained symbol versions, but it can't be the *only* way to handle libraries with rpm? Re

Re: What should nettle-3.5 be like?

2018-03-25 Thread Niels Möller
e recent features to change config.h convention, to always define the symbols, to 0 or 1 depending on corresponding test). Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677. Internet email is subject to wholesale government surveillance. ___

Re: [PATCH 1/3] Add arm endianness-aware assembly infrastructure

2018-03-25 Thread Niels Möller
rm is still working. Thanks! /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

Re: What should nettle-3.5 be like?

2018-03-25 Thread Niels Möller
ni...@lysator.liu.se (Niels Möller) writes: > Nikos Mavrogiannopoulos writes: > >>> is a bit strange. Maybe it's missing an #include ? >> >> That's very strange. bignum.h already includes version.h, so that >> should have been ok. I've also

Re: What should nettle-3.5 be like?

2018-03-25 Thread Niels Möller
ttle_secp_192r1, enable_non_suiteb=yes, enable_non_suiteb=no, [$HOGWEED_LIBS]) fails, but that's an unrelated problem. Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677. Internet email is subject to wholesale government surveillance. __

Re: What should nettle-3.5 be like?

2018-03-19 Thread Niels Möller
is a bit strange. Maybe it's missing an #include ? It would be good to always compile with -Wundef, but that might break other checks. Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677. Internet email is subject to who

Re: What should nettle-3.5 be like?

2018-03-19 Thread Niels Möller
re useful in applications explicitly, and move any others to either > local, or to a private version. Right, we can decide case by case if those symbols should be in installed headers (I think that's ok for the hash *_compress functions), and if so, whether or not they should be docume

Re: mailing list archives

2018-03-19 Thread Niels Möller
ni...@lysator.liu.se (Niels Möller) writes: > Nikos Mavrogiannopoulos writes: > >> On certain occasions I was trying to link to posts in that list >> however it seems that the official archives are not updated on a >> reasonable frequency. > > Thanks for the remin

Re: mailing list archives

2018-03-19 Thread Niels Möller
ture to have a look. 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.

Re: What should nettle-3.5 be like?

2018-03-18 Thread Niels Möller
in unsupported territory). What would it take to hide all _nettle symbols in libnettle.se? Just delete the _nettle_* line in libnettle.map.in, like --- a/libnettle.map.in +++ b/libnettle.map.in @@ -9,7 +9,6 @@ NETTLE_@LIBNETTLE_MAJOR@ { global: nettle_*; - _nettle_*; local: *; R

Re: What should nettle-3.5 be like?

2018-03-17 Thread Niels Möller
ni...@lysator.liu.se (Niels Möller) writes: > 1. Remove the the symbols nettle_hashes and nettle_secp_384r1 and >friends from the interface. They should be renamed with leading >underscore. Important to be able to merge ed448 work without breaking >the abi again. I&

Efficient ED25519 on microcontrollers

2018-03-13 Thread Niels Möller
d make any sense to try to port Nettle to such systems, but might be doable if there's interest in it. I would imagine that the need for good crypto on cheap devices is only going to increase in coming years. See https://www.lysator.liu.se/~nisse/misc/ed25519-msp430.html. Regards, /Niels -

Re: x86 sha_ni

2018-03-12 Thread Niels Möller
Jeffrey Walton writes: > On Mon, Mar 12, 2018 at 2:40 PM, Niels Möller wrote: >> ni...@lysator.liu.se (Niels Möller) writes: >> ... >> >> Now wired up for fat builds, changes pushed to the same branch. > > Looks good on a Celeron J3455 (https://www.amazo

Re: x86 sha_ni

2018-03-12 Thread Niels Möller
, naturally has effect only in fat builds). If you like, also compare the performance with the nettle-3.4 release. Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677. Internet email is subject to wholesale government surveillance.

Re: Deleting old AES api

2018-03-12 Thread Niels Möller
gt; #endif That means that __attribute__ ((__deprecated__)) was introduced in gcc-3.1 ? Is that documented somewhere? I find no mention in https://gcc.gnu.org/gcc-3.1/changes.html. Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677. Internet email is subject to wholes

Re: x86 sha_ni

2018-03-12 Thread Niels Möller
ni...@lysator.liu.se (Niels Möller) writes: > ni...@lysator.liu.se (Niels Möller) writes: > >> I've been trying out the sha_ni instructions available on some newer >> x86_64 processors. > > And now that the gcc67 machine is up again, I got my sha256 > implementati

Improved ECC tables

2018-03-10 Thread Niels Möller
table.) 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/ma

Re: Deleting old AES api

2018-02-22 Thread Niels Möller
with nettle-3.0, 3.5 years ago: The old interface, with struct aes_ctx and struct camellia_ctx, is kept for backwards compatibility, but might be removed in later versions. (NEWS file) but I guess noone saw any urgent need to update old code to the new interfaces. (We never do, do we?).

Deleting old AES api (was: Re: What should nettle-3.5 be like?)

2018-02-21 Thread Niels Möller
ni...@lysator.liu.se (Niels Möller) writes: >> 2. Delete the old aes_* interface, in favor of aes128_, aes192_* and >>aes256_*. > > I've now made a branch for this, delete-old-aes. And it seems building gnutls with this branch fails, see https://gitlab.com/gnutls

Re: What should nettle-3.5 be like?

2018-02-21 Thread Niels Möller
ni...@lysator.liu.se (Niels Möller) writes: > 2. Delete the old aes_* interface, in favor of aes128_, aes192_* and >aes256_*. I've now made a branch for this, delete-old-aes. Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677. Internet email is

Re: x86 sha_ni

2018-02-21 Thread Niels Möller
ni...@lysator.liu.se (Niels Möller) writes: > I've been trying out the sha_ni instructions available on some newer > x86_64 processors. And now that the gcc67 machine is up again, I got my sha256 implementation working too. Pushed to branch x86_64-sha_ni-sha256. Not yet wired up in

Re: cmac

2018-02-21 Thread Niels Möller
ni...@lysator.liu.se (Niels Möller) writes: > Pushed to a branch "cmac-support" Merged to master now, with the additional fix for deallocating memory in the test. Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677. Internet email is subject

Re: cmac

2018-02-19 Thread Niels Möller
tion local. * testsuite/cmac-test.c: Delete local typedefs. Thanks! /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677. Internet email is subject to wholesale government surveillance. ___ nettle-bugs mailin

Re: TMP_DECL_ALIGN

2018-02-19 Thread Niels Möller
Nikos Mavrogiannopoulos writes: > On Mon, 2018-02-19 at 15:27 +0100, Niels Möller wrote: >> I think I'd prefer allocating a uint64_t array (largest type used in >> nettle context structs), and leave to the compiler to figure out what >> alignment is needed and how to ge

Re: TMP_DECL_ALIGN

2018-02-19 Thread Niels Möller
ould be expeted mainly for embedded platforms with either older compilers, or c11 compilers taking advantage of variable-length arrays being optional. Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677. Internet email is subject to wholesale government surveillance. ___

Re: TMP_DECL_ALIGN

2018-02-18 Thread Niels Möller
ni...@lysator.liu.se (Niels Möller) writes: > ni...@lysator.liu.se (Niels Möller) writes: > >> For now, I think I'll fix this, and add a TMP_ALIGN_DECL, >> TMP_ALIGN_ALLOC. > > Below patch seems to work. Other options? Replying to myself again, I guess one o

TMP_DECL_ALIGN (was: Re: [PATCH v2 1/2] Implement PSS encoding functions)

2018-02-18 Thread Niels Möller
ni...@lysator.liu.se (Niels Möller) writes: > For now, I think I'll fix this, and add a TMP_ALIGN_DECL, > TMP_ALIGN_ALLOC. Below patch seems to work. Other options? Regards, /Niels diff --git a/nettle-internal.h b/nettle-internal.h index 38c8d2a8..b109e944 100644 --- a/nettle-inter

Re: [PATCH v2 1/2] Implement PSS encoding functions

2018-02-18 Thread Niels Möller
ni...@lysator.liu.se (Niels Möller) writes: > In testsuite/Makefile.in, pss-mgf1-test.c is listed in > TS_NETTLE_SOURCES. Should be moved to TS_HOGWEED_SOURCES, to not get > link failured in builds without hogweed. Right? Moved now. > Both pss_mgf1 and pss_encode_mgf1 allocate the

What should nettle-3.5 be like?

2018-02-18 Thread Niels Möller
separate state struct. Probably low priority, but it is a bit silly that, e.g., hmac_sha512_ctx includes three 128-byte large block buffers. Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677. Internet email is subject to wholesale government surveillance

Re: [PATCH] Move expressions with side effects out of asserts

2018-02-18 Thread Niels Möller
Dmitry Eremin-Solenikov writes: > It is wrong to use expressions with side-effects in asserts, they can > easily be compiled away. Move them out of assert() macro and just > compare the result. Thanks! Applied now. Regards, /Niels -- Niels Möller. PGP-encrypted email is preferr

Re: [PATCH v2 1/2] Implement PSS encoding functions

2018-02-17 Thread Niels Möller
ni...@lysator.liu.se (Niels Möller) writes: > Daiki Ueno writes: > >> I have incorporated the suggested changes here: >> https://gitlab.com/dueno/nettle/commits/wip/dueno/rsa-padding > > Thanks! > > I've added these changes on a branch merge-pss in the main

Re: [PATCH 1/2] Provide wrappers around OpenSSL AES GCM

2018-02-17 Thread Niels Möller
by the spec is handled correctly, and with proper error handling for anything invalid. While when sending data, one should stay in the main stream. Avoid any obscure and rarely used protocol features and corner cases, even when they are technically correct according to the spec. Regards, /Niels

Re: [PATCH 1/2] Provide wrappers around OpenSSL AES GCM

2018-02-17 Thread Niels Möller
the alternatives. I know there are different opinions. We should support -DNDEBUG builds, but it's not going to be the default in Nettle. Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677. Internet email is subject to wholesale government surv

<    3   4   5   6   7   8   9   10   11   12   >