Implementation of ECDSA following RFC6637 for Openpgpjs
Requires
Methods
(async, inner) sign(oid, hash_algo, m, d, hashed) → {Object}
Sign a message using the provided key
Parameters:
Name | Type | Description |
---|---|---|
oid |
module:type/oid | Elliptic curve object identifier |
hash_algo |
module:enums.hash | Hash algorithm used to sign |
m |
Uint8Array | Message to sign |
d |
Uint8Array | Private key used to sign the message |
hashed |
Uint8Array | The hashed message |
Returns:
Signature of the message
- Type
- Object
(async, inner) verify(oid, hash_algo, signature, m, Q, hashed) → {Boolean}
Verifies if a signature is valid for a message
Parameters:
Name | Type | Description |
---|---|---|
oid |
module:type/oid | Elliptic curve object identifier |
hash_algo |
module:enums.hash | Hash algorithm used in the signature |
signature |
Object | Signature to verify |
m |
Uint8Array | Message to verify |
Q |
Uint8Array | Public key used to verify the message |
hashed |
Uint8Array | The hashed message |
Returns:
- Type
- Boolean