Bitcoin Forum
December 01, 2023, 02:43:47 AM *
News: Latest Bitcoin Core release: 25.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: How can I use private key to create signature  (Read 145 times)
SOKO-DEKE (OP)
Sr. Member
****
Offline Offline

Activity: 504
Merit: 436



View Profile
June 24, 2022, 12:14:24 AM
Merited by fillippone (2)
 #1

I am newbie who is very glad to be here. This farum was introduced to me by one of my friend some few month back that I can learn much about cryptocurrency here.
I 'm currently reading a topic about key private key, so i got confused.

I saw a sentence like private key is used to create a signature that are required to be spend Bitcoin by proving ownership of found used in a transaction.

My question is now how can I create signature from my private key?

.
Duelbits
▄▄█▄▄░░▄▄█▄▄░░▄▄█▄▄
███░░░░███░░░░███
░░░░░░░░░░░░░
░░░░░░░░░░░░
▀██████████
░░░░░███░░░░
░░░░░███▄█░░░
░░██▌░░███░▀░░██▌
█░██░░███░░░██
█▀▀▀█▌░███░░█▀▀▀█▌
▄█▄░░░██▄███▄█▄░░▄██▄
▄███▄
░░░░▀██▄▀
.
REGIONAL
SPONSOR
███▀██▀███▀█▀▀▀▀██▀▀▀██
██░▀░██░█░███░▀██░███▄█
█▄███▄██▄████▄████▄▄▄██
██▀ ▀███▀▀░▀██▀▀▀██████
███▄███░▄▀██████▀█▀█▀▀█
████▀▀██▄▀█████▄█▀███▄█
███▄▄▄████████▄█▄▀█████
███▀▀▀████████████▄▀███
███▄░▄█▀▀▀██████▀▀▀▄███
███████▄██▄▌████▀▀█████
▀██▄█████▄█▄▄▄██▄████▀
▀▀██████████▄▄███▀▀
▀▀▀▀█▀▀▀▀
.
EUROPEAN
BETTING
PARTNER
1701398627
Hero Member
*
Offline Offline

Posts: 1701398627

View Profile Personal Message (Offline)

Ignore
1701398627
Reply with quote  #2

1701398627
Report to moderator
Even in the event that an attacker gains more than 50% of the network's computational power, only transactions sent by the attacker could be reversed or double-spent. The network would not be destroyed.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
Charles-Tim
Legendary
*
Offline Offline

Activity: 1386
Merit: 4451


Mixero: Privacy by XMR (Monero) bridge


View Profile
June 24, 2022, 12:55:56 AM
Merited by fillippone (3)
 #2

Your wallet automatically handles that, when you generate the wallet, keys and addresses are generated, the master private key generates the child keys. The child private key generate a signature while spending, to prove you are the owner of a public key while not revealing the private key. Without the signature, you can not be able to spend. So, without private key, you can not spend your coins. To understand better, if you import the master public keys (not private key), only child public keys and addresses are generated which are used for watch-only wallet, in watch-only wallet, you can not spend because it has no private key, it is used for just making an unsigned transactions and for tracking transactions.

Learn more from here: https://learnmeabitcoin.com/beginners/digital_signatures#:~:text=A%20digital%20signature%20is%20something,digital%20signature%20to%20prove%20it.

                  █████████████
   ██████        █████████████
   ██████        █████████████
   ██████        █████████████
                 █████████████
      █████████  █████████████
      █████████
      █████████
      █████████    █████████
                   █████████
 ████
        ██    █████████
 ████              █████████
