Skip to content

Commit bd0d829

Browse files
committed
Add comment
1 parent 1ca0c1e commit bd0d829

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/signer.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,9 @@ impl Signer for KMSSigner {
201201

202202
let mut signature = Signature::from_der(kms_signature.as_ref())
203203
.map_err(|e| anyhow::anyhow!("Failed to decode signature from KMS: {}", e))?;
204+
// NOTE: AWS KMS does not guarantee that the ECDSA signature is normalized.
205+
// Therefore, we must normalize it ourselves to prevent malleability,
206+
// so that it can be successfully verified later using the secp256k1 standard libraries.
204207
signature.normalize_s();
205208
let signature_bytes = signature.serialize_compact();
206209

0 commit comments

Comments
 (0)