TBD54566975 / web5-spec

Web5 Spec
https://tbd54566975.github.io/web5-spec/
Apache License 2.0
7 stars 5 forks source link

Add ES256K sign and verify test vectors #104

Closed frankhinek closed 8 months ago

frankhinek commented 8 months ago

This PR will:

[!NOTE] This test vector was intentionally named ES256K and not Secp256k1 as it tests the sign and verify operations of a concrete implementation of the ECDSA algorithm with the secp256k1 curve and SHA-256 hash function.

The ES256K algorithm identifier is defined in RFC8812, which specifies the use of ECDSA with the secp256k1 curve and the SHA-256 cryptographic hash function. This provides a succinct and unambiguous identifier for this combination of signature algorithm (ECDSA), curve (secp256k1), and hash function (SHA-256). The same algorithm identifiers are used broadly across JSON Object Signing and Encryption (JOSE) standards and when working with DIDs and VCs.

There are other non-signature algorithms (e.g., ECDH, ECIES, etc.) that the secp256k1 curve can be used with and other hash functions (e.g., SHA-384 or SHA-512) that can be used with ECDSA+secp256k1. There are even other signature algorithms (e.g., Schnorr) that can use both secp256k1 and SHA-256.

closes #84