██████████████████████████████
█████████▀▀███▀▀  ▀▀▀█████████
███████▀  █▀    ▄▄▄▄▄▄▄███████
██████   ██  ▄█▀▀     ▀▀██████
█████    █  ███████▄▄▄   ▀████
███ ██   █▄████████▄ ▀█▄   ███
███  ██   ███████████  ▀█▄ ███
████  ▀██▄▄████████ ██   █▄███
█████     ▀▀▀▀▀▀██  ██   █████
███████▄▄▄▄▄▄▄█▀   ▄█   ██████
████████▀▀▀▀      ██  ▄███████
██████████▄▄▄▄▄████▄██████████
██████████████████████████████
.
.MIXERO.IO..
● BTC ● ●
● ● ● BTC
BTC ● ● ●
● ● BTC ●
● ● BTC ●
BTC ● ● ●
● ● ● BTC
● BTC ● ●
██████████████████████████████
███████▀▀██ ▀█████████████████
████████  █ █▀▀ ██████████████
████████  ▀   ▄███████████████
██████▀         ▀██████ ▀█████
████▀             ██▀▀█▄  ████
████           ▄████▄ ▀██  ███
████         ▄██▀ ▄██  ██  ███
█████      ▄██▀████▀  ██  ████
███████▄▄▄████▄    ▄██▀  █████
███████████  ▀▀▀██▀▀▀  ▄██████
██████████████▄▄▄▄▄▄██████████
██████████████████████████████
● ● ● BTC
BTC ● ● ●
● ● BTC ●
● BTC ● ●
.
...MIX NOW..
█████████████
█████████████         ██████

█████████████    ██   ██████
█████████████         ██████
█████████████

█████████████  █████████
               █████████
               █████████
  █████████    █████████
  █████████
  █████████   ██          ████
  █████████               ████
nc50lc
Legendary
*
Offline Offline

Activity: 2254
Merit: 4994


Self-proclaimed Genius


View Profile
June 24, 2022, 03:36:13 AM
Merited by fillippone (3)
 #3

-snip-
My question is now how can I create signature from my private key?
Bitcoin is using ECDSA for its signature using secp256k1 curve, more info about ECDSA here: /wiki/Elliptic_Curve_Digital_Signature_Algorithm

In Bitcoin transactions, the "message" to be signed is the transaction itself.
This article explained it better: learnmeabitcoin.com/technical/ecdsa#signing-a-transaction (I'd recommend to read the whole article)
Here's the beginner version: learnmeabitcoin.com/beginners/digital_signatures_signing_verifying

.
..M. MixTum.io ▀▄ Premium Bitcoin Mixer ▄▀ 
█████
██
██
██
██
██
██
██
██
██
██
██
█████
███████████████████████████████████████████████████████████████
.
MIX FREE
Up to 1mBTC
.
███████████████████████████████████████████████████████████████
█████
██
██
██
██
██
██
██
██
██
██
██
█████
████████████████████████
█████████████▀▀████████
████████████▀▄█████████
██████████▀▌▄██████████
██████████▌███████████
█████████▀▄███▀████████
██████▀▄▄██████▀███████
█████▀▄█▀▄████████████
██████▀▄█▌▐████▐█████
█████▌▐█▀▌▐█████▐█████
██████████████▄██████
███████▄██████▄████████
████████████████████████
NotATether
Legendary
*
Online Online

Activity: 1442
Merit: 6016


Premium Bitcoin Mixer


View Profile WWW
June 25, 2022, 01:56:06 PM
Merited by fillippone (3)
 #4

When your wallet creates a transaction, for example Bitcoin Core, the transaction is considered raw and cannot be broadcasted without a signature for security reasons. So to create that signature, your private key and the raw transaction are inserted inside an ECDSA signing operation to create the message signature, which is then placed inside the raw transaction to create a signed transaction.

Nodes will also verify transactions, to make sure that the signature is correct, using the ECDSA verification algorithm by passing parts of the signed transaction and signature as inputs. Generally, there is only one valid signature for each transaction, to prevent forgery.

.
..M. MixTum.io ▀▄ Premium Bitcoin Mixer ▄▀ 
█████
██
██
██
██
██
██
██
██
██
██
██
█████
███████████████████████████████████████████████████████████████
.
MIX FREE
Up to 1mBTC
.
███████████████████████████████████████████████████████████████
█████
██
██
██
██
██
██
██
██
██
██
██
█████
████████████████████████
█████████████▀▀████████
████████████▀▄█████████
██████████▀▌▄██████████
██████████▌███████████
█████████▀▄███▀████████
██████▀▄▄██████▀███████
█████▀▄█▀▄████████████
██████▀▄█▌▐████▐█████
█████▌▐█▀▌▐█████▐█████
██████████████▄██████
███████▄██████▄████████
████████████████████████
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!