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

2019-01-06 Thread Niels Möller
elease 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-30 Thread Niels Möller
ng 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-bugs maili

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
ed 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 nettle-bugs@lists.lysator.liu.se http://lists.lys

ANNOUNCE: Nettle-3.4.1

2018-12-04 Thread Niels Möller
tle.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 wholesale government surveillance. sig

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

2018-12-02 Thread Niels Möller
e_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
tle.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 wholesale government su

nettle-3.4.1

2018-11-18 Thread Niels Möller
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 368C6677. Internet email is subject

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

2018-10-10 Thread Niels Möller
essing >= 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
s, /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
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 mailing list ne

Deprecation

2018-08-09 Thread Niels Möller
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. ___ n

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

2018-07-30 Thread Niels Möller
y 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 current context structs. Reg

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. In

Re: [PATCH 0/2] Rework HMAC interface

2018-07-24 Thread Niels Möller
ed 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 -- Niels Möller. PGP-encrypted email is preferred. Key

Re: [PATCH 0/2] Rework HMAC interface

2018-07-24 Thread Niels Möller
r 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 email is preferred. Keyid 368C6677. Internet emai

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't enough). Ano

Re: Static analyzer

2018-07-13 Thread Niels Möller
put 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 mailing list nettle-b

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

2018-07-13 Thread Niels Möller
e, 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 email is preferred. Keyid 368C

Re: nettle symbols: improve map files

2018-07-12 Thread Niels Möller
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.se http://l

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
m; 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 government surveillance.

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_FU

Re: nettle symbols: improve map files

2018-07-08 Thread Niels Möller
ese 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 surveillance. _

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
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-encrypted

Re: Xcode/CLT 10+ Patch

2018-06-17 Thread Niels Möller
.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, /Niels -- N

