aboutsummaryrefslogtreecommitdiff
path: root/crypto/chacha
AgeCommit message (Collapse)AuthorFilesLines
2017-07-21x86_64 assembly pack: "optimize" for Knights Landing, add AVX-512 results.Andy Polyakov1-2/+4
"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 Polyakov1-1/+1
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
2017-05-11Remove filename argument to x86 asm_init.David Benjamin1-1/+1
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-22x86_64 assembly pack: add some Ryzen performance results.Andy Polyakov1-0/+1
Reviewed-by: Tim Hudson <tjh@openssl.org>
2017-02-26chacha/asm/chacha-x86_64.pl: add CFI annotations.Andy Polyakov1-0/+41
Reviewed-by: Rich Salz <rsalz@openssl.org>
2017-02-06x86_64 assembly pack: Win64 SEH face-lift.Andy Polyakov1-135/+380
- harmonize handlers with guidelines and themselves; - fix some bugs in handlers; - add missing handlers in chacha and ecp_nistz256 modules; Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-12-25chacha/asm/chacha-x86_64.pl: add AVX512 path optimized for shorter inputs.Andy Polyakov1-26/+249
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-12-19x86 assembly pack: update performance results.Andy Polyakov2-0/+2
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-12-15poly1305/asm/poly1305-x86_64.pl: allow nasm to assemble AVX512 code.Andy Polyakov1-1/+1
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 Polyakov1-3/+519
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-11-11chacha/asm/chacha-x86.pl: improve [backward] portability.Andy Polyakov1-1/+8
In order to minimize dependency on assembler version a number of post-SSE2 instructions are encoded manually. But in order to simplify the procedure only register operands are considered. Non-register operands are passed down to assembler. Module in question uses pshufb with memory operands, and old [GNU] assembler can't handle it. Fortunately in this case it's possible skip just the problematic segment without skipping SSSE3 support altogether. Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-11-11PPC assembler pack: add some PPC970/G5 performance data.Andy Polyakov1-1/+2
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-11-10Revert "Move algorithm specific ppccap code from crypto/ppccap.c"Richard Levitte1-31/+0
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 Levitte1-0/+31
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-10-24x86_64 assembly pack: add Goldmont performance results.Andy Polyakov2-0/+2
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-10-10Remove trailing whitespace from some files.David Benjamin3-6/+6
The prevailing style seems to not have trailing whitespace, but a few lines do. This is mostly in the perlasm files, but a few C files got them after the reformat. This is the result of: find . -name '*.pl' | xargs sed -E -i '' -e 's/( |'$'\t'')*$//' find . -name '*.c' | xargs sed -E -i '' -e 's/( |'$'\t'')*$//' find . -name '*.h' | xargs sed -E -i '' -e 's/( |'$'\t'')*$//' Then bn_prime.h was excluded since this is a generated file. Note mkerr.pl has some changes in a heredoc for some help output, but other lines there lack trailing whitespace too. Reviewed-by: Kurt Roeckx <kurt@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org>
2016-09-08chacha/asm/chacha-ppc.pl: add missing .text directive.Andy Polyakov1-0/+1
RT#4667 Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-08-16ARMv8 assembly pack: add Samsung Mongoose results.Andy Polyakov1-0/+1
Reviewed-by: Tim Hudson <tjh@openssl.org>
2016-08-05spelling fixes, just comments and readme.klemens1-1/+1
Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1413)
2016-06-06s390x assembly pack: improve portability.Andy Polyakov1-2/+2
Some of the instructions used in latest additions are extension ones. There is no real reason to limit ourselves to specific processors, so [re-]adhere to base instruction set. RT#4548 Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-06-03chacha/chacha_enc.c: harmonize counter width with subroutine name.Andy Polyakov1-3/+7
_ctr32 in function name refers to 32-bit counter, but it was implementing 64-bit one. This didn't pose problem to EVP, but 64-bit counter was just misleading. RT#4512 Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-05-29x86_64 assembly pack: tolerate spaces in source directory name.Andy Polyakov1-1/+1
[as it is now quoting $output is not required, but done just in case] Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-05-21Add OpenSSL copyright to .pl filesRich Salz7-7/+56
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-05-17Copyright consolidation 09/10Rich Salz1-46/+6
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-05-02chacha/asm/chacha-x86.pl: make it compile on legacy systems.Andy Polyakov1-1/+3
Usage of $ymm variable is a bit misleading here, it doesn't refer to %ymm register bank, but rather to VEX instruction encoding, which AMD XOP code path depends on. Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-04-25chacha/asm/chacha-ppc.pl: get misalignment corner case right on big-endian.Andy Polyakov1-1/+3
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-04-20Remove --classic build entirelyRichard Levitte1-57/+0
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>
2016-04-13chacha/asm/chacha-armv8.pl: fix intermittent build failures.Andy Polyakov1-0/+1
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-03-21Remove the remainder of util/mk1mf.pl and companion scriptsRichard Levitte1-3/+0
This removes all scripts that deal with MINFO as well, since that's only used by mk1mf. Reviewed-by: Andy Polyakov <appro@openssl.org>
2016-03-13Add $(LIB_CFLAGS) for any build.info generator that uses $(CFLAGS)Richard Levitte1-1/+1
The reason to do so is that some of the generators detect PIC flags like -fPIC and -KPIC, and those are normally delivered in LD_CFLAGS. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-03-11crypto/*/build.info: make it work on ARM platforms.Andy Polyakov1-2/+4
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-03-11Fix some assembler generating scripts for better unificationRichard Levitte2-3/+3
Some of these scripts would recognise an output parameter if it looks like a file path. That works both in both the classic and new build schemes. Some fo these scripts would only recognise it if it's a basename (i.e. no directory component). Those need to be corrected, as the output parameter in the new build scheme is more likely to contain a directory component than not. Reviewed-by: Andy Polyakov <appro@openssl.org>
2016-03-10Add include directory options for assembler files that include from crypto/Richard Levitte1-0/+2
Closes RT#4406 Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-03-09Make sure the effect of "pic" / "no-pic" is used with assembler compilationsRichard Levitte1-1/+1
Before the 'Introduce the "pic" / "no-pic" config option' commit, the shared_cflag value for the chosen config would be part of the make variable CFLAG, which got replicated into CFLAGS and ASFLAGS. Since said commit, the shared_cflag value has become a make variable of its own, SHARED_CFLAG (which is left empty in a "no-pic" build). However, ASFLAGS was forgotten. That's what's corrected with this change. Reviewed-by: Andy Polyakov <appro@openssl.org>
2016-03-09Unified - adapt the generation of chacha assembler to use GENERATERichard Levitte4-9/+14
This gets rid of the BEGINRAW..ENDRAW sections in crypto/chacha/build.info. This also moves the assembler generating perl scripts to take the output file name as last command line argument, where necessary. Reviewed-by: Andy Polyakov <appro@openssl.org>
2016-03-04chacha/asm/chacha-ppc.pl: fix typo.Andy Polyakov1-1/+1
RT#4365 Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-03-02Consistently use arm_arch.h constants in armcap assembly code.David Benjamin1-1/+1
Most of the assembly uses constants from arm_arch.h, but a few references to ARMV7_NEON don't. Consistently use the macros everywhere. Signed-off-by: Andy Polyakov <appro@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-27chacha/asm/chacha-*.pl: fix typos in tail processing.Andy Polyakov3-18/+18
RT#4323 Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-20Always build library object files with shared library cflagsRichard Levitte1-1/+1
This takes us away from the idea that we know exactly how our static libraries are going to get used. Instead, we make them available to build shareable things with, be it other shared libraries or DSOs. On the other hand, we also have greater control of when the shared library cflags. They will never be used with object files meant got binaries, such as apps/openssl or test/test*. With unified, we take this a bit further and prepare for having to deal with extra cflags specifically to be used with DSOs (dynamic engines), libraries and binaries (applications). Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-18Remove all special make depend flags, as well as OPENSSL_DOING_MAKEDEPENDRichard Levitte1-1/+1
All those flags existed because we had all the dependencies versioned in the repository, and wanted to have it be consistent, no matter what the local configuration was. Now that the dependencies are gone from the versioned Makefile.ins, it makes much more sense to use the exact same flags as when compiling the object files. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-14chacha/asm/chacha*: ensure that zero length is handled (without crash).Andy Polyakov4-0/+16
RT#4305 Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-14chacha/asm/chacha-x86[_64].pl: fix typos and logical errors.Andy Polyakov2-5/+5
Thanks to: David Benjamin of Chromuim. RT#4305 Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-13Pass $(CC) to perlasm scripts via the environmentRichard Levitte1-4/+4
It seems that on some platforms, the perlasm scripts call the C compiler for certain checks. These scripts need the environment variable CC to have the C compiler command. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-13PPC assembly pack: add ChaCha20 and Poly1305 modules.Andy Polyakov3-0/+946
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-02-13C64x+ assembly pack: add ChaCha20 and Poly1305 modules.Andy Polyakov1-0/+916
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-02-13ARM assembly pack: add ChaCha20 and Poly1305 modules.Andy Polyakov3-0/+2273
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-02-10unified build scheme: add a "unified" template for Unix MakefileRichard Levitte1-0/+12
This also adds all the raw sections needed for some files. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-10chacha/asm/chacha-x86.pl: fix nasm compilation.Andy Polyakov1-11/+11
Reviewed-by: Matt Caswell <matt@openssl.org>
2016-02-10x86[_64] assembly pack: add ChaCha20 and Poly1305 modules.Andy Polyakov3-0/+3367
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-09s390x assembly pack: add ChaCha20 and Poly1305 modules.Andy Polyakov2-0/+319
Reviewed-by: Tim Hudson <tjh@openssl.org>