mirror of https://github.com/acidanthera/audk.git
CryptoPkg: Support BrainpoolP512r1 algorithm
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4830 Allow BrainpoolP512r1 to be leveraged when the corresponding curve ID is passed to crypto libraries in EDK2 Signed-off-by: Michael G.A. Holland <michael.holland@intel.com>
This commit is contained in:
parent
41a51d1735
commit
9cd66aca1a
|
@ -23,9 +23,10 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
|
|||
#define CRYPTO_NID_SHA512 0x0003
|
||||
|
||||
// Key Exchange
|
||||
#define CRYPTO_NID_SECP256R1 0x0204
|
||||
#define CRYPTO_NID_SECP384R1 0x0205
|
||||
#define CRYPTO_NID_SECP521R1 0x0206
|
||||
#define CRYPTO_NID_SECP256R1 0x0204
|
||||
#define CRYPTO_NID_SECP384R1 0x0205
|
||||
#define CRYPTO_NID_SECP521R1 0x0206
|
||||
#define CRYPTO_NID_BRAINPOOLP512R1 0x03A5
|
||||
|
||||
///
|
||||
/// MD5 digest size in bytes
|
||||
|
|
|
@ -42,6 +42,9 @@ CryptoNidToOpensslNid (
|
|||
case CRYPTO_NID_SECP521R1:
|
||||
Nid = NID_secp521r1;
|
||||
break;
|
||||
case CRYPTO_NID_BRAINPOOLP512R1:
|
||||
Nid = NID_brainpoolP512r1;
|
||||
break;
|
||||
default:
|
||||
return -1;
|
||||
}
|
||||
|
@ -833,6 +836,9 @@ EcDsaSign (
|
|||
case NID_secp521r1:
|
||||
HalfSize = 66;
|
||||
break;
|
||||
case NID_brainpoolP512r1:
|
||||
HalfSize = 64;
|
||||
break;
|
||||
default:
|
||||
return FALSE;
|
||||
}
|
||||
|
@ -961,6 +967,9 @@ EcDsaVerify (
|
|||
case NID_secp521r1:
|
||||
HalfSize = 66;
|
||||
break;
|
||||
case NID_brainpoolP512r1:
|
||||
HalfSize = 64;
|
||||
break;
|
||||
default:
|
||||
return FALSE;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue