mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 14:22:01 +00:00
Bugzilla Bug 320038: ecl/ecl-curve.h: removed unnecessary leading zero byte
in the base point orders of curves K-233 and K-409. ec.c: pad the private key with leading zeros to the length of the base point order. r=douglas.steblia.
This commit is contained in:
parent
c8ddc69ac5
commit
d1a203a963
@ -397,7 +397,7 @@ EC_NewKey(ECParams *ecParams, ECPrivateKey **privKey)
|
||||
CHECK_MPI_OK( mp_sub(&order_1, &one, &order_1) );
|
||||
CHECK_MPI_OK( mp_mod(&privKeyVal, &order_1, &privKeyVal) );
|
||||
CHECK_MPI_OK( mp_add(&privKeyVal, &one, &privKeyVal) );
|
||||
CHECK_MPI_OK( mp_to_unsigned_octets(&privKeyVal, privKeyBytes, len) );
|
||||
CHECK_MPI_OK( mp_to_fixlen_octets(&privKeyVal, privKeyBytes, len) );
|
||||
/* generate public key */
|
||||
CHECK_SEC_OK( ec_NewKey(ecParams, privKey, privKeyBytes, len) );
|
||||
|
||||
|
@ -117,7 +117,7 @@ static const ECCurveParams ecCurve_NIST_K233 = {
|
||||
"000000000000000000000000000000000000000000000000000000000001",
|
||||
"017232BA853A7E731AF129F22FF4149563A419C26BF50A4C9D6EEFAD6126",
|
||||
"01DB537DECE819B7F70F555A67C427A8CD9BF18AEB9B56E0C11056FAE6A3",
|
||||
"008000000000000000000000000000069D5BB915BCD46EFB1AD5F173ABDF", 4
|
||||
"8000000000000000000000000000069D5BB915BCD46EFB1AD5F173ABDF", 4
|
||||
};
|
||||
static const ECCurveParams ecCurve_NIST_B233 = {
|
||||
"NIST-B233", ECField_GF2m, 233,
|
||||
@ -155,7 +155,7 @@ static const ECCurveParams ecCurve_NIST_K409 = {
|
||||
"00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001",
|
||||
"0060F05F658F49C1AD3AB1890F7184210EFD0987E307C84C27ACCFB8F9F67CC2C460189EB5AAAA62EE222EB1B35540CFE9023746",
|
||||
"01E369050B7C4E42ACBA1DACBF04299C3460782F918EA427E6325165E9EA10E3DA5F6C42E9C55215AA9CA27A5863EC48D8E0286B",
|
||||
"007FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE5F83B2D4EA20400EC4557D5ED3E3E7CA5B4B5C83B8E01E5FCF",
|
||||
"7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE5F83B2D4EA20400EC4557D5ED3E3E7CA5B4B5C83B8E01E5FCF",
|
||||
4
|
||||
};
|
||||
static const ECCurveParams ecCurve_NIST_B409 = {
|
||||
|
Loading…
Reference in New Issue
Block a user