[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
les, 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 is subject to

Re: symbol versioning update

2018-03-30 Thread Niels Möller
e first 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 368C6677. Internet em

Re: symbol versioning update

2018-03-27 Thread Niels Möller
on the version. 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
nt 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: What should nettle-3.5 be like?

2018-03-25 Thread Niels Möller
AC_CHECK_LIB(hogweed, nettle_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
b.com/gnutls/nettle/-/jobs/57981115 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 wholesa

Re: What should nettle-3.5 be like?

2018-03-19 Thread Niels Möller
be document beyond header comments. 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: mailing list archives

2018-03-19 Thread Niels Möller
ni...@lysator.liu.se (Niels Möller) writes: > Nikos Mavrogiannopoulos <n.mavrogiannopou...@gmail.com> 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 >> re

Re: mailing list archives

2018-03-19 Thread Niels Möller
ers maintaining the mailinglist infrastructure 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.lysa

Re: What should nettle-3.5 be like?

2018-03-18 Thread Niels Möller
ted 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: *; Regard

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

Efficient ED25519 on microcontrollers

2018-03-13 Thread Niels Möller
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 -- Niels Möller

Re: x86 sha_ni

2018-03-12 Thread Niels Möller
NETTLE_FAT_VERBOSE, 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 gover

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 > implementation wo

Re: Deleting old AES api

2018-02-22 Thread Niels Möller
o we?). 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

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/nett

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 s

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
cal. * 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 mailing list nettle-bugs@

Re: TMP_DECL_ALIGN

2018-02-19 Thread Niels Möller
Nikos Mavrogiannopoulos <n...@redhat.com> 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 >> alignme

Re: TMP_DECL_ALIGN

2018-02-19 Thread Niels Möller
e 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. _

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-internal.h

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
with a 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 <dbarysh...@gmail.com> 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-

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 <u...@gnu.org> 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 me

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

2018-02-17 Thread Niels Möller
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 -- Niels Möller

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

2018-02-17 Thread Niels Möller
is a lot better then 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 sur

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

2018-02-17 Thread Niels Möller
ity critical applications to disable core dumps using the standard ulimit facility. I can't see asserts as a problem at all in this context. Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677. Internet email is subject to wholesale government

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

2018-02-17 Thread Niels Möller
ni...@lysator.liu.se (Niels Möller) writes: > Dmitry Eremin-Solenikov <dbarysh...@gmail.com> writes: > >> For benchmarking purposes provide wrappers around OpenSSL AES GCM >> implementation. Note, digest callback will work only for encryption due >> to Ope

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

2018-02-17 Thread Niels Möller
or define some alternative assert-like makro which always evaluates its argument. Not a big problem if only in the benchmark code, but it should be avoided. It was introduced earlier, in commit https://git.lysator.liu.se/nettle/nettle/commit/5c78bb737c553f2064271f1a7c4768b88a09b665, but I didn't not

Re: cmac

2018-02-14 Thread Niels Möller
gt; +@cite{RFC4493}. The secret key is always 128 bits (16 octets). Should be "block size", not "secret key", right? Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677. Internet email is subject to wholesale government surveillance. _

Re: cmac

2018-02-14 Thread Niels Möller
ot; here, but it's the context struct of the underlying cipher? It should be const void *. In the ccm and eax code, it seems we use the name "cipher" for this, e.g., void eax_set_key (struct eax_key *key, const void *cipher, nettle_cipher_func *f); Regards, /Niels -- Niels Möller. PGP-encrypted ema

Re: Miscomputation with big-endian arm asm

2018-02-11 Thread Niels Möller
Michael Weiser <mich...@weiser.dinsnail.net> writes: > Hi Niels, > > On Wed, Feb 07, 2018 at 01:13:32PM +0100, Niels Möller wrote: > >> Can you check if it's detected correctly also when cross-compiling? > [...] > Seems fine. Good! >> > FAIL: memxor >&g

Re: x86 sha_ni

2018-02-08 Thread Niels Möller
m considering enabling it by default in the next release. 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.lysato

[Jeffrey Walton] Fwd: x86 sha_ni

2018-02-08 Thread Niels Möller
Forwarded to the list. -- Forwarded message -- From: Jeffrey Walton <noloa...@gmail.com> To: "Niels Möller" <ni...@lysator.liu.se> Cc: nettle-bugs@lists.lysator.liu.se Bcc: Date: Thu, 8 Feb 2018 16:34:43 -0500 Subject: Re: x86 sha_ni On Thu, Feb 8, 2018 at

x86 sha_ni

2018-02-07 Thread Niels Möller
k to point to this file. Regards, /Niels -8< C x86_64/sha_ni/sha1-compress.asm ifelse(< Copyright (C) 2018 Niels Möller This file is part of GNU Nettle. GNU Nettle is free software: you can redistribute it and/or modify it under the terms of either: * the GN

Re: Performance of AESNI impl vs other crypto libraries

2018-02-01 Thread Niels Möller
cycles/byte to 7.9). Very nice! Needs a little testing on big-endian before merge to master. Thanks, /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677. Internet email is subject to wholesale government surveillance. ___ nettl

Re: API for new AEAD modes

2018-01-24 Thread Niels Möller
Nikos Mavrogiannopoulos <n.mavrogiannopou...@gmail.com> writes: > On Tue, Jan 23, 2018 at 7:34 PM, Niels Möller <ni...@lysator.liu.se> wrote: >> These are the methods I'd expect "most" AEADs to have, and it's what the >> nettle_aead struct is intended to

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

2018-01-23 Thread Niels Möller
Dmitry Eremin-Solenikov <dbarysh...@gmail.com> writes: > What about these two patches? They allow comparing nettle vs OpenSSL > speed for AES-GCM. They look ok, but I haven't yet had time to merge them. Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Ke

Re: Build system bug with assembler and clang

2018-01-23 Thread Niels Möller
hat I added it at the front. Did I understand you correctly, that this was needed for x86 android builds? When building for multiple platforms, I recommend using a separate build directory per platform. Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677. Internet ema

Re: API for new AEAD modes

2018-01-23 Thread Niels Möller
sking is because SIV could benefit of a very custom API > as well because it can take advantage of multiple associated data, but > in the end I believe AEAD is about simplicity. Providing a unique API > per AEAD cipher seems to me quite contradictory to that goal. I think it's nice to support special

Re: [PATCH v2] Add CFB8 - Cipher Feedback 8-bit block cipher mode

2018-01-20 Thread Niels Möller
Dmitry Eremin-Solenikov <dbarysh...@gmail.com> writes: > Add CFB variant with 8-bit segment size. Thanks! Now merged to the master-updates branch for testing. Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677. Internet email is subject to wholesale g

Re: cmac

2018-01-16 Thread Niels Möller
Nikos Mavrogiannopoulos <n.mavrogiannopou...@gmail.com> writes: > On Mon, Jan 15, 2018 at 9:37 PM Niels Möller <ni...@lysator.liu.se> wrote: > >> > + unsigned overflow = b2 & 0x8000; >> > + >> > + b1 <<=

Re: cmac

2018-01-15 Thread Niels Möller
+ encrypt(key, length, out, ctx->Y.b); > + } else { > + encrypt(key, length, tmp, ctx->Y.b); > + memcpy(out, tmp, length); > + } Maybe I'm missing something, but to me both clauses look equivalent? > diff --git a/cmac.h b/cmac.h

Big-endian testing (was: Re: Performance of AESNI impl vs other crypto libraries)

2018-01-13 Thread Niels Möller
ni...@lysator.liu.se (Niels Möller) writes: > I've tried this, with special code for block size 16. (Without any > assembly, but using __builtin_bswap64). Pushed to the ctr-opt branch. For the ctr changes, I need some testing on big-endian before merging to master. Most of the gmp virtua

Re: [PATCH] Allow user to specify multiple algorithms to nettle-benchmark

2018-01-13 Thread Niels Möller
Dmitry Eremin-Solenikov <dbarysh...@gmail.com> writes: > examples/nettle-benchmark.c | 47 > + > 1 file changed, 26 insertions(+), 21 deletions(-) Thanks, pushed now. Regards, /Niels -- Niels Möller. PGP-encrypted email is p

Re: [PATCH 0/8] Implement Curve448 ECDH and Ed448

2018-01-09 Thread Niels Möller
nction), and then let while NETTLE_TEST_SEED=0 ./ecc-mod-test ; do : ; done run over night. And possibly also hacking ecc_mod_test.c to only test the curve of interest. Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid 368

Re: Performance of AESNI impl vs other crypto libraries

2018-01-08 Thread Niels Möller
ni...@lysator.liu.se (Niels Möller) writes: > I agree CTR seems more important. I'm guessing that the loop > > for (p = dst, left = length; > left >= block_size; > left -= block_size, p += block_size) > { > me

Re: possible new modes

2018-01-04 Thread Niels Möller
Dmitry Eremin-Solenikov <dbarysh...@gmail.com> writes: > 2018-01-04 16:02 GMT+03:00 Niels Möller <ni...@lysator.liu.se>: >> All needed, if I remember the >> earlier discussion, is to add the appopriate iv update to the >> >> if (left > 0) { }

Re: possible new modes

2018-01-04 Thread Niels Möller
won't expire for quite some time. So I agree we can't use it without some possibly painful legal work. Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677. Internet email is subject to wholesale government surveillance. _

Re: Performance of AESNI impl vs other crypto libraries

2018-01-04 Thread Niels Möller
lock size 16. But uglier and less efficient, if it needs to support the general case. Maybe we could have a special case for blocksize 16, and accept that unusual blocksizes will be much slower. Or could we drop support for all but the most relevant block sizes here? Regards, /Niels -- Niels

Re: possible new modes

2018-01-04 Thread Niels Möller
nt nettle interfaces? I take it CMAC is related (but slightly different?) to the CBC-MAC used in CCM mode? What about OCB (for which RFC 7253 may be the most appropriate spec)? As far as I'm aware, it's one of few AEAD modes which provides a significant performance advantage over doing MAC and en

Re: Performance of AESNI impl vs other crypto libraries

2018-01-03 Thread Niels Möller
don't have enough registers for all 15 subkeys and two blocks of data). 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

Skein status

2018-01-01 Thread Niels Möller
o maybe we shouldn't do skein256 at all, but skein512-256 (skein can be used with arbitrary output size). Code size for is 408 bytes for skein256, and 3992 bytes for skein512 (which is completely unrolled). Counting only the main block processing function. Regards, /Niels -- Niels Möller. PGP

ANNOUNCE: Nettle-3.4

2017-11-19 Thread Niels Möller
/nettle-3.4.tar.gz https://www.lysator.liu.se/~nisse/archive/nettle-3.4.tar.gz Happy hacking, /Niels möller NEWS for the Nettle 3.4 release This release fixes bugs and adds a few new features. It also addresses an ABI compatibility issue affecting Nettle-3.1 and later, see

Re: Nettle-3.4 rc2

2017-11-14 Thread Niels Möller
ni...@lysator.liu.se (Niels Möller) writes: > I've prepared a "release candidate" tarball, > https://www.lysator.liu.se/~nisse/archive/nettle-3.4rc2.tar.gz > > All testing appreciated, in particular on non-x86 or non-gnu/linux > platforms. If all goes well, I might make

Re: Nettle-3.4 rc2

2017-11-14 Thread Niels Möller
Eli Zaretskii <e...@gnu.org> writes: >> From: ni...@lysator.liu.se (Niels Möller) >> Or do you also want library files stripped in some way which deletes >> debug info but leaves the symbol tables needed for linking? > > Both executables and libraries (DLL and .a).

Re: API fixes

2017-11-08 Thread Niels Möller
ni...@lysator.liu.se (Niels Möller) writes: > ni...@lysator.liu.se (Niels Möller) writes: > >> Applied. I'd expect the gnutls build to fail at the moment, problem not >> yet fixed. > > And it did. Tentative fix now pushed to the branch api-opaque-fix. And it seems to work

Re: Release plan?

2017-11-08 Thread Niels Möller
ludes gnutls build in the CI to detect breakages early. Applied. I'd expect the gnutls build to fail at the moment, problem not yet fixed. Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677. Internet email is subject to wholesale gover

Re: Fix UBSAN issue

2017-11-08 Thread Niels Möller
ress if that works, otherwise my work address ni...@google.com. 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@li

Re: Release plan?

2017-11-06 Thread Niels Möller
build in the CI to detect breakages > early. Sounds like an excellent idea, and in this case, it might be more reasonable to depend on gnutls images. Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677. Internet email

Re: Release plan?

2017-11-05 Thread Niels Möller
ards, /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: Fix UBSAN issue

2017-11-05 Thread Niels Möller
P depend on well-defined modulo arithmetic on unsigned types in *lots* of places. Any sanitizer which complains about that is pretty useless for this code. If your sanitizer complains by default, please use some option to disable that. And if there's no such option, please bug report the sanitizer tool. B

Re: Release plan?

2017-10-23 Thread Niels Möller
Nikos Mavrogiannopoulos <n...@redhat.com> writes: > On Thu, 2017-09-28 at 21:48 +0200, Niels Möller wrote: >> To get minimal ABI breakage, I also suspect we would need a release >> branch where I revert recent changes that grow the size of struct >> ecc_curve; my ide

Re: [PATCH v3 1/1] Add CFB block mode support

2017-10-17 Thread Niels Möller
2017. I think there should be no issues with that. I see, I've updated your years to "2015, 2017". Code now pushed to master-updates. Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677. Internet email is subject

Re: [PATCH v3 1/1] Add CFB block mode support

2017-10-16 Thread Niels Möller
o figure that out and then fix the .gitignore files first. I'd like to have traditional GNU-style ChangeLog entries for all changes. I'll write up a short summary. It aids integration of patches if the contributor includes ChangeLog entries, preferably outside of the patch itself to avoid patch con

Re: [PATCH v2 0/2] Add Cipher FeedBack mode support

2017-10-04 Thread Niels Möller
Dmitry Eremin-Solenikov <dbarysh...@gmail.com> writes: > 2017-10-03 23:04 GMT+03:00 Niels Möller <ni...@lysator.liu.se>: >> What about message sizes which aren't a multiple of the block size? As I >> understood your code, it would be possible to call cfb_encrypt with

Re: [PATCH v2 0/2] Add Cipher FeedBack mode support

2017-10-03 Thread Niels Möller
arbitrary size (<= block size), and produce an ciphertext of the same size and an updated iv. With all history in the iv, without any other dependency on the sizes of previous segments. Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677. Internet email i

Re: [PATCH v2 1/2] Add CFB block mode support

2017-10-03 Thread Niels Möller
this. My understanding is that the main use case of CFB8 is when we get one octet at a time to encrypt and transmit, i.e., tis function called with length == 1. If that's right, there's little use to optimize it's performance for larger length. Regards, /Niels -- Niels Möller. PGP-encrypte

Re: [PATCH v2 0/2] Add Cipher FeedBack mode support

2017-10-03 Thread Niels Möller
uld be done. Do you think that makes sense? 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: Cannot build nettle with local GMP on CentOS 6

2017-10-01 Thread Niels Möller
y, that's why they get different results when attempting to open "../gmp-6.1.2/gmp.h". pkcs1-conv is built in the tools/ subdirectory. 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

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