forked from pool/openssl-3
Pedro Monreal Gonzalez
6bc57d937f
* SHA-1 is not allowed anymore in FIPS 186-5 for signature verification operations. After 12/31/2030, NIST will disallow SHA-1 for all of its usages. * Add openssl-3-FIPS-Deny-SHA-1-sigver-in-FIPS-provider.patch - FIPS: RSA keygen PCT requirements. * Skip the rsa_keygen_pairwise_test() PCT in rsa_keygen() as the self-test requirements are covered by do_rsa_pct() for both RSA-OAEP and RSA signatures [bsc#1221760] * Enforce error state if rsa_keygen PCT is run and fails [bsc#1221753] * Add openssl-3-FIPS-PCT_rsa_keygen.patch - FIPS: Check that the fips provider is available before setting it as the default provider in FIPS mode. [bsc#1220523] * Rebase openssl-Force-FIPS.patch - FIPS: Port openssl to use jitterentropy [bsc#1220523] * Set the module in error state if the jitter RNG fails either on initialization or entropy gathering because health tests failed. * Add jitterentropy as a seeding source output also in crypto/info.c * Move the jitter entropy collector and the associated lock out of the header file to avoid redefinitions. * Add the fips_local.cnf symlink to the spec file. This simlink points to the openssl_fips.config file that is provided by the crypto-policies package. * Rebase openssl-3-jitterentropy-3.4.0.patch * Rebase openssl-FIPS-enforce-EMS-support.patch - FIPS: Block non-Approved Elliptic Curves [bsc#1221786] OBS-URL: https://build.opensuse.org/package/show/security:tls/openssl-3?expand=0&rev=110
97 lines
2.1 KiB
Diff
97 lines
2.1 KiB
Diff
From 50f8b936b00dc18ce1f622a7a6aa46daf03da48b Mon Sep 17 00:00:00 2001
|
|
From: Rohan McLure <rohanmclure@linux.ibm.com>
|
|
Date: Wed, 16 Aug 2023 16:52:47 +1000
|
|
Subject: [PATCH] powerpc: ecc: Fix stack allocation secp384r1 asm
|
|
|
|
Assembly acceleration secp384r1 opts to not use any callee-save VSRs, as
|
|
VSX enabled systems make extensive use of renaming, and so writebacks in
|
|
felem_{mul,square}() can be reordered for best cache effects.
|
|
|
|
Remove stack allocations. This in turn fixes unmatched push/pops in
|
|
felem_{mul,square}().
|
|
|
|
Signed-off-by: Rohan McLure <rohan.mclure@linux.ibm.com>
|
|
|
|
Reviewed-by: Tomas Mraz <tomas@openssl.org>
|
|
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
|
|
Reviewed-by: Hugo Landau <hlandau@openssl.org>
|
|
(Merged from https://github.com/openssl/openssl/pull/21749)
|
|
---
|
|
crypto/ec/asm/ecp_nistp384-ppc64.pl | 49 -----------------------------
|
|
1 file changed, 49 deletions(-)
|
|
|
|
diff --git a/crypto/ec/asm/ecp_nistp384-ppc64.pl b/crypto/ec/asm/ecp_nistp384-ppc64.pl
|
|
index 3f86b391af69..28f4168e5218 100755
|
|
--- a/crypto/ec/asm/ecp_nistp384-ppc64.pl
|
|
+++ b/crypto/ec/asm/ecp_nistp384-ppc64.pl
|
|
@@ -62,51 +62,6 @@ ($)
|
|
___
|
|
}
|
|
|
|
-
|
|
-sub push_vrs($$)
|
|
-{
|
|
- my ($min, $max) = @_;
|
|
-
|
|
- my $count = $max - $min + 1;
|
|
-
|
|
- $code.=<<___;
|
|
- mr $savesp,$sp
|
|
- stdu $sp,-16*`$count+1`($sp)
|
|
-
|
|
-___
|
|
- for (my $i = $min; $i <= $max; $i++) {
|
|
- my $mult = $max - $i + 1;
|
|
- $code.=<<___;
|
|
- stxv $i,-16*$mult($savesp)
|
|
-___
|
|
-
|
|
- }
|
|
-
|
|
- $code.=<<___;
|
|
-
|
|
-___
|
|
-}
|
|
-
|
|
-sub pop_vrs($$)
|
|
-{
|
|
- my ($min, $max) = @_;
|
|
-
|
|
- $code.=<<___;
|
|
- ld $savesp,0($sp)
|
|
-___
|
|
- for (my $i = $min; $i <= $max; $i++) {
|
|
- my $mult = $max - $i + 1;
|
|
- $code.=<<___;
|
|
- lxv $i,-16*$mult($savesp)
|
|
-___
|
|
- }
|
|
-
|
|
- $code.=<<___;
|
|
- mr $sp,$savesp
|
|
-
|
|
-___
|
|
-}
|
|
-
|
|
sub load_vrs($$)
|
|
{
|
|
my ($pointer, $reg_list) = @_;
|
|
@@ -162,8 +117,6 @@ ($$)
|
|
|
|
startproc("p384_felem_mul");
|
|
|
|
- push_vrs(52, 63);
|
|
-
|
|
$code.=<<___;
|
|
vspltisw $vzero,0
|
|
|
|
@@ -268,8 +221,6 @@ ($$)
|
|
|
|
startproc("p384_felem_square");
|
|
|
|
- push_vrs(52, 63);
|
|
-
|
|
$code.=<<___;
|
|
vspltisw $vzero,0
|
|
|