Skip to content

Support large hashes with small curves #129

@tomato42

Description

@tomato42

Current code will abort if the order of the curve is significantly smaller than the size of provided hash. I.e. it's not possible to use SHA-512 with NIST256p.

While it's not a recommended configuration, it is well-defined, and actually used in popular protocols (e.g. TLSv1.2).

Add an option to verify() and sign() methods to change if they will accept bigger inputs and appropriately truncate them.

Metadata

Metadata

Assignees

Labels

featurefunctionality to be implemented

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions