What is Nostr?
Torq (formerly LN Capital) / LN Capital
npub1kn8…xkhm
2023-02-26 17:10:05

Torq (formerly LN Capital) on Nostr: #Bitcoin is built on digital signatures. But what does it actually mean to sign a ...

#Bitcoin is built on digital signatures.

But what does it actually mean to sign a transaction?

You should know this.

Nostr Thread:



Everyone knows that we use our private keys to send bitcoin.

But how do we send bitcoin *without* revealing our private key to the whole network?

This is where digital signatures come in.


We start with a basic private key.

Your private key is an incredibly large, random number that you (or your wallet software) can generate with random entropy (dice rolls, mouse scrolling…etc).


Your private key (the really large, random number), gets multiplied by a generator point G (a point on the secp256k1 curve) to generate a public key.



This is what a raw pubkey looks like:



The raw public key then gets hashed into what we call an “address”.

This address is secure enough to send to the bitcoin network.



After you’ve created an address, you can give it to someone who wishes to send you BTC.

To send you BTC, they lock the transaction to *your* public key.

Since you own the private key that was used to derive your public key, you now have the ability to spend (unlock) the BTC.


This is where it gets interesting.

To send the bitcoin on, you need to prove that you created the public key that the tx is locked to.

To do this, you use your private key to generate a signature using the elliptic curve.

This signature allows you to send the bitcoin, without directly revealing your private key.


To sign a transaction, we use a combination of three components:

1. A random number
2. The hash of the transaction (often called the message)
3. Our private key


We take our random number and multiply it by the generator point on the elliptic curve.

This gives us a random POINT on the curve.

We then multiply this random point by our private key.


We add the hash of the transaction to that result.

What we end up with, is a value that represents a pathway between our private key, and the random point on the curve.


We broadcast the signature and transaction data to the network, and each node will verify if the pathway we have constructed is valid.

Or in other words, the nodes check to see if we indeed have the private key which corresponds to the public key that the tx is locked to.


If the signature is valid, the bitcoin is unlocked.

The transaction gets mined into the blockchain, and locked to the public key of the recipient.

To get into the details of this verification process, we might need another thread 😂

Let us know if you’d be interested in that!


Thanks for reading, we hope you learned something from this one.

If you want to learn more, we highly suggest Greg Walker's tutorials here: learnmeabitcoin.com


Follow us for more bitcoin & lightning threads!

Oh, and if you run a Lightning node, definitely check out Torq, the tool we’re building for node management:
https://github.com/lncapital/torq
Author Public Key
npub1kn860wn93ky8vnnzm5x5pdkl8npemzn3lcdagj9zdwf98ytwd89sxgxkhm