Skip to main content

ECDSA256

Overview​

License: MIT​

library ECDSA256

Cryptography module

This library provides functionality for ECDSA verification over any 256-bit curve.

For more information, please refer to the OpenZeppelin documentation.

Errors info​

LengthIsNot64​

error LengthIsNot64()

Functions info​

verify​

function verify(
EC256.Curve memory ec,
bytes32 hashedMessage_,
bytes memory signature_,
bytes memory pubKey_
) internal view returns (bool)

The function to verify the ECDSA signature

Parameters:

NameTypeDescription
ecstruct EC256.Curvethe 256-bit curve parameters.
hashedMessage_bytes32the already hashed message to be verified.
signature_bytesthe ECDSA signature. Equals to bytes(r) + bytes(s).
pubKey_bytesthe full public key of a signer. Equals to bytes(x) + bytes(y). Note that signatures only from the lower part of the curve are accepted. If your s > n / 2, change it to s = n - s.