Page MenuHome GnuPG
Feed Advanced Search

Jan 23 2018

werner awarded rCe8629e535bd0: Add EAX mode a Cup of Joe token.
Jan 23 2018, 9:22 AM

Jan 22 2018

jukivili committed rC0b55f349a8b8: Fix use of AVX instructions in Chaha20 SSSE3 implementation (authored by jukivili).
Fix use of AVX instructions in Chaha20 SSSE3 implementation
Jan 22 2018, 9:27 PM
jukivili committed rCbd75f0e89817: doc: fix double "See" in front of reference (authored by jukivili).
doc: fix double "See" in front of reference
Jan 22 2018, 9:27 PM
jukivili committed rCe8629e535bd0: Add EAX mode (authored by jukivili).
Add EAX mode
Jan 22 2018, 9:27 PM
jukivili committed rCcd7ed2e3546b: cipher: constify spec arrays (authored by jukivili).
cipher: constify spec arrays
Jan 22 2018, 9:27 PM

Jan 20 2018

jukivili committed rC93503c127a52: Add ARMv8/CE acceleration for AES-XTS (authored by jukivili).
Add ARMv8/CE acceleration for AES-XTS
Jan 20 2018, 9:27 PM

Jan 12 2018

jukivili committed rCa518b6680ea8: Move AMD64 MS to SysV calling convention conversion to assembly side (authored by jukivili).
Move AMD64 MS to SysV calling convention conversion to assembly side
Jan 12 2018, 6:39 PM
jukivili committed rCc3d60acc3ab5: rijndael-ssse3: call assembly functions directly (authored by jukivili).
rijndael-ssse3: call assembly functions directly
Jan 12 2018, 6:39 PM
jukivili committed rC135250e3060e: Make BMI2 inline assembly check more robust (authored by jukivili).
Make BMI2 inline assembly check more robust
Jan 12 2018, 6:39 PM

Jan 9 2018

jukivili committed rCb3ec0f752c92: Add ARMv8/AArch64 implementation of chacha20 (authored by jukivili).
Add ARMv8/AArch64 implementation of chacha20
Jan 9 2018, 8:08 PM
jukivili committed rCa00c5b2988ce: Add AES-NI acceleration for AES-XTS (authored by jukivili).
Add AES-NI acceleration for AES-XTS
Jan 9 2018, 8:08 PM
jukivili committed rCc9e9cb2eb6a1: AES-NI improvements for AMD64 (authored by jukivili).
AES-NI improvements for AMD64
Jan 9 2018, 8:08 PM
jukivili committed rC172ad09cbedc: New ChaCha implementations (authored by jukivili).
New ChaCha implementations
Jan 9 2018, 8:08 PM
jukivili committed rCb9a471ccf5f0: New Poly1305 implementations (authored by jukivili).
New Poly1305 implementations
Jan 9 2018, 8:08 PM
jukivili committed rCd39deb0a41db: mpi/ec: fix when 'unsigned long' is 32-bit but limb size is 64-bit (authored by jukivili).
mpi/ec: fix when 'unsigned long' is 32-bit but limb size is 64-bit
Jan 9 2018, 8:08 PM

Aug 20 2017

jukivili removed a member for libgcrypt: jukivili.
Aug 20 2017, 8:25 PM
jukivili removed a watcher for libgcrypt: jukivili.
Aug 20 2017, 8:25 PM

Aug 1 2017

jukivili committed rC94a92a3db909: Add script to run basic tests with all supported HWF combinations (authored by jukivili).
Add script to run basic tests with all supported HWF combinations
Aug 1 2017, 9:24 PM
jukivili committed rCcf1528e7f276: Fix return value type for _gcry_md_extract (authored by jukivili).
Fix return value type for _gcry_md_extract
Aug 1 2017, 9:04 PM
jukivili committed rC4a7aa30ae9f3: Fix building AArch32 CE implementations when target is ARMv6 arch (authored by jukivili).
Fix building AArch32 CE implementations when target is ARMv6 arch
Aug 1 2017, 9:04 PM

Jul 29 2017

jukivili added a comment to T3314: libgcrypt-1.8.0 failed on solaris 10.

You can apply this patch by first navigating to libgcrypt-1.8 path and then giving following command (you need 'patch' tool to be installed):

Jul 29 2017, 2:10 PM · libgcrypt, Bug Report
jukivili added a comment to T3314: libgcrypt-1.8.0 failed on solaris 10.

In libgcrypt, _gcry_md_extract has different return type in gcrypt-int.h than in md.c. Does attached patch solve the problem?

Jul 29 2017, 1:51 PM · libgcrypt, Bug Report

Jul 13 2017

jukivili closed T2975: building libgcrypt fails on ARM64/FreeBSD 11x STABLE as Resolved.
Jul 13 2017, 10:02 PM · Bug Report, libgcrypt
jukivili added a comment to T2325: rijndael error during make.

