summaryrefslogtreecommitdiff
path: root/crypto/ppccap.c
Commit message (Collapse)AuthorAgeFilesLines
* Update copyright yearMatt Caswell2022-05-031-1/+1
| | | | | Reviewed-by: Tomas Mraz <tomas@openssl.org> Release: yes
* chacha20 performance optimizations for ppc64le with 8x lanes,Deepankar Bhattacharjee2022-02-221-0/+9
| | | | | | | | | | | | | | | | | | Performance increase around 50%. Co-authored-by: Madhusudhanan Duraisamy <madurais@in.ibm.com> Co-authored-by: Nilamjyoti Goswami <nilamgoswami@in.ibm.com> Co-authored-by: Siva Sundar Anbareeswaran <srisivasundar@in.ibm.com> Reviewed-by: Danny Tsen <dtsen@us.ibm.com> Tested-by: Danny Tsen <dtsen@us.ibm.com> Signed-off-by: Danny <dtsen@us.ibm.com> Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/16637)
* Add support for BSD-ppc, BSD-ppc64 and BSD-ppc64le configurationspkubaj2021-12-091-4/+8
| | | | | | | | | | | OpenSSL assumes AT_HWCAP = 16 (as on Linux), but on FreeBSD AT_HWCAP = 25 Switch to using AT_HWCAP, and setting it to 16 if it is not defined. CLA: trivial Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/17090)
* fix some code with obvious wrong coding stylex20182021-10-281-1/+1
| | | | | | | Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/16918)
* enable getauxval on android 10yunh2021-06-251-0/+6
| | | | | | | | | | Fixes #9498 Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15870) (cherry picked from commit b2dea4d5f22ec146373324c282fb1bcecd5a7d90)
* ppccap.c: Split out algorithm-specific functionsTomas Mraz2021-06-251-147/+1
| | | | | | | Fixes #13336 Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15828)
* ppc: fix ambiguous if if else statementPauli2021-06-011-1/+2
| | | | | | | Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Shane Lontis <shane.lontis@oracle.com> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15535)
* Use "" for include crypto/xxxRich Salz2021-05-271-1/+1
| | | | | | Reviewed-by: Shane Lontis <shane.lontis@oracle.com> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15468)
* Use "" for include internal/xxxRich Salz2021-05-271-1/+1
| | | | | | Reviewed-by: Shane Lontis <shane.lontis@oracle.com> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15468)
* bn: Add fixed length (n=6), unrolled PPC Montgomery MultiplicationMartin Schwenke2021-05-081-0/+12
| | | | | | | | | | | | | | | | | | | | Overall improvement for p384 of ~18% on Power 9, compared to existing Power assembling code. See comment in code for more details. Multiple unrolled versions could be generated for values other than 6. However, for TLS 1.3 the only other ECC algorithms that might use Montgomery Multiplication are p256 and p521, but these have custom algorithms that don't use Montgomery Multiplication. Non-ECC algorithms are likely to use larger key lengths that won't fit into the n <= 10 length limitation of this code. Signed-off-by: Amitay Isaacs <amitay@ozlabs.org> Signed-off-by: Alastair D'Silva <alastair@d-silva.org> Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15175)
* crypto/ppccap.c: Remove useless TODO 3.0Tomas Mraz2021-03-041-4/+0
| | | | | | | | The chacha and poly1305 algorithms are not FIPS approved so they should stay out of FIPS module. Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/14404)
* Update copyright yearRichard Levitte2021-01-281-1/+1
| | | | | Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/13999)
* OPENSSL_cpuid_setup FreeBSD PowerPC updateDavid Carlier2021-01-141-0/+18
| | | | | | Reviewed-by: Ben Kaduk <kaduk@mit.edu> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/13821)
* Update copyright yearMatt Caswell2020-05-151-1/+1
| | | | | Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/11839)
* Rename FIPS_MODE to FIPS_MODULERichard Levitte2020-04-281-2/+2
| | | | | | | | | | This macro is used to determine if certain pieces of code should become part of the FIPS module or not. The old name was confusing. Fixes #11538 Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org> (Merged from https://github.com/openssl/openssl/pull/11539)
* Reorganize local header filesDr. Matthias St. Pierre2019-09-281-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-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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)
* Make the EC code available from inside the FIPS providerMatt Caswell2019-08-061-3/+3
| | | | | Reviewed-by: Nicola Tuveri <nic.tuv@gmail.com> (Merged from https://github.com/openssl/openssl/pull/9380)
* crypto/ppccap.c: Fix FIPS build on PPCRichard Levitte2019-06-171-5/+5
| | | | | | | | | Some code was temporarly disabled in the FIPS module because SHA other SHA1 hadn't been ported. Now that they have, we must enable this code again. Reviewed-by: Paul Dale <paul.dale@oracle.com> (Merged from https://github.com/openssl/openssl/pull/9168)
* Ensure code is compiled with correct BIGNUM assembler definesMatt Caswell2019-06-121-8/+8
| | | | | | Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Shane Lontis <shane.lontis@oracle.com> (Merged from https://github.com/openssl/openssl/pull/9130)
* Ensure we get all the right defines for AES assembler in FIPS moduleMatt Caswell2019-06-031-8/+14
| | | | | | | | | There are various C macro definitions that are passed via the compiler to enable AES assembler optimisation. We need to make sure that these defines are also passed during compilation of the FIPS module. Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9038)
* crypto/ppccap.c: Fix which hwcap value used to check for HWCAP_ARCH_3_00Rashmica Gupta2019-05-091-2/+3
| | | | | | | | CLA: trivial Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Paul Dale <paul.dale@oracle.com> (Merged from https://github.com/openssl/openssl/pull/8889)
* poly1305/asm/poly1305-ppc.pl: add vector base 2^26 implementation.Andy Polyakov2019-02-011-1/+10
| | | | | | Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/8120)
* PPC: Try out if mftb works before using itBernd Edlinger2019-01-211-4/+51
| | | | | | | | | | | | | If this fails try out if mfspr268 works. Use OPENSSL_ppccap=0x20 for enabling mftb, OPENSSL_ppccap=0x40 for enabling mfspr268, and OPENSSL_ppccap=0 for enabling neither. Fixes #8012 Reviewed-by: Paul Dale <paul.dale@oracle.com> (Merged from https://github.com/openssl/openssl/pull/8043)
* crypto/armcap.c, crypto/ppccap.c: stricter use of getauxval()Richard Levitte2019-01-161-11/+8
| | | | | | | | | | | | Having a weak getauxval() and only depending on GNU C without looking at the library we build against meant that it got picked up where not really expected. So we change this to check for the glibc version, and since we know it exists from that version, there's no real need to make it weak. Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de> (Merged from https://github.com/openssl/openssl/pull/8028)
* Following the license change, modify the boilerplates in crypto/Richard Levitte2018-12-061-1/+1
| | | | | | | [skip ci] Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/7827)
* crypto/ppccap.c: wire new ChaCha20_ctr32_vsx.Andy Polyakov2018-06-061-3/+8
| | | | | Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/6419)
* Update copyright yearMatt Caswell2018-05-291-1/+1
| | | | | Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/6371)
* Fix --strict-warnings build of ppc-linux targetBernd Edlinger2018-05-081-4/+10
| | | | | Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/6191)
* crypto/ppccap.c: SIGILL-free processor capabilities detection on MacOS X.Andy Polyakov2017-04-021-0/+26
| | | | | | | | | | It seems to be problematic to probe processor capabilities with SIGILL on MacOS X. The problem should be limited to cases when application code is debugged, but crashes were reported even during normal execution... Reviewed-by: Kurt Roeckx <kurt@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org>
* Revert "Move algorithm specific ppccap code from crypto/ppccap.c"Richard Levitte2016-11-101-0/+111
| | | | | | | | | 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>
* Move algorithm specific ppccap code from crypto/ppccap.cRichard Levitte2016-11-091-111/+0
| | | | | | | 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)
* ppccap.c: engage new multipplication and squaring subroutines.Andy Polyakov2016-10-241-29/+15
| | | | | | [And remove FPU mutiplication subroutine.] Reviewed-by: Rich Salz <rsalz@openssl.org>
* Add ecp_nistz256-ppc64 module.Andy Polyakov2016-08-291-0/+24
| | | | Reviewed-by: Rich Salz <rsalz@openssl.org>
* Fix some style issues...FdaSilvaYY2016-08-021-2/+2
| | | | | | | extra spacing and 80 cols Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1366)
* Copyright consolidation 09/10Rich Salz2016-05-171-0/+9
| | | | Reviewed-by: Richard Levitte <levitte@openssl.org>
* fix tab-space mixed indentationFdaSilvaYY2016-05-091-1/+1
| | | | | | | No code change Reviewed-by: Kurt Roeckx <kurt@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org>
* crypto/ppccap.c: fix missing declaration warning.Andy Polyakov2016-04-291-0/+1
| | | | Reviewed-by: Richard Levitte <levitte@openssl.org>
* crypto/ppccap.c: permit build with no-chacha and no-poly1305.Andy Polyakov2016-04-291-0/+4
| | | | | | RT#4508 Reviewed-by: Richard Levitte <levitte@openssl.org>
* PPC assebmly pack: initial POWER9 support tidbits.Andy Polyakov2016-04-131-0/+13
| | | | Reviewed-by: Richard Levitte <levitte@openssl.org>
* Configurations: engage PPC ChaCha20 and Poly1305 modules.Andy Polyakov2016-02-131-0/+39
| | | | Reviewed-by: Richard Levitte <levitte@openssl.org>
* crypto/ppccap.c: add SIGILL-free processor capability detection code.Andy Polyakov2015-12-141-21/+113
| | | | Reviewed-by: Kurt Roeckx <kurt@openssl.org>
* RT3990: Fix #include path.Anton Blanchard2015-08-051-1/+1
| | | | | Signed-off-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Tim Hudson <tjh@openssl.org>
* Run util/openssl-format-source -v -c .Matt Caswell2015-01-221-114/+117
| | | | Reviewed-by: Tim Hudson <tjh@openssl.org>
* Engage GHASH for PowerISA 2.0.7.Andy Polyakov2014-07-201-3/+1
| | | | | | | [and split ppccap.c to ppccap.c and ppc_arch.h] Reviewed-by: Kurt Roeckx <kurt@openssl.org> Reviewed-by: Tim Hudson <tjh@openssl.org>
* Engage SHA256/512 for PowerISA 2.07.Andy Polyakov2014-07-011-0/+16
|
* Engage POWER8 AES support.Andy Polyakov2014-06-011-0/+7
|
* ppc64-mont.pl: eliminate dependency on GPRs' upper halves.Andy Polyakov2013-11-271-1/+1
|
* Take vpaes-ppc module into loop.Andy Polyakov2013-11-271-1/+1
|
* ppccap.c: fix typo.Andy Polyakov2012-11-101-1/+1
|