ECDSA
Last updated
Was this helpful?
Last updated
Was this helpful?
In this tutorial, we will learn how to use ECDSA with asymmetric public and private key pairs. Note, this is a low-level tutorial and should only be used if the SDK's higher-level do not meet your needs.
First, you'll need to import the PrivateKey
function. We'll also import utils
so we can represent our messages in human-readable formats.
Now, let's generate a random private key and sign a message with it.
Anyone who knows the public key can verify the message, even if they don't have the private key. You can sign Bitcoin transactions, documents, or any other type of information with ECDSA. Changing the message will invalidate the signature.