- 18 Dec, 2018 2 commits
-
-
Hanno Becker authored
-
Hanno Becker authored
-
- 07 Jun, 2018 2 commits
-
-
Manuel Pégourié-Gonnard authored
-
Manuel Pégourié-Gonnard authored
Motivation is similar to NO_UDBL_DIVISION. The alternative implementation of 64-bit mult is straightforward and aims at obvious correctness. Also, visual examination of the generate assembly show that it's quite efficient with clang, armcc5 and arm-clang. However current GCC generates fairly inefficient code for it. I tried to rework the code in order to make GCC generate more efficient code. Unfortunately the only way to do that is to get rid of 64-bit add and handle the carry manually, but this causes other compilers to generate less efficient code with branches, which is not acceptable from a side-channel point of view. So let's keep the obvious code that works for most compilers and hope future versions of GCC learn to manage registers in a sensible way in that context. See https://bugs.launchpad.net/gcc-arm-embedded/+bug/1775263
-
- 24 May, 2018 15 commits
-
-
Manuel Pégourié-Gonnard authored
- fix some whitespace - fix most overlong lines - remove some superfluous parentheses - s/result/ret/ for consistency with the rest of the library
-
Manuel Pégourié-Gonnard authored
- prefix is no necessary for static ids and makes lines longer - most often omitted (even though we're not fully consistent)
-
Manuel Pégourié-Gonnard authored
-
Manuel Pégourié-Gonnard authored
This reduces clutter, making the functions more readable. Also, it makes lcov see each line as covered. This is not cheating, as the lines that were previously seen as not covered are not supposed to be reached anyway (failing branches of the selftests). Thanks to this and previous test suite enhancements, lcov now sees chacha20.c and poly1305.c at 100% line coverage, and for chachapoly.c only two lines are not covered (error returns from lower-level module that should never happen except perhaps if an alternative implementation returns an unexpected error).
-
Manuel Pégourié-Gonnard authored
Also fix two validation bugs found while adding the tests. Also handle test dependencies the right way while at it.
-
Manuel Pégourié-Gonnard authored
-
Manuel Pégourié-Gonnard authored
This module used (len, pointer) while (pointer, len) is more common in the rest of the library, in particular it's what's used in the CMAC API that is very comparable to Poly1305, so switch to (pointer, len) for consistency.
-
Manuel Pégourié-Gonnard authored
For consistency with the existing CMAC and HMAC APIs
-
Manuel Pégourié-Gonnard authored
This is a C99 feature and unfortunately we can't rely on it yet considering the set of toolchain (versions) we want to support.
-
Manuel Pégourié-Gonnard authored
- in .h files: only put the context declaration inside the #ifdef _ALT (this was changed in 2.9.0, ie after the original PR) - in .c file: only leave selftest out of _ALT: even though some function are trivial to build from other parts, alt implementors might want to go another way about them (for efficiency or other reasons)
-
Daniel King authored
This change corrects some minor style violations, mostly for spacing around parentheses.
-
Daniel King authored
-
Daniel King authored
-
Daniel King authored
This change permits users of the ChaCha20/Poly1305 algorithms (and the AEAD construction thereof) to pass NULL pointers for data that they do not need, and avoids the need to provide a valid buffer for data that is not used.
-
Daniel King authored
Test vectors are included from RFC 7539. Poly1305 is also added to the benchmark program.
-