summaryrefslogtreecommitdiffstats
path: root/crypto/poly1305
AgeCommit message (Collapse)Author
2018-02-27Update copyright yearMatt Caswell
Reviewed-by: Richard Levitte <levitte@openssl.org>
2018-02-24{ec/curve25519,poly1305/poly1305}.c: relax pedantic constraint.Andy Polyakov
As it turns out gcc -pedantic doesn't seem to consider __uint128_t as non-standard, unlike __int128 that is. Fix even MSVC warnings in curve25519.c. Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5449)
2018-02-14Harmonize the make variables across all known platforms familiesRichard Levitte
The make variables LIB_CFLAGS, DSO_CFLAGS and so on were used in addition to CFLAGS and so on. This works without problem on Unix and Windows, where options with different purposes (such as -D and -I) can appear anywhere on the command line and get accumulated as they come. This is not necessarely so on VMS. For example, macros must all be collected and given through one /DEFINE, and the same goes for inclusion directories (/INCLUDE). So, to harmonize all platforms, we repurpose make variables starting with LIB_, DSO_ and BIN_ to be all encompassing variables that collects the corresponding values from CFLAGS, CPPFLAGS, DEFINES, INCLUDES and so on together with possible config target values specific for libraries DSOs and programs, and use them instead of the general ones everywhere. This will, for example, allow VMS to use the exact same generators for generated files that go through cpp as all other platforms, something that has been impossible to do safely before now. Reviewed-by: Andy Polyakov <appro@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5357)
2018-01-31poly1305/poly1305_ieee754.c: add support for MIPS.Andy Polyakov
Reviewed-by: Rich Salz <rsalz@openssl.org>
2018-01-28Processing GNU-style "make variables" - separate CPP flags from C flagsRichard Levitte
C preprocessor flags get separated from C flags, which has the advantage that we don't get loads of macro definitions and inclusion directory specs when linking shared libraries, DSOs and programs. This is a step to add support for "make variables" when configuring. Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5177)
2017-12-23poly1305/asm/poly1305-x86_64.pl: add Knights Landing AVX512 result.Andy Polyakov
Hardware used for benchmarking courtesy of Atos, experiments run by Romain Dolbeau <romain.dolbeau@atos.net>. Kudos! Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/4855)
2017-11-25poly1305/asm/poly1305-x86_64.pl: switch to pure AVX512F.Andy Polyakov
Convert AVX512F+VL+BW code path to pure AVX512F, so that it can be executed even on Knights Landing. Trigger for modification was observation that AVX512 code paths can negatively affect overall Skylake-X system performance. Since we are likely to suppress AVX512F capability flag [at least on Skylake-X], conversion serves as kind of "investment protection". Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/4758)
2017-11-13ARMv8 assembly pack: add Qualcomm Kryo results.Andy Polyakov
[skip ci] Reviewed-by: Tim Hudson <tjh@openssl.org>
2017-11-11Many spelling fixes/typo's corrected.Josh Soref
Around 138 distinct errors found and fixed; thanks! Reviewed-by: Kurt Roeckx <kurt@roeckx.be> Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/3459)
2017-07-21x86_64 assembly pack: "optimize" for Knights Landing, add AVX-512 results.Andy Polyakov
"Optimize" is in quotes because it's rather a "salvage operation" for now. Idea is to identify processor capability flags that drive Knights Landing to suboptimial code paths and mask them. Two flags were identified, XSAVE and ADCX/ADOX. Former affects choice of AES-NI code path specific for Silvermont (Knights Landing is of Silvermont "ancestry"). And 64-bit ADCX/ADOX instructions are effectively mishandled at decode time. In both cases we are looking at ~2x improvement. AVX-512 results cover even Skylake-X :-) Hardware used for benchmarking courtesy of Atos, experiments run by Romain Dolbeau <romain.dolbeau@atos.net>. Kudos! Reviewed-by: Rich Salz <rsalz@openssl.org>
2017-07-03x86_64 assembly pack: fill some blanks in Ryzen results.Andy Polyakov
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
2017-05-11Remove filename argument to x86 asm_init.David Benjamin
The assembler already knows the actual path to the generated file and, in other perlasm architectures, is left to manage debug symbols itself. Notably, in OpenSSL 1.1.x's new build system, which allows a separate build directory, converting .pl to .s as the scripts currently do result in the wrong paths. This also avoids inconsistencies from some of the files using $0 and some passing in the filename. Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Andy Polyakov <appro@openssl.org> (Merged from https://github.com/openssl/openssl/pull/3431)
2017-03-22poly1305/asm/poly1305-x86_64.pl: add poly1305_blocks_vpmadd52_8x.Andy Polyakov
As hinted by its name new subroutine processes 8 input blocks in parallel by loading data to 512-bit registers. It still needs more work, as it needs to handle some specific input lengths better. In this sense it's yet another intermediate step... Reviewed-by: Rich Salz <rsalz@openssl.org>
2017-03-22x86_64 assembly pack: add some Ryzen performance results.Andy Polyakov
Reviewed-by: Tim Hudson <tjh@openssl.org>
2017-03-13poly1305/asm/poly1305-x86_64.pl: add poly1305_blocks_vpmadd52_4x.Andy Polyakov
As hinted by its name new subroutine processes 4 input blocks in parallel. It still operates on 256-bit registers and is just another step toward full-blown AVX512IFMA procedure. Reviewed-by: Rich Salz <rsalz@openssl.org>
2017-03-13poly1305/asm/poly1305-armv8.pl: ilp32-specific poly1305_init fix.Andy Polyakov
Reviewed-by: Rich Salz <rsalz@openssl.org>
2017-02-26poly1305/asm/poly1305-x86_64.pl: minor AVX512 optimization.Andy Polyakov
Reviewed-by: Rich Salz <rsalz@openssl.org>
2017-02-26poly1305/asm/poly1305-x86_64.pl: add CFI annotations.Andy Polyakov
Reviewed-by: Rich Salz <rsalz@openssl.org>
2017-02-25poly1305/asm/poly1305-x86_64.pl: add VPMADD52 code path.Andy Polyakov
This is initial and minimal single-block implementation. Reviewed-by: Rich Salz <rsalz@openssl.org>
2017-02-25poly1305/asm/poly1305-x86_64.pl: switch to vpermdd in table expansion.Andy Polyakov
Effectively it's minor size optimization, 5-6% per affected subroutine. Reviewed-by: Rich Salz <rsalz@openssl.org>
2017-02-25poly1305/asm/poly1305-x86_64.pl: optimize AVX512 code path.Andy Polyakov
On pre-Skylake best optimization strategy was balancing port-specific instructions, while on Skylake minimizing the sheer amount appears more sensible. Reviewed-by: Rich Salz <rsalz@openssl.org>
2017-01-24Add support for Poly1305 in EVP_PKEYTodd Short
Add Poly1305 as a "signed" digest. Reviewed-by: Andy Polyakov <appro@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2128)
2017-01-21poly1305/poly1305_base2_44.c: clarify shift boundary condition.Andy Polyakov
Reviewed-by: Matt Caswell <matt@openssl.org>
2016-12-19x86 assembly pack: update performance results.Andy Polyakov
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-12-15poly1305/asm/poly1305-x86_64.pl: allow nasm to assemble AVX512 code.Andy Polyakov
chacha/asm/chacha-x86_64.pl: refine nasm version detection logic. Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-12-12x86_64 assembly pack: add AVX512 ChaCha20 and Poly1305 code paths.Andy Polyakov
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-12-12poly1305/poly1305_base2_44.c: add reference base 2^44 implementation.Andy Polyakov
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-11-10Revert "Move algorithm specific ppccap code from crypto/ppccap.c"Richard Levitte
Now that we can link specifically with static libraries, the immediate need to split ppccap.c (and eventually other *cap.c files) is no more. This reverts commit e3fb4d3d52e188b83ccb8506aa2f16cb686f4d6c. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-11-09Move algorithm specific ppccap code from crypto/ppccap.cRichard Levitte
Having that code in one central object file turned out to cause trouble when building test/modes_internal_test. Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1883)
2016-11-03Convert poly1305 selftest into internal testRichard Levitte
Reviewed-by: Emilia Käsper <emilia@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1789)
2016-10-24x86_64 assembly pack: add Goldmont performance results.Andy Polyakov
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-09-02MIPS assembly pack: adapt it for MIPS[32|64]R6.Andy Polyakov
MIPS[32|64]R6 is binary and source incompatible with previous MIPS ISA specifications. Fortunately it's still possible to resolve differences in source code with standard pre-processor and switching to trap-free version of addition and subtraction instructions. Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-08-16ARMv8 assembly pack: add Samsung Mongoose results.Andy Polyakov
Reviewed-by: Tim Hudson <tjh@openssl.org>
2016-08-05spelling fixes, just comments and readme.klemens
Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1413)
2016-07-01SPARC assembly pack: enforce V8+ ABI constraints.Andy Polyakov
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-06-30Convert memset calls to OPENSSL_cleanseMatt Caswell
Ensure things really do get cleared when we intend them to. Addresses an OCAP Audit issue. Reviewed-by: Andy Polyakov <appro@openssl.org>
2016-05-29x86_64 assembly pack: tolerate spaces in source directory name.Andy Polyakov
[as it is now quoting $output is not required, but done just in case] Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-05-28poly1305/asm/poly1305-mips.pl: adhere to standard frame layout.Andy Polyakov
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-05-28SPARC assembly pack: add missing .type directives.Andy Polyakov
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-05-21Add OpenSSL copyright to .pl filesRich Salz
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-05-17Copyright consolidation 05/10Rich Salz
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-05-16Use OPENSSL_hexchar2intRich Salz
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-05-10MIPS64 assembly pack: add Poly1305 module.Andy Polyakov
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-05-09fix tab-space mixed indentationFdaSilvaYY
No code change Reviewed-by: Kurt Roeckx <kurt@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org>
2016-05-06poly1305/asm/poly1305-x86_64.pl: contain symbols within shared lib.Andy Polyakov
We don't need it, but external users might find it handy. Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-05-06poly1305/asm/poly1305-x86_64.pl: make it cross-compile.Andy Polyakov
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-04-28various spelling fixesFdaSilvaYY
Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/952)
2016-04-26SPARCv9 assembly pack: fine-tune run-time switch.Andy Polyakov
Reviewed-by: Tim Hudson <tjh@openssl.org>
2016-04-25crypto/poly1305/asm: chase overflow bit on x86 and ARM platforms.Andy Polyakov
Even though no test could be found to trigger this, paper-n-pencil estimate suggests that x86 and ARM inner loop lazy reductions can loose a bit in H4>>*5+H0 step. Reviewed-by: Emilia Käsper <emilia@openssl.org>
2016-04-20Remove --classic build entirelyRichard Levitte
The Unix build was the last to retain the classic build scheme. The new unified scheme has matured enough, even though some details may need polishing. Reviewed-by: Rich Salz <rsalz@openssl.org>