aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/sha
Commit message (Collapse)AuthorAgeFilesLines
* Reorganize local header filesDr. Matthias St. Pierre2019-09-282-1/+1
| | | | | | | | | | | | | Apart from public and internal header files, there is a third type called local header files, which are located next to source files in the source directory. Currently, they have different suffixes like '*_lcl.h', '*_local.h', or '*_int.h' This commit changes the different suffixes to '*_local.h' uniformly. Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9333)
* Reorganize private crypto header filesDr. Matthias St. Pierre2019-09-284-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, there are two different directories which contain internal header files of libcrypto which are meant to be shared internally: While header files in 'include/internal' are intended to be shared between libcrypto and libssl, the files in 'crypto/include/internal' are intended to be shared inside libcrypto only. To make things complicated, the include search path is set up in such a way that the directive #include "internal/file.h" could refer to a file in either of these two directoroes. This makes it necessary in some cases to add a '_int.h' suffix to some files to resolve this ambiguity: #include "internal/file.h" # located in 'include/internal' #include "internal/file_int.h" # located in 'crypto/include/internal' This commit moves the private crypto headers from 'crypto/include/internal' to 'include/crypto' As a result, the include directives become unambiguous #include "internal/file.h" # located in 'include/internal' #include "crypto/file.h" # located in 'include/crypto' hence the superfluous '_int.h' suffixes can be stripped. The files 'store_int.h' and 'store.h' need to be treated specially; they are joined into a single file. Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9333)
* Unify all assembler file generatorsRichard Levitte2019-09-1641-115/+171
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | They now generally conform to the following argument sequence: script.pl "$(PERLASM_SCHEME)" [ C preprocessor arguments ... ] \ $(PROCESSOR) <output file> However, in the spirit of being able to use these scripts manually, they also allow for no argument, or for only the flavour, or for only the output file. This is done by only using the last argument as output file if it's a file (it has an extension), and only using the first argument as flavour if it isn't a file (it doesn't have an extension). While we're at it, we make all $xlate calls the same, i.e. the $output argument is always quoted, and we always die on error when trying to start $xlate. There's a perl lesson in this, regarding operator priority... This will always succeed, even when it fails: open FOO, "something" || die "ERR: $!"; The reason is that '||' has higher priority than list operators (a function is essentially a list operator and gobbles up everything following it that isn't lower priority), and since a non-empty string is always true, so that ends up being exactly the same as: open FOO, "something"; This, however, will fail if "something" can't be opened: open FOO, "something" or die "ERR: $!"; The reason is that 'or' has lower priority that list operators, i.e. it's performed after the 'open' call. Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9884)
* build.info: For all assembler generators, remove all argumentsRichard Levitte2019-09-161-54/+51
| | | | | | | | Since the arguments are now generated in the build file templates, they should be removed from the build.info files. Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9884)
* Directly return from final sha3/keccak_final if no bytes are requestedPatrick Steuer2019-08-181-0/+3
| | | | | | | | | | Requesting zero bytes from shake previously led to out-of-bounds write on some platforms. Signed-off-by: Patrick Steuer <patrick.steuer@de.ibm.com> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9433)
* Fix syntax error for the armv4 assemblerOmid Najafi2019-08-151-111/+111
| | | | | | | | | | | | | | The error was from the alignment syntax of the code. More details: https://stackoverflow.com/questions/57316823/arm-assembly-syntax-in-vst-vld-commands?noredirect=1#comment101133590_57316823 CLA: trivial Fixes: #9518 Reviewed-by: Paul Dale <paul.dale@oracle.com> Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de> (Merged from https://github.com/openssl/openssl/pull/9518)
* Fix build error for aarch64 big endian.Lei Maohui2019-07-081-2/+2
| | | | | | | | | | | | | | | | Modified rev to rev64, because rev only takes integer registers. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90827 Otherwise, the following error will occur. Error: operand 1 must be an integer register -- `rev v31.16b,v31.16b' CLA: trivial Signed-off-by: Lei Maohui <leimaohui@cn.fujitsu.com> Reviewed-by: Shane Lontis <shane.lontis@oracle.com> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9151)
* Fix TyposAntoine Cœur2019-07-021-1/+1
| | | | | | | | CLA: trivial Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com> (Merged from https://github.com/openssl/openssl/pull/9288)
* Move keccak1600_asm_src file information to build.info filesRichard Levitte2019-06-171-4/+23
| | | | | Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9166)
* Move sha1_asm_src file information to build.info filesRichard Levitte2019-06-171-2/+57
| | | | | Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9166)
* Use variables in build.info files where it's worth the whileRichard Levitte2019-06-151-5/+4
| | | | | Reviewed-by: Shane Lontis <shane.lontis@oracle.com> (Merged from https://github.com/openssl/openssl/pull/9144)
* Move digests to providersShane Lontis2019-06-044-6/+170
| | | | | | | | | | | Move digest code into the relevant providers (fips, default, legacy). The headers are temporarily moved to be internal, and will be moved into providers after all external references are resolved. The deprecated digest code can not be removed until EVP_PKEY (signing) is supported by providers. EVP_MD data can also not yet be cleaned up for the same reasons. Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/8763)
* ARM64 assembly pack: add ThunderX2 results.Andy Polyakov2019-04-173-0/+3
| | | | | | Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/8776)
* Create a FIPS provider and put SHA256 in itMatt Caswell2019-04-041-0/+2
| | | | | Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/8537)
* fix truncation of integers on 32bit AIXShane Lontis2019-03-111-24/+24
| | | | | | Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/8417)
* sha/asm/keccak1600-ppc64.pl: up 10% performance improvement.Andy Polyakov2019-03-111-20/+20
| | | | | | Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/8444)
* sha/keccak1600.c: subscribe more platforms for "complementing" optimization.Andy Polyakov2019-02-191-1/+8
| | | | | | | | E.g. on MIPS64 it gives >20% improvement... Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/8261)
* ARM64 assembly pack: make it Windows-friendly.Andy Polyakov2019-02-162-38/+15
| | | | | | | | | | | "Windows friendliness" means a) unified PIC-ification, unified across all platforms; b) unified commantary delimiter; c) explicit ldur/stur, as Visual Studio assembler can't automatically encode ldr/str as ldur/stur when needed. Reviewed-by: Paul Dale <paul.dale@oracle.com> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/8256)
* ARM assembly pack: make it Windows-friendly.Andy Polyakov2019-02-164-19/+73
| | | | | | | | | | | | | | | "Windows friendliness" means a) flipping .thumb and .text directives, b) always generate Thumb-2 code when asked(*); c) Windows-specific references to external OPENSSL_armcap_P. (*) so far *some* modules were compiled as .code 32 even if Thumb-2 was targeted. It works at hardware level because processor can alternate between the modes with no overhead. But clang --target=arm-windows's builtin assembler just refuses to compile .code 32... Reviewed-by: Paul Dale <paul.dale@oracle.com> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/8252)
* AArch64 assembly pack: authenticate return addresses.Andy Polyakov2019-02-122-0/+16
| | | | | | | | | | | | ARMv8.3 adds pointer authentication extension, which in this case allows to ensure that, when offloaded to stack, return address is same at return as at entry to the subroutine. The new instructions are nops on processors that don't implement the extension, so that the vetification is backward compatible. Reviewed-by: Kurt Roeckx <kurt@roeckx.be> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/8205)
* Build: Remove BEGINRAW / ENDRAW / OVERRIDERichard Levitte2019-01-311-10/+12
| | | | | | | | | | It was an ugly hack to avoid certain problems that are no more. Also added GENERATE lines for perlasm scripts that didn't have that explicitly. Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/8125)
* Following the license change, modify the boilerplates in crypto/sha/Richard Levitte2018-12-0648-48/+48
| | | | | | | [skip ci] Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/7816)
* License: change any non-boilerplate comment referring to "OpenSSL license"Richard Levitte2018-12-061-1/+1
| | | | | | | | Make it just say "the License", which refers back to the standard boilerplate. Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/7764)
* sha/asm/sha512p8-ppc.pl: optimize epilogue.Andy Polyakov2018-11-161-16/+9
| | | | | | Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/7643)
* sha/asm/sha512p8-ppc.pl: fix typo in prologue.Andy Polyakov2018-11-161-2/+2
| | | | | | Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/7643)
* sha/asm/keccak1600-armv8.pl: halve the size of hw-assisted subroutine.Andy Polyakov2018-10-191-77/+69
| | | | | | | | | | | Yes, it's second halving, i.e. it's now 1/4 of original size, or more specifically inner loop. The challenge with Keccak is that you need more temporary registers than there are available. By reversing the order in which columns are assigned in Chi, it's possible to use three of A[][] registers as temporary prior their assigment. Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/7294)
* sha/asm/keccak1600-s390x.pl: resolve -march=z900 portability issue.Andy Polyakov2018-10-121-2/+2
| | | | | | | | | | | Negative displacement in memory references was not originally specified, so that for maximum coverage one should abstain from it, just like with any other extension. [Unless it's guarded by run-time switch, but there is no switch in keccak1600-s390x.] Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/7239)
* Update copyright yearMatt Caswell2018-09-115-5/+5
| | | | | Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/7176)
* Remove development artifacts.Pauli2018-07-022-2/+0
| | | | | | | | | | The issue was discovered on the x86/64 when attempting to include libcrypto inside another shared library. A relocation of type R_X86_64_PC32 was generated which causes a linker error. Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Andy Polyakov <appro@openssl.org> (Merged from https://github.com/openssl/openssl/pull/6595)
* PA-RISC assembly pack: make it work with GNU assembler for HP-UX.Andy Polyakov2018-06-252-7/+26
| | | | | Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/6583)
* sha/asm/sha{256|512}-armv4.pl: harmonize thumb2 support with the rest.Andy Polyakov2018-06-222-3/+3
| | | | Reviewed-by: Richard Levitte <levitte@openssl.org>
* Update copyright yearMatt Caswell2018-06-202-2/+2
| | | | | Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/6538)
* sha/asm/sha{1|256}-586.pl: harmonize clang version detection.Andy Polyakov2018-06-182-2/+2
| | | | | Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/6499)
* sha/asm/sha512p8-ppc.pl: fix build on Mac OS X.Andy Polyakov2018-06-061-2/+1
| | | | | Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/6419)
* sha/asm/sha512p8-ppc.pl: improve POWER9 performance by ~10%.Andy Polyakov2018-06-031-67/+55
| | | | | | | | | | | Biggest part, ~7%, of improvement resulted from omitting constants' table index increment in each round. And minor part from rescheduling instructions. Apparently POWER9 (and POWER8) manage to dispatch instructions more efficiently if they are laid down as if they have no latency... Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/6406)
* PPC assembly pack: correct POWER9 results.Andy Polyakov2018-06-033-4/+4
| | | | | | | | | | As it turns out originally published results were skewed by "turbo" mode. VM apparently remains oblivious to dynamic frequency scaling, and reports that processor operates at "base" frequency at all times. While actual frequency gets increased under load. Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/6406)
* Update copyright yearMatt Caswell2018-05-293-3/+3
| | | | | Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/6371)
* PPC assembly pack: add POWER9 results.Andy Polyakov2018-05-103-4/+5
| | | | Reviewed-by: Rich Salz <rsalz@openssl.org>
* Update copyright yearMatt Caswell2018-05-011-1/+1
| | | | | Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/6145)
* 00-base-templates.conf: wire keccak1600-armv4 module.Andy Polyakov2018-04-231-0/+2
| | | | | Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/6042)
* sha/asm/keccak1600-armv4.pl: adapt for multi-platform.Andy Polyakov2018-04-231-3/+20
| | | | | Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/6042)
* 00-base-templates.conf: wire keccak1600-ppc64 module.Andy Polyakov2018-04-231-0/+1
| | | | | Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/6042)
* 00-base-templates.conf: wire keccak1600-s390x module.Andy Polyakov2018-04-231-0/+1
| | | | | Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/6042)
* 00-base-templates.conf: wire keccak1600-armv8 module.Andy Polyakov2018-04-231-0/+1
| | | | | Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/6042)
* 00-base-templates.conf: wire keccak1600-x86_64 module.Andy Polyakov2018-04-231-0/+1
| | | | | Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/6042)
* sha/asm/keccak1600-x86_64.pl: make it work on Windows.Andy Polyakov2018-04-231-4/+4
| | | | | Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/6042)
* Configure: add $target{keccak1600_asm_src}.Andy Polyakov2018-04-231-1/+1
| | | | | Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/6042)
* sha/asm/keccak1600-armv8.pl: halve the size of hw-assisted subroutine.Andy Polyakov2018-04-231-18/+18
| | | | | Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org>
* Update copyright yearMatt Caswell2018-03-207-7/+7
| | | | | Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5689)
* MIPS assembly pack: default heuristic detection to little-endian.Andy Polyakov2018-03-192-2/+2
| | | | | | | | | Current endianness detection is somewhat opportunistic and can fail in cross-compile scenario. Since we are more likely to cross-compile for little-endian now, adjust the default accordingly. Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5613)