48 Commits (fd3ed85c67174a0d3b6639ba9b237351d1c2201f)

Author SHA1 Message Date
Matt Caswell 454afd9866 Update copyright year
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/11839)
3 years ago
Richard Levitte f844f9eb44 Rename FIPS_MODE to FIPS_MODULE
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)
3 years ago
Dr. Matthias St. Pierre 706457b7bd Reorganize local header files
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)
4 years ago
Dr. Matthias St. Pierre 25f2138b0a Reorganize private crypto header files
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)
4 years ago
Matt Caswell a9612d6c03 Make the EC code available from inside the FIPS provider
Reviewed-by: Nicola Tuveri <nic.tuv@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/9380)
4 years ago
Richard Levitte 55a9ca5cc5 crypto/ppccap.c: Fix FIPS build on PPC
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)
4 years ago
Matt Caswell a8140a42f5 Ensure code is compiled with correct BIGNUM assembler defines
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/9130)
4 years ago
Matt Caswell 41525ed628 Ensure we get all the right defines for AES assembler in FIPS module
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)
4 years ago
Rashmica Gupta 99592c73e7 crypto/ppccap.c: Fix which hwcap value used to check for HWCAP_ARCH_3_00
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)
4 years ago
Andy Polyakov a28e4890ee poly1305/asm/poly1305-ppc.pl: add vector base 2^26 implementation.
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/8120)
4 years ago
Bernd Edlinger c8f370485c PPC: Try out if mftb works before using it
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)
4 years ago
Richard Levitte 5f40dd158c crypto/armcap.c, crypto/ppccap.c: stricter use of getauxval()
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)
4 years ago
Richard Levitte 0e9725bcb9 Following the license change, modify the boilerplates in crypto/
[skip ci]

Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/7827)
5 years ago
Andy Polyakov 316d527ff9 crypto/ppccap.c: wire new ChaCha20_ctr32_vsx.
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/6419)
5 years ago
Matt Caswell 83cf7abf8e Update copyright year
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/6371)
5 years ago
Bernd Edlinger 8c8fbca92d Fix --strict-warnings build of ppc-linux target
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/6191)
5 years ago
Andy Polyakov 0bd93bbe4a crypto/ppccap.c: SIGILL-free processor capabilities detection on MacOS X.
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>
6 years ago
Richard Levitte 10b0b5ecd9 Revert "Move algorithm specific ppccap code from crypto/ppccap.c"
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 e3fb4d3d52.

Reviewed-by: Rich Salz <rsalz@openssl.org>
7 years ago
Richard Levitte e3fb4d3d52 Move algorithm specific ppccap code from crypto/ppccap.c
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)
7 years ago
Andy Polyakov 80d27cdb84 ppccap.c: engage new multipplication and squaring subroutines.
[And remove FPU mutiplication subroutine.]

Reviewed-by: Rich Salz <rsalz@openssl.org>
7 years ago
Andy Polyakov d8f432aa97 Add ecp_nistz256-ppc64 module.
Reviewed-by: Rich Salz <rsalz@openssl.org>
7 years ago
FdaSilvaYY 700b814549 Fix some style issues...
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)
7 years ago
Rich Salz b1322259d9 Copyright consolidation 09/10
Reviewed-by: Richard Levitte <levitte@openssl.org>
7 years ago
FdaSilvaYY dccd20d1b5 fix tab-space mixed indentation
No code change

Reviewed-by: Kurt Roeckx <kurt@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
7 years ago
Andy Polyakov 53385e1fee crypto/ppccap.c: fix missing declaration warning.
Reviewed-by: Richard Levitte <levitte@openssl.org>
7 years ago
Andy Polyakov fa79c543d2 crypto/ppccap.c: permit build with no-chacha and no-poly1305.
RT#4508

Reviewed-by: Richard Levitte <levitte@openssl.org>
7 years ago
Andy Polyakov e0e532823f PPC assebmly pack: initial POWER9 support tidbits.
Reviewed-by: Richard Levitte <levitte@openssl.org>
7 years ago
Andy Polyakov b3214008e4 Configurations: engage PPC ChaCha20 and Poly1305 modules.
Reviewed-by: Richard Levitte <levitte@openssl.org>
7 years ago
Andy Polyakov 2688d99989 crypto/ppccap.c: add SIGILL-free processor capability detection code.
Reviewed-by: Kurt Roeckx <kurt@openssl.org>
8 years ago
Anton Blanchard 1125245997 RT3990: Fix #include path.
Signed-off-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Tim Hudson <tjh@openssl.org>
8 years ago
Matt Caswell 0f113f3ee4 Run util/openssl-format-source -v -c .
Reviewed-by: Tim Hudson <tjh@openssl.org>
8 years ago
Andy Polyakov 0e716d9207 Engage GHASH for PowerISA 2.0.7.
[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>
9 years ago
Andy Polyakov cd1922cde0 Engage SHA256/512 for PowerISA 2.07. 9 years ago
Andy Polyakov de51e830a6 Engage POWER8 AES support. 9 years ago
Andy Polyakov b9e87d07cb ppc64-mont.pl: eliminate dependency on GPRs' upper halves. 10 years ago
Andy Polyakov 07f3e4f3f9 Take vpaes-ppc module into loop. 10 years ago
Andy Polyakov f717abd7c1 ppccap.c: fix typo. 11 years ago
Andy Polyakov d5630dd60e ppccap.c: restrict features on AIX 5. 11 years ago
Andy Polyakov 78c3e20579 linux-pcc: make it more robust and recognize KERNEL_BITS variable. 11 years ago
Andy Polyakov fd05495748 ppccap.c: assume no features under 32-bit AIX kernel.
PR: 2810
11 years ago
Andy Polyakov 2e75ed332f ppccap.c: addenum to recent EC optimizations. 12 years ago
Dr. Stephen Henson 9f7b2c76b1 Include crypto.h in ppccap.c 12 years ago
Andy Polyakov 6415dd7b2f crypto/ppc[cpuid|cap]: call CPU detection once and detect AltiVec. 13 years ago
Andy Polyakov 80dfadfdf3 ppccap.c: portability fix. 13 years ago
Andy Polyakov 78a533cb93 Minor updates to ppccap.c and ppccpuid.pl. 14 years ago
Andy Polyakov 70b76d392f ppccap.c: fix compiler warning and perform sanity check outside signal masking.
ppc64-mont.pl: clarify comment and fix spelling.
14 years ago
Andy Polyakov d741cf2267 ppccap.c: tidy up.
ppc64-mont.pl: missing predicate in commentary.
14 years ago
Andy Polyakov b4b48a107c ppc64-mont.pl: adapt for 32-bit and engage for all builds. 14 years ago