Bitcoin public and private key
Bitcoin is an independent public-key cryptographic system that facilitates the exchange of digital value between peers via a series of digitally signed transactions rather than messages.
In order to protect data from unauthorized access or use, public key cryptography uses a pair of keys to encrypt and decrypt it. There is a digital signature, which is an electronic signature that uses a mathematical algorithm to verify the authenticity and integrity of a digital message. So Bitcoin is a series of digital signatures.
How can this be?
Each Bitcoin owner sends to its next counterpart by digitally signing the hash-hash of the previous transaction and the public key of the next owner and appends them to the end of the coin. The chain of ownership can also be confirmed by the beneficiary by verifying signatures.
It is important that users have access to the public and private keys associated with them in order to transfer the required amount of bitcoin. It is sufficient to indicate a person who owns bitcoin, in order to have access to a key pair that includes public and private keys.
The public key indicates the address to which some bitcoin was previously sent, and the unique private key associated with the password allows bitcoin to be sent elsewhere once it has been sent to the public key above
Public keys: Random sequences of letters and numbers that act similar to an email address or username on a social media site, and are public so that users can safely share them with others.
So if users want anyone to send them bitcoin, they must provide them with their own bitcoin address.
While the private key consists of a different set of randomly generated letters and numbers, private keys such as passwords for email or other services must be kept secret. Never give your private key to someone you don't fully trust.
A Bitcoin address can be compared to a transparent safe, others can see what's inside but only the owner of this private key can open it and access the funds.
What are the inputs and outputs of transactions?
Although coins can be handled individually, making a separate transaction for each penny in the conversion process would be inconvenient so transactions have many inputs and outputs to allow value to be split and combined.
Typically, there will be either one entry from a more significant previous transaction or many inputs that combine smaller quantities with at most two outputs: one to pay and one to return any change to the sender.
Let's give an example
Imagine with me that Romeo wishes to send 1 Bitcoin to Juliet, this is done by signing a message containing transaction information with his private key.
This figure shows the message that should be broadcast on the network:
Input:
The entries contain details about the bitcoins that were previously delivered to Romeo's address.
Consider the case where Romeo got 0.7 bitcoins from Alice and 0.7 bitcoins from Bob.
Now.. to send 1 bitcoin to Joliet, there may be two entries: one 0.7 bitcoin entry from Alice and one 0.7 bitcoin entry from Bob.
Now.. to send 1 bitcoin to Joliet, there may be two entries: one 0.7 bitcoin entry from Alice and one 0.7 bitcoin entry from Bob.
Amount: The amount Romeo wants to send is 1 Bitcoin.
Output: The initial output is 1.4 BTC for the public address of Juliet (BTC 0.7 + BTC). The second output is Bitcoin 0.4 returned to Romeo as a "change".
Broadcasts, confirmations or approvals over the network
Or not:
Romeo will broadcast his intended transaction to the Bitcoin network via his wallet software, then the address entries or addresses - from which Romeo previously obtained his Bitcoin - will be verified by a specific group of network members known as "miners".
Miners will also create a block by combining a list of additional transactions that are broadcast on the network around the same time as Marx, and any miner who has completed a Proof of Work (POW) can suggest a new block to add to the chain or connect to it by going back to the previous block and from The network is then informed of the new block
Other network participants (nodes) will pass it forward if they agree that it is a valid block (i.e. the transactions it contains comply with all protocol requirements and sufficiently refer to the previous block).
When proposing the next block, another miner will build on top of it by referring to it as the previous block, the next miner will have "verified" any transactions added to the last block, so the number of confirmations for Romeo's transaction increases as blocks are added to the chain.
Now let's come to the most important topic.
What is bitcoin mining and how does it work?
The process of adding new transactions to the Bitcoin blockchain is a challenging task, in which miners use Proof of Work (PoW) technology, as computers compete to solve mathematical problems that validate transactions.
How does that happen?
In general, miners attempt to generate a 64-digit hexadecimal number, referred to as a hash, i.e. less than or equal to the hash target. Bitcoin hash rate refers to the estimated number of hashes created by miners trying to solve the current or any Bitcoin block specific block.
How is the Bitcoin hash rate measured?
Bitcoin hash rate is measured in hashes per second, or H/s. Miners need a high hash rate, measured in megahashes per second (MH/s), gigabytes per second (GH/s) and tera hashs per second (TH/s), to mine successfully.