Namespace: ecdsa

crypto/pk.ecdsa

ECDSA

Source:

Methods

(static) ecdsa.sign(curve, alg, msg, key) → {Buffer}

Sign message with ECDSA key.

Parameters:
Name Type Description
curve String

Curve name.

alg String

Hash algorithm.

msg Buffer

Signed message.

key Buffer

ASN1 serialized ECDSA key.

Source:
Returns:

Signature (DER)

Type
Buffer

(static) ecdsa.verify(curve, alg, msg, sig, key) → {Boolean}

Verify ECDSA signature.

Parameters:
Name Type Description
curve String

Curve name.

alg String

Hash algorithm.

msg Buffer

Signed message.

sig Buffer

Signature.

key Buffer

ASN1 serialized ECDSA key.

Source:
Returns:
Type
Boolean