From: Niels Möller Date: Thu, 5 Feb 2015 19:54:39 +0000 (+0100) Subject: Merge branch 'versioned-symbols' into master X-Git-Tag: nettle_3.1rc1~34 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a31e4905fc316dfcb5c88910eb775b477d80460e;p=thirdparty%2Fnettle.git Merge branch 'versioned-symbols' into master --- a31e4905fc316dfcb5c88910eb775b477d80460e diff --cc ChangeLog index 9fd2d8f6,79c81cfb..faaf7e0d --- a/ChangeLog +++ b/ChangeLog @@@ -1,273 -1,22 +1,292 @@@ +2015-01-30 Niels Möller + + Update chacha-poly1305 for draft-irtf-cfrg-chacha20-poly1305-08. + * chacha-poly1305.h (CHACHA_POLY1305_NONCE_SIZE): Increase to 12 + bytes, i.e., CHACHA_NONCE96_SIZE. + * chacha-poly1305.c (chacha_poly1305_set_nonce): Use + chacha_set_nonce96. + (poly1305_pad): New function. + (chacha_poly1305_encrypt): Use poly1305_pad. + (chacha_poly1305_digest): Call poly1305_pad, and format length + fields as a single poly1305 block. + + * chacha-set-nonce.c (chacha_set_nonce96): New function. + * chacha.h (CHACHA_NONCE96_SIZE): New constant. + * testsuite/chacha-test.c: Add test for chacha with 96-bit nonce. + +2015-01-27 Niels Möller + + * ecc.h: Deleted declarations of unused itch functions. Moved + declarations of internal functions to... + * ecc-internal.h: ...new location. Also added a leading under + score on the symbols. + (ecc_a_to_j, ecc_j_to_a, ecc_eh_to_a, ecc_dup_jj, ecc_add_jja) + (ecc_add_jjj, ecc_dup_eh, ecc_add_eh, ecc_add_ehh, ecc_mul_g) + (ecc_mul_a, ecc_mul_g_eh, ecc_mul_a_eh): Affected functions. + +2015-01-26 Niels Möller + + * ecc-add-eh.c (ecc_add_eh_itch): Deleted. + * ecc-add-ehh.c (ecc_add_ehh_itch): Deleted. + * ecc-add-jja.c (ecc_add_jja_itch): Deleted. + * ecc-add-jjj.c (ecc_add_jjj_itch): Deleted. + * ecc-dup-eh.c (ecc_dup_eh_itch): Deleted. + * ecc-dup-jj.c (ecc_dup_jj_itch): Deleted. + * ecc-eh-to-a.c (ecc_eh_to_a_itch): Deleted. + * ecc-j-to-a.c (ecc_j_to_a_itch): Deleted. + * ecc-mul-a-eh.c (ecc_mul_a_eh_itch): Deleted. + * ecc-mul-a.c (ecc_mul_a_itch): Deleted. + * ecc-mul-g-eh.c (ecc_mul_g_eh_itch): Deleted. + * ecc-mul-g.c (ecc_mul_g_itch): Deleted. + +2015-01-25 Niels Möller + + * arm/fat/sha1-compress-2.asm: New file. + * arm/fat/sha256-compress-2.asm: Likewise. + * fat-arm.c (fat_init): Setup for use of additional v6 assembly + functions. + + * sha1-compress.c: Prepare for fat build with C and assembly + implementations. + * sha256-compress.c: Likewise. + + * fat-setup.h (sha1_compress_func, sha256_compress_func): New typedefs. + + * configure.ac (asm_nettle_optional_list): Added + sha1-compress-2.asm and sha256-compress-2.asm, and corresponding + HAVE_NATIVE_*. + + From Martin Storsjö: + * arm: Add .arch directives for armv6. This allows building these + files as part of a fat build, even if the assembler by default + targets a lower architecture version. + +2015-01-23 Niels Möller + + * fat-setup.h (DEFINE_FAT_FUNC): Check value of function pointer, + before calling fat_init. Should be correct even without memory + barrier. + * fat-x86_64.c (fat_init): Deleted static variable initialized. + The checks of the relevant pointer in DEFINE_FAT_FUNC is more + robust. + * fat-arm.c (fat_init): Likewise. + +2015-01-21 Niels Möller + + * fat-arm.c (fat_init): Setup for use of neon assembly functions. + + * arm/fat/salsa20-core-internal-2.asm: New file. + * arm/fat/sha3-permute-2.asm: New file. + * arm/fat/sha512-compress-2.asm: New file. + * arm/fat/umac-nh-2.asm: New file. + * arm/fat/umac-nh-n-2.asm: New file. + + * salsa20-core-internal.c: Prepare for fat build with C and + assembly implementations. + * sha512-compress.c: Likewise. + * sha3-permute.c: Likewise. + * umac-nh.c: Likewise. + * umac-nh-n.c: Likewise. + + * configure.ac (asm_nettle_optional_list): Added more *-2.asm + files, and corresponding HAVE_NATIVE_* defines. Recognize PROLOGUE + macro in asm files, also when not at the start of the line. + +2015-01-20 Niels Möller + + * fat-arm.c (get_arm_features): Check NETTLE_FAT_OVERRIDE + environment variable. + + * fat-x86_64.c (get_x86_features): New function. Check + NETTLE_FAT_OVERRIDE environment variable. + (fat_init): Use it. + + * fat-setup.h (secure_getenv) [!HAVE_SECURE_GETENV]: Dummy + definition, returning NULL. + (ENV_OVERRIDE): New constant. + + * configure.ac: Check for secure_getenv function. + +2015-01-19 Niels Möller + + * configure.ac: Fat library setup for arm. + * fat-arm.c: New file. + * arm/fat/aes-encrypt-internal.asm: New files. + * arm/fat/aes-encrypt-internal-2.asm: New file. + * arm/fat/aes-decrypt-internal.asm: New file. + * arm/fat/aes-decrypt-internal-2.asm: New file. + + * Makefile.in (DISTFILES): Added fat-setup.h. + + * fat-setup.h: New file, declarations moved from... + * fat-x86_64.c: ... old location + +2015-01-17 Niels Möller + + * fat-x86_64.c (DECLARE_FAT_FUNC, DEFINE_FAT_FUNC) + (DECLARE_FAT_FUNC_VAR): New macros, to define needed resolver and + wrapper functions. + + * config.m4.in (SYMBOL_PREFIX): Define from from autoconf + ASM_SYMBOL_PREFIX. + (C_NAMS): move definition to... + * asm.m4 (C_NAME): Define here, also take fat_transform. + (fat_suffix): Replaced by... + (fat_transform): New macro, taking symbol nama as argument. + Updated all uses of fat_suffix. + * fat-x86_64.c: Updated for internal "_nettle" prefix on + cpu-specific memxor functions. + + * fat-x86_64.c: Set up for sse2 vs non-sse2 memxor. Patch by Nikos + Mavrogiannopoulos. + * configure.ac (asm_nettle_optional_list): Added memxor-2.asm. + * x86_64/fat/memxor-2.asm: New file. + * x86_64/fat/memxor.asm: New file. + + * x86_64/memxor.asm: Use ifdef, not ifelse, for testing USE_SSE2. + +2015-01-16 Niels Möller + + * configure.ac (OPT_NETTLE_SOURCES): New substituted variable. + (asm_path): Fixed x86_64 fat setup. Include only x86_64 and + x86_64/fat in the asm_path. Put fat-x86_64.c in + OPT_NETTLE_SOURCES, with no symlinking. + + * fat-x86_64.c: Renamed,... + * x86_64/fat/fat.c: ... from old name. + +2015-01-13 Niels Möller + + * x86_64/fat/fat.c: For constructor hack, check + HAVE_GCC_ATTRIBUTE, not __GNUC__. Also support sun compilers, as + suggested by Nikos Mavrogiannopoulos, and attch the constructor + attribute directly to fat_init. + (fat_constructor): Deleted wrapper function. + + * x86_64/fat/fat.c: New file, initialization for x86_64 fat + library. + + * x86_64/fat/cpuid.asm (_nettle_cpuid): New file and function. + + * x86_64/fat/aes-encrypt-internal.asm: New file, including + x86_64/aes-encrypt-internal.asm, after setting fat_suffix to + _x86_64. + * x86_64/fat/aes-decrypt-internal.asm: New file, analogous setup. + * x86_64/fat/aes-encrypt-internal-2.asm: New file, including + x86_64/aesni/aes-encrypt-internal.asm, after setting fat_suffix to + _aesni. + * x86_64/fat/aes-decrypt-internal.asm-2: New file, analogous + setup. + + * configure.ac: New command line option --enable-fat. + (asm_nettle_optional_list): Added cpuid.asm, fat.c, + aes-encrypt-internal-2.asm, and aes-decrypt-internal-2.asm. + + * asm.m4 (fat_suffix): New suffix added to symbol names. + + * x86_64/aesni/aes-encrypt-internal.asm: Use explicit .byte + sequences for aes instructions, don't rely on assembler support. + * x86_64/aesni/aes-decrypt-internal.asm: Likewise. + + * aclocal.m4 (NETTLE_CHECK_IFUNC): New macro, checking for ifunc + and settting HAVE_LINK_IFUNC if working. + * configure.ac: Use it. + +2015-01-12 Niels Möller + + * asm.m4 (DECLARE_FUNC): New macro, extracted from PROLOGUE. + (PROLOGUE): Use it. + + * configure.ac (OPT_NETTLE_OBJS, OPT_HOGWEED_OBJS): Renamed + substituted variables, and list the object files rather than + source files. + (OPT_ASM_NETTLE_SOURCES, OPT_ASM_HOGWEED_SOURCES): ...Old names. + * Makefile.in (OPT_NETTLE_OBJS, OPT_HOGWEED_OBJS): Use new + variables. + +2015-01-11 Niels Möller + + * x86_64/aesni/aes-decrypt-internal.asm: New file. + * x86_64/aesni/aes-encrypt-internal.asm: New file. + * configure.ac: New configure flag --enable-x86-aesni. + + * aclocal.m4 (LSH_RPATH_INIT): Handle freebsd, in the same way as + gnu/linux, with -Wl,-rpath,. + + Merged memxor-reorg changes, starting at 2014-10-23. + +2015-01-10 Niels Möller + + * arm/memxor.asm (memxor3): Moved to new file. + * arm/memxor3.asm: New file. + +2014-11-24 Niels Möller + + * x86_64/memxor3.asm (memxor3): New file, code moved from old + memxor.asm. + * x86_64/memxor.asm (memxor): Rewritten, no longer jumps into + memxor3. + + * configure.ac (asm_replace_list): Added memxor.asm and + memxor3.asm. + +2014-10-23 Niels Möller + + * configure.ac (IF_ASM): New substituted variable. + * testsuite/Makefile.in (VALGRIND): Allow partial loads only when + build includes assembly files. + + * memxor-internal.h (READ_PARTIAL): New macro. + * memxor.c (memxor_different_alignment): Avoid out-of-bounds + reads, corresponding to valgrind's --partial-loads-ok. Use + READ_PARTIAL. + * memxor3.c: Analogous changes for unaligned operations. + + * configure.ac (asm_replace_list): Deleted memxor.asm, now + incompatible with the memxor/memxor3 split. + + * memxor3.c: New file, split off from memxor.c. + * memxor-internal.h: New file, declarations shared by memxor.c and + memxor3.c. + * memxor.c: memxor3 fucntions moved out from this file. + * Makefile.in (nettle_SOURCES): Added memxor3.c. + (DISTFILES): Added memxor-internal.h. + + * memxor.c (memxor_common_alignment, memxor_different_alignment) + (memxor): Change loop order, iterate from the end. + (memxor3_common_alignment): Unroll twice. + (word_t): On x86_64, unconditionally define as uint64_t, to get 64 + bits also in M$ windows. Replaced all uses of SIZEOF_LONG. + +2014-12-12 Niels Möller + + * cbc.h (CBC_ENCRYPT, CBC_DECRYPT): Make type-checking hack + stricter, warn if type of length argument is smaller than size_t. + * ctr.h (CTR_CRYPT): Likewise. + * eax.h (EAX_SET_KEY, EAX_SET_NONCE, EAX_UPDATE, EAX_ENCRYPT) + (EAX_DECRYPT, EAX_DIGEST): Likewise. + * gcm.h (GCM_SET_KEY, GCM_ENCRYPT, GCM_DECRYPT, GCM_DIGEST): + Likewise. + + 2014-12-08 Niels Möller + + * aclocal.m4 (LD_VERSION_SCRIPT): Linker scripts no longer located + in the source tree. + + * configure.ac (LIBNETTLE_MAJOR): Bump major number, now 6. + (LIBHOGWEED_MAJOR): Bump major number, now 5. + + From Nikos Mavrogiannopoulos. Support for versioned symbols. + * aclocal.m4 (LD_VERSION_SCRIPT): New macro. Substitute + EXTRA_LINKER_FLAGS and EXTRA_HOGWEED_LINKER_FLAGS. + * configure.ac: Use LD_VERSION_SCRIPT. Generate libnettle.map + and libhogweed.map. + (HOGWEED_EXTRA_SYMBOLS): New substituted variable. + * libnettle.map.in: New file, libnettle.so linker script + * libhogweed.map.in: New file, libhogweed.so linker script. + * Makefile.in ($(LIBNETTLE_FORLINK)): Use EXTRA_LINKER_FLAGS. + ($(LIBHOGWEED_FORLINK)): Use EXTRA_HOGWEED_LINKER_FLAGS. + 2014-11-24 Niels Möller * gcm.h (GCM_SET_KEY): Rename macro argument KEY to avoid