Skip to content

ECDSA/secp256r1 transaction malleability #9723

Closed
@tarcieri

Description

@tarcieri

This is in regard to the newly proposed support for ECDSA/secp256r1 (NIST P-256) account keys. See #7718 and #8899.

An important detail to capture with these signatures is malleability. For comparison, ECDSA/secp256k1 signatures are almost always low-S normalized in order to make them non-malleable. However, P-256 signatures are not typically used in consensus-critical applications and therefore are not normalized.

Normalization is a relatively simple procedure: if an ECDSA/secp256r1 signature is 64-bytes structured as r || s, if s is greater than half of the field modulus (i.e. curve order), subtract s from the modulus. It can be retroactively applied to signatures generated from HSMs and other hardware devices.

Primarily this impacts the verification rules: signatures which are not low-S normalized MUST be rejected. Doing so will prevent malleability-related issues with ECDSA/secp256r1 signatures the same way the similar procedure prevents them with ECDSA/secp256k1 signatures.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions