mirror of
https://github.com/rustfs/rustfs.git
synced 2026-09-06 20:19:14 +00:00
chore(deps): bump p256 from 0.13.2 to 0.14.0 in the dependencies group (#6481)
* chore(deps): bump p256 from 0.13.2 to 0.14.0 in the dependencies group Bumps the dependencies group with 1 update: [p256](https://github.com/RustCrypto/elliptic-curves). Updates `p256` from 0.13.2 to 0.14.0 - [Commits](https://github.com/RustCrypto/elliptic-curves/compare/p256/v0.13.2...p256/v0.14.0) --- updated-dependencies: - dependency-name: p256 dependency-version: 0.14.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: dependencies ... Signed-off-by: dependabot[bot] <support@github.com> * update crate version and remove rustfs-mimalloc-sys crate * fix(connect): adapt p256 signing APIs Use the p256 0.14 Generate trait for device key generation and update low-S normalization calls for ecdsa 0.17. Remove an unused object usecase import so warning-deny builds stay clean. Co-Authored-By: heihutu <heihutu@gmail.com> * fix(connect): update p256 canonical signature checks Co-Authored-By: heihutu <heihutu@gmail.com> --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: houseme <housemecn@gmail.com> Co-authored-by: heihutu <heihutu@gmail.com>
This commit is contained in:
@@ -137,8 +137,9 @@ fn published_proofs_verify_over_locally_rebuilt_transcripts() {
|
||||
.decode(request["proof"]["value"].as_str().expect("vector carries a proof"))
|
||||
.expect("proof decodes");
|
||||
let signature = p256::ecdsa::Signature::from_slice(&raw).expect("signature parses");
|
||||
assert!(
|
||||
signature.normalize_s().is_none(),
|
||||
assert_eq!(
|
||||
signature.normalize_s(),
|
||||
signature,
|
||||
"vector '{name}' publishes a proof that is already low-S"
|
||||
);
|
||||
|
||||
@@ -305,8 +306,9 @@ fn proof_is_a_canonical_low_s_signature_that_verifies() {
|
||||
assert_eq!(raw.len(), 64, "the signature is a fixed-width r || s");
|
||||
|
||||
let signature = p256::ecdsa::Signature::from_slice(&raw).expect("signature parses");
|
||||
assert!(
|
||||
signature.normalize_s().is_none(),
|
||||
assert_eq!(
|
||||
signature.normalize_s(),
|
||||
signature,
|
||||
"s must already be in the lower half of the group order"
|
||||
);
|
||||
|
||||
|
||||
@@ -607,7 +607,7 @@ fn malleated_high_s_signature_is_refused_although_it_verifies_mathematically() {
|
||||
// Step one: the malleated pair really does verify under the signing key, so
|
||||
// a verifier cannot be excused for accepting it on mathematical grounds.
|
||||
let signature = p256::ecdsa::Signature::from_slice(&raw).expect("the malleated signature parses");
|
||||
assert!(signature.normalize_s().is_some(), "the malleated signature must be the high-S form");
|
||||
assert_ne!(signature.normalize_s(), signature, "the malleated signature must be the high-S form");
|
||||
let key = verifying_key(field(&published_key("signing"), "publicKey"));
|
||||
let input = signing_input(&domain_tag("enrollmentChallenge"), &signed_octets(&vector["document"]));
|
||||
key.verify(&input, &signature)
|
||||
@@ -713,8 +713,9 @@ fn assert_response_proves_possession(built_envelope: &Value, label: &str) {
|
||||
let bytes = BASE64_URL_NO_PAD.decode(value).expect("signature is base64url");
|
||||
assert_eq!(bytes.len(), 64, "{label}: the signature is a fixed-width r || s");
|
||||
let signature = p256::ecdsa::Signature::from_slice(&bytes).expect("signature parses");
|
||||
assert!(
|
||||
signature.normalize_s().is_none(),
|
||||
assert_eq!(
|
||||
signature.normalize_s(),
|
||||
signature,
|
||||
"{label}: this side must never emit the malleated high-S form it refuses to accept"
|
||||
);
|
||||
|
||||
|
||||
@@ -277,7 +277,7 @@ fn verify_rotation_request(request: &Value, current_public_key: &[u8], fingerpri
|
||||
assert_eq!(encoded.len(), 86);
|
||||
let raw = BASE64_URL_NO_PAD.decode(encoded).expect("proof base64url");
|
||||
let signature = Signature::from_slice(&raw).expect("fixed-width signature");
|
||||
assert!(signature.normalize_s().is_none(), "rotation proof must be low-S");
|
||||
assert_eq!(signature.normalize_s(), signature, "rotation proof must be low-S");
|
||||
let verifying = VerifyingKey::from_public_key_der(current_public_key).expect("current public key");
|
||||
verifying.verify(&transcript, &signature).expect("rotation proof verifies");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user