Likely fixed by commit a4d1595a2638db63ac4c73e722c8ba95fdd85ff7 (rijndael-aesni: split assembly block to ease register pressure) in 1.7 branch (and included in 1.7.3+).

Jul 13 2017, 9:32 PM · Assembler, Bug Report, libgcrypt

Jul 6 2017

jukivili added a comment to T3247: SIGILL in prepare_macpads() at md.c:681.

I did some experimenting and clang SIGILL does not trigger with commonly used, but non-conforming, variable-length object with "struct hack", as below:

Jul 6 2017, 1:22 PM · clang, Ubuntu, libgcrypt, Bug Report

Jun 18 2017

jukivili committed rC32b4ab209067: rijndael-padlock: change asm operands from read-only to read/write (authored by jukivili).
rijndael-padlock: change asm operands from read-only to read/write
Jun 18 2017, 10:25 AM

May 21 2017

jukivili committed rC4cd94994a9ab: rijndael-ssse3: fix functions calls from assembly blocks (authored by jukivili).
rijndael-ssse3: fix functions calls from assembly blocks
May 21 2017, 7:29 PM
jukivili committed rC68861ae5d3e0: chacha20-armv7-neon: fix to use fast code path when memory is aligned (authored by jukivili).
chacha20-armv7-neon: fix to use fast code path when memory is aligned
May 21 2017, 7:29 PM
jukivili committed rC1a094bc5b2aa: Move data in AMD64 assembly to text section (authored by jukivili).
Move data in AMD64 assembly to text section
May 21 2017, 7:29 PM
jukivili committed rCff02fca39c83: cast5-amd64: use 64-bit relocation with large PIC memory model (authored by jukivili).
cast5-amd64: use 64-bit relocation with large PIC memory model
May 21 2017, 7:29 PM
jukivili committed rC434d4f2af390: Fix building with x86-64 medium and large memory models (authored by jukivili).
Fix building with x86-64 medium and large memory models
May 21 2017, 7:29 PM

Apr 11 2017

jukivili added a watcher for libgcrypt: jukivili.
Apr 11 2017, 8:00 AM
jukivili added a member for libgcrypt: jukivili.
Apr 11 2017, 8:00 AM

Feb 26 2017

jukivili added a comment to T2975: building libgcrypt fails on ARM64/FreeBSD 11x STABLE.

D410: 957_03-fix-clang-arm64.patch

Feb 26 2017, 6:54 PM · Bug Report, libgcrypt
jukivili added a comment to T2975: building libgcrypt fails on ARM64/FreeBSD 11x STABLE.

How about this patch?

Feb 26 2017, 6:54 PM · Bug Report, libgcrypt
jukivili added a comment to T2975: building libgcrypt fails on ARM64/FreeBSD 11x STABLE.

Does the attached patch fix the problem?

Feb 26 2017, 2:21 PM · Bug Report, libgcrypt
jukivili added a comment to T2975: building libgcrypt fails on ARM64/FreeBSD 11x STABLE.

D411: 956_02-fix-clang-arm64.patch

Feb 26 2017, 2:21 PM · Bug Report, libgcrypt
jukivili claimed T2975: building libgcrypt fails on ARM64/FreeBSD 11x STABLE.
Feb 26 2017, 2:08 PM · Bug Report, libgcrypt

Feb 4 2017

jukivili closed T2292: cipher/crc-intel-pclmul.c: load of misaligned address as Resolved.
Feb 4 2017, 12:57 PM · Not A Bug, Bug Report, Assembler, libgcrypt

Jan 25 2017

jukivili added a comment to T2292: cipher/crc-intel-pclmul.c: load of misaligned address.

I have now learnt how GCC uses 'undefined behavior' for aggressive optimization
and that this could break code doing unaligned accesses even on x86. So this
needs to be fixed after all.

Jan 25 2017, 7:49 PM · Not A Bug, Bug Report, Assembler, libgcrypt
jukivili reopened T2292: cipher/crc-intel-pclmul.c: load of misaligned address as "Open".
Jan 25 2017, 7:49 PM · Not A Bug, Bug Report, Assembler, libgcrypt

Dec 21 2016

jukivili added a comment to T2882: libgcrypt: FTBFS with LTO.

D402: 933_01-rijndael-ssse3-fix-compiling.patch

Dec 21 2016, 9:55 PM · Unreleased, Bug Report, libgcrypt
jukivili added a comment to T2882: libgcrypt: FTBFS with LTO.

Attached patch should solve LTO problems with rinjdael-ssse-amd64.c.

'memcpy' problem seems to be because of bad interaction between -flto and
#pragma "no-sse". Strangely switching memcpy to buf_cpy solved problem, even
through buf_cpy itself just uses memcpy (on x86).

With this issue solved, I ran in to problem with rijndael-ssse3 assembly code
blocks going missing with -flto and link failing. So rest of the changes in
patch are for fixing lto visibility of assembly.

Dec 21 2016, 9:55 PM · Unreleased, Bug Report, libgcrypt

Jul 2 2016

jukivili added a comment to T2388: Inform callers about memory alignment requirements of a cipher implementation.

Currently, there is no need for alignmask API. Implementations that we have at
the moment can handle unaligned data and some have fast paths for word-aligned
in/out buffers (which malloc can provide).

We could add section in documentation about appropiate memory alignment for best
performance, and tell to align buffers to cacheline size.

Jul 2 2016, 1:53 PM · libgcrypt, Feature Request
jukivili added a comment to T2396: libgcrypt 1.7.1 not compiling.

Hello,

I posted fix for this issue to mailing-list. See:
http://marc.info/?l=gcrypt-devel&m=146732375910584&w=2

Jul 2 2016, 1:39 PM · Bug Report, libgcrypt

Mar 25 2016

jukivili added a comment to T2292: cipher/crc-intel-pclmul.c: load of misaligned address.

Current code is perfectly fine as crc-intel-pclmul.c is i386/amd64-only source
file and that target architecture can handle unaligned loads.

Mar 25 2016, 12:15 PM · Not A Bug, Bug Report, Assembler, libgcrypt

Sep 7 2015

jukivili added a comment to T1881: Undefined behavior when running `make check` under Clang sanitizers.

Fixed by commit 92fa5f16d69707e302c0f85b2e5e80af8dc037f1

http://git.gnupg.org/cgi-bin/gitweb.cgi?p=libgcrypt.git;a=commit;h=92fa5f16d69707e302c0f85b2e5e80af8dc037f1

Sep 7 2015, 9:33 PM · Bug Report, libgcrypt
jukivili closed T1881: Undefined behavior when running `make check` under Clang sanitizers as Resolved.
Sep 7 2015, 9:33 PM · Bug Report, libgcrypt

Mar 11 2015

jukivili added a comment to T1881: Undefined behavior when running `make check` under Clang sanitizers.

Unaligned memory accesses are enabled on only architectures that can handle
those. The buf_xor function that you copy-pasted partially to stackoverflow
actually has alignment checks:

#if defined(i386) || defined(x86_64) || \

defined(__powerpc__) || defined(__powerpc64__) || \
(defined(__arm__) && defined(__ARM_FEATURE_UNALIGNED)) || \
defined(__aarch64__)

/* These architectures are able of unaligned memory accesses and can

  handle those fast.
*/
  1. define BUFHELP_FAST_UNALIGNED_ACCESS 1 #endif ... /* Optimized function for buffer xoring */ static inline void buf_xor(void *_dst, const void *_src1, const void *_src2, size_t len) { byte *dst = _dst; const byte *src1 = _src1; const byte *src2 = _src2; uintptr_t *ldst; const uintptr_t *lsrc1, *lsrc2; #ifndef BUFHELP_FAST_UNALIGNED_ACCESS const unsigned int longmask = sizeof(uintptr_t) - 1; /* Skip fast processing if buffers are unaligned. */ if (((uintptr_t)dst | (uintptr_t)src1 | (uintptr_t)src2) & longmask) goto do_bytes; #endif ldst = (uintptr_t *)(void *)dst; lsrc1 = (const uintptr_t *)(const void *)src1; lsrc2 = (const uintptr_t *)(const void *)src2; for (; len >= sizeof(uintptr_t); len -= sizeof(uintptr_t)) *ldst++ = *lsrc1++ ^ *lsrc2++; dst = (byte *)ldst; src1 = (const byte *)lsrc1; src2 = (const byte *)lsrc2; #ifndef BUFHELP_FAST_UNALIGNED_ACCESS do_bytes: #endif /* Handle tail. */ for (; len; len--) *dst++ = *src1++ ^ *src2++; }

So, yes, we use unaligned memory accesses but only when it is known that they work.

Now, solution (with same code generation, without undefined behaviour) to this
issue is to tell the compiler that we really want to do unaligned accesses. For
that we need to change the accesses to happen through type that has proper
one-byte alignment, but generates the same code (unaligned word-size memory
accesses) on the few architectures that enable 'BUFHELP_FAST_UNALIGNED_ACCESS':

#ifdef BUFHELP_FAST_UNALIGNED_ACCESS
/* Define type with one-byte alignment on architectures with fast unaligned

  memory accesses.
*/

typedef struct bufhelp_int_s
{

uintptr_t a;

} attribute((packed, aligned(1))) bufhelp_int_t;
#else
/* Define type with default alignment for other architectures (unaligned

  accessed handled in per byte loops).
*/

typedef struct bufhelp_int_s
{

uintptr_t a;

} bufhelp_int_t;
#endif

Ofcourse, BUFHELP_FAST_UNALIGNED_ACCESS now need to be limited to compiler that
support GCC style attributes.

Mar 11 2015, 6:00 PM · Bug Report, libgcrypt
jukivili claimed T1881: Undefined behavior when running `make check` under Clang sanitizers.
Mar 11 2015, 5:35 PM · Bug Report, libgcrypt