I have been thinking much about the future of the Bitcoin. For it is the first and the most successful public blockchained-cryto currency up till now. Thus, what happens to Bitcoin will inevitably have a big impact and profound ramification on crypto-currency as a whole and on world monetary and financial system.

Many people have heard of and about crypto currency, especially the Bitcoin; many also have used them, unfortunately few understand how they work, and more importantly what exactly their mission are. That’s perfectly understandable, since the majority of population on this planet  does not even understand the fiat papers they have been using daily all their life!

First, I invite you to join me in a scenario where all government around the world criminalize crypto-currency, the Bitcoin and all the alt-coins will be banned completely tomorrow. What would happen to crypto world do you think?

Every “crypto thing” will be going underground.  There will be no Coinbase exchange. No blockchain Bitcoin.info. No Bitcoin donation sign at any website etc.. The new crypto related business in deep/dark networks will be established and… booming. The world has already seen a destructive and disastrous war on drugs , now the world will have an even more difficult and stupid “war on crypto currencies”. If the “War on drugs” is of any guide, which side will win in “the war on crypto currencies” would you think?

That’s why personally I wish THEY will ban crypto currencies right now,  and let see the show down between the State vs the Market and the people freewill. But don’t hold your breath just yet!

Well, perhaps they learned their lesson… for this moment!

That’s why they don’t ban those public crypto currencies such as Bitcoin just yet! They need to sabotage and demonize this public crypto currency-the Bitcoin in such a way that will make their  sheeples both fear and hate the Bitcoin. Once they achieved this objective, they will criminalize crypto-currencies  before they introduce their own  so-called national crypto-currency. Don’t you know that digitized cashless society is their ultimate goal, do you?

With national digital currency, they will have a complete controlling system of human activities. They have been implementing it one step at a time.  Have you heard of the “war on cash” in India? In Sweden? Are you surprised? Most of you actually love to be the victims of “cashless conveniences” without even knowing about this.  How many bankcards do you have? Did you know that your bankcards are government and banksters’ digital money? Did you?

Canada, Sweden, United Kingdom, France, United States,China, Australia, Germany, Japan, Russia etc.. They all are implementing it . You have been spied on and controlled  at every cent of your spent money.  By the way, “Cash” (actual physical notes and coins. Technically called M0) represents only 5-10 % of total money (M2-M3)!

They just cannot implement such complete controlling system successfully in accordance with their grand plan  with the existence of public crypto currencies as it is now, over which they have no way to control at all. Thanks to public blockchain technology and the controlled supply mathematical algorithm.

You see, the end game is to control completely!

To counter and defy this fascist monetary and financial system, the freedom loving people have devised  crypto-currency. And the first one was born. That’s the most famous Bitcoin. If you read the Bitcoin white paper by Satoshi Nakamoto You will see the mission of the Bitcoin is to set you, the people free from being depended and  controlled by third parties, a.k.a banksters and their governments.  And set the money supply  free from inflation and the governments’ monopoly. Effectively, Bitcoin set its users, YOU, the people on this planet totally free from Banksters and Governments and even national borders.

You see, after all it’s not the money per se that the Banksters and their Governments  want. They can print as much money as they want (how many QE- quantitative easing- have you counted?). It’s the power! Controlling power! Complete controlling power!

By the same principle of Power vs Liberty, the Bitcoin is not about money per se by that the creator/creators Satoshi Nakamoto  (not the fake one in Wikipedia) was motivated.

It’s all about freedoms, liberty, personal sovereignty. That’s why the Bitcoin is finite! It’s a peer to peer cash system. It’s decentralized, and it’s completely transparent with the global common ledger a.k.a the public blockchain, in which every detail of every transaction of each and every single user is recorded, available, and accessible to all users.

(Please read the White Paper) .  At least to this yours truly , after all, by no coincidence the name  “Satoshi Nakamoto” in Japanese (中本哲史) –or the same in Chinese 中本哲史(zhōng běn zhé shǐ) or in Vietnamese Trung Bản Triết Sử ,  all mean the “Center (fundamental)  root of wisdom in (of) History”.  Or more precisely, if one prefers “the main root of bright history”. It has proved It is,  Indeed!

=

# The Day The Bitcoin Will Die

The Fate of The Bitcoin will be clearly, decisively decided by its users once the 21millions coins completely mined.

Please join me again in this scenario where the Bitcoin mining is completed, the Government and Banksters by some miracle or true revolution .. whatever,  gave up the war on crypto Bitcoin,  and gave in to the Bitcoin. And the Satoshi becomes one of the global unit of account among many other alt-crypto coins – (1 Bitcoin has 1 hundred millions Satoshis). That means you and I and anyone, everyone around the world would buy a cup of coffee, a pack of cigarettes,  or just a single lolly-pop with a Satoshi or some Satoshis. This also means there will be trillions of small transactions as such taking place at every single second around the world.

This requires the transaction verifying time that must be very fast and at lowest cost, if not totally free, for the Bitcoin system to work globally and  efficiently in this global scenario.

How can this be achieved with current operating cost of mining? Without coinbase block to find , will the transaction fee be incentive enough to keep mining PC/Servers running just for transaction verification? With such huge volume of global transaction that increases  every single second,  can these miners cope? If there is no miner, or even too few miners, what happen to millions, billions, or even trillions of transactions per day, per hour or even per minute!

If the Bitcoin system has no radical change in its method of transaction verifying, the users will abandon the Bitcoin, for Bitcoin will no longer be a better medium of exchange. With its slow and costly transaction verifying process that is totally decided by the miners, how can this system work efficiently as global currency  at global scale in which trillions of small normal daily transactions taking place in every second?

Note: Bitcoin has a theoretical limit of 10 transactions/second, while Visa/Mastercard does ~2000/second.

How long for a kid who buys a lolly-pop  has to wait for a transaction of say 1 Satoshi to be verified and what is the fee? What about a cup of coffee, a bottle of soft-drink etc… how about millions, billions, trillions of such small daily transactions taking place at the same time around the world?

In this global scenario, the size of the Blockchain will be increased rapidly and tremendously if not exponentially as every day passes by. Thus running a full node wallet is the issue too, since the Bitcoin is a peer to peer network, which needs many full node to update and maintain the blockchain constantly once the number of mining servers are reduced due to the completion of 21millions BTC!  However, I hope the pace of technological progress in hardware computing will ease this problem.

As I suggested in the previous article that the Bitcoin automatic transaction verifying process  must somehow be automatically implemented AFTER the 21millionth Bitcoin is mined.  Otherwise the Bitcoin system will collapse. The Bitcoin. as a free global currency as it intended to be, will never be realized. It will die!

I am not  a software developer. But I guess and I hope  there are some crypto software developers out there  who have seen what I have seen, and have already been working quietly on this to find a solution for this fatal problem,  not just to save the Bitcoin, but to save our liberty,  our humanity. Yes, this may be my wishful thinking,  but perhaps Satoshi Nakamoto has (or have) been working on this!

I do hope and believe that this Automatic Transaction Verification (ATV) patch will have been released  with the Bitcoin Core Update by the time the 21millionth Bitcoin will be mined.

For the time being, please run your full node wallet  (Bitcoin Core Full Node Wallet)  (Bitcoin Cash Full Node Wallet) This will help.

PQC

PS: There must have been some cyberpunks are working right now on a better version of Bitcoin by learning and overcoming the Bitcoin’ s transaction current limit. If Bitcoin community cannot come up with better solution than just scalability, I am more than happy to see some other alt-coins overtaking Bitcoin in the near future. I still cannot see any reason why the Automatic Transaction Verification cannot be done. If this ATV is implemented, two online full node wallets alone can complete a transaction in no time! Bitcoin will absolutely be a perfect peer to peer cash system without rivals.

===

# SOURCES:

## Abstract

A purely peer-to-peer version of electronic cash would allow online payments to be sent directly from one party to another without going through a financial institution. Digital signatures provide part of the solution, but the main benefits are lost if a trusted third party is still required to prevent double-spending. We propose a solution to the double-spending problem using a peer-to-peer network. The network timestamps transactions by hashing them into an ongoing chain of hash-based proof-of-work, forming a record that cannot be changed without redoing the proof-of-work. The longest chain not only serves as proof of the sequence of events witnessed, but proof that it came from the largest pool of CPU power. As long as a majority of CPU power is controlled by nodes that are not cooperating to attack the network, they’ll generate the longest chain and outpace attackers. The network itself requires minimal structure. Messages are broadcast on a best effort basis, and nodes can leave and rejoin the network at will, accepting the longest proof-of-work chain as proof of what happened while they were gone.

## 1. Introduction

Commerce on the Internet has come to rely almost exclusively on financial institutions serving as trusted third parties to process electronic payments. While the system works well enough for most transactions, it still suffers from the inherent weaknesses of the trust based model. Completely non-reversible transactions are not really possible, since financial institutions cannot avoid mediating disputes. The cost of mediation increases transaction costs, limiting the minimum practical transaction size and cutting off the possibility for small casual transactions, and there is a broader cost in the loss of ability to make non-reversible payments for non-reversible services. With the possibility of reversal, the need for trust spreads. Merchants must be wary of their customers, hassling them for more information than they would otherwise need. A certain percentage of fraud is accepted as unavoidable. These costs and payment uncertainties can be avoided in person by using physical currency, but no mechanism exists to make payments over a communications channel without a trusted party.

What is needed is an electronic payment system based on cryptographic proof instead of trust, allowing any two willing parties to transact directly with each other without the need for a trusted third party. Transactions that are computationally impractical to reverse would protect sellers from fraud, and routine escrow mechanisms could easily be implemented to protect buyers. In this paper, we propose a solution to the double-spending problem using a peer-to-peer distributed timestamp server to generate computational proof of the chronological order of transactions. The system is secure as long as honest nodes collectively control more CPU power than any cooperating group of attacker nodes.

## 2. Transactions

We define an electronic coin as a chain of digital signatures. Each owner transfers the coin to the next by digitally signing a hash of the previous transaction and the public key of the next owner and adding these to the end of the coin. A payee can verify the signatures to verify the chain of ownership.

The problem of course is the payee can’t verify that one of the owners did not double-spend the coin. A common solution is to introduce a trusted central authority, or mint, that checks every transaction for double spending. After each transaction, the coin must be returned to the mint to issue a new coin, and only coins issued directly from the mint are trusted not to be double-spent. The problem with this solution is that the fate of the entire money system depends on the company running the mint, with every transaction having to go through them, just like a bank.

We need a way for the payee to know that the previous owners did not sign any earlier transactions. For our purposes, the earliest transaction is the one that counts, so we don’t care about later attempts to double-spend. The only way to confirm the absence of a transaction is to be aware of all transactions. In the mint based model, the mint was aware of all transactions and decided which arrived first. To accomplish this without a trusted party, transactions must be publicly announced[1], and we need a system for participants to agree on a single history of the order in which they were received. The payee needs proof that at the time of each transaction, the majority of nodes agreed it was the first received.

## 3. Timestamp Server

The solution we propose begins with a timestamp server. A timestamp server works by taking a hash of a block of items to be timestamped and widely publishing the hash, such as in a newspaper or Usenet post[2-5]. The timestamp proves that the data must have existed at the time, obviously, in order to get into the hash. Each timestamp includes the previous timestamp in its hash, forming a chain, with each additional timestamp reinforcing the ones before it.

## 4. Proof-of-Work

To implement a distributed timestamp server on a peer-to-peer basis, we will need to use a proof-of-work system similar to Adam Back’s Hashcash[6], rather than newspaper or Usenet posts. The proof-of-work involves scanning for a value that when hashed, such as with SHA-256, the hash begins with a number of zero bits. The average work required is exponential in the number of zero bits required and can be verified by executing a single hash.

For our timestamp network, we implement the proof-of-work by incrementing a nonce in the block until a value is found that gives the block’s hash the required zero bits. Once the CPU effort has been expended to make it satisfy the proof-of-work, the block cannot be changed without redoing the work. As later blocks are chained after it, the work to change the block would include redoing all the blocks after it.

The proof-of-work also solves the problem of determining representation in majority decision making. If the majority were based on one-IP-address-one-vote, it could be subverted by anyone able to allocate many IPs. Proof-of-work is essentially one-CPU-one-vote. The majority decision is represented by the longest chain, which has the greatest proof-of-work effort invested in it. If a majority of CPU power is controlled by honest nodes, the honest chain will grow the fastest and outpace any competing chains. To modify a past block, an attacker would have to redo the proof-of-work of the block and all blocks after it and then catch up with and surpass the work of the honest nodes. We will show later that the probability of a slower attacker catching up diminishes exponentially as subsequent blocks are added.

To compensate for increasing hardware speed and varying interest in running nodes over time, the proof-of-work difficulty is determined by a moving average targeting an average number of blocks per hour. If they’re generated too fast, the difficulty increases.

## 5. Network

The steps to run the network are as follows:

1. New transactions are broadcast to all nodes.
2. Each node collects new transactions into a block.
3. Each node works on finding a difficult proof-of-work for its block.
4. When a node finds a proof-of-work, it broadcasts the block to all nodes.
5. Nodes accept the block only if all transactions in it are valid and not already spent.
6. Nodes express their acceptance of the block by working on creating the next block in the chain, using the hash of the accepted block as the previous hash.

Nodes always consider the longest chain to be the correct one and will keep working on extending it. If two nodes broadcast different versions of the next block simultaneously, some nodes may receive one or the other first. In that case, they work on the first one they received, but save the other branch in case it becomes longer. The tie will be broken when the next proof-of-work is found and one branch becomes longer; the nodes that were working on the other branch will then switch to the longer one.

New transaction broadcasts do not necessarily need to reach all nodes. As long as they reach many nodes, they will get into a block before long. Block broadcasts are also tolerant of dropped messages. If a node does not receive a block, it will request it when it receives the next block and realizes it missed one.

## 6. Incentive

By convention, the first transaction in a block is a special transaction that starts a new coin owned by the creator of the block. This adds an incentive for nodes to support the network, and provides a way to initially distribute coins into circulation, since there is no central authority to issue them. The steady addition of a constant of amount of new coins is analogous to gold miners expending resources to add gold to circulation. In our case, it is CPU time and electricity that is expended.

The incentive can also be funded with transaction fees. If the output value of a transaction is less than its input value, the difference is a transaction fee that is added to the incentive value of the block containing the transaction. Once a predetermined number of coins have entered circulation, the incentive can transition entirely to transaction fees and be completely inflation free.

The incentive may help encourage nodes to stay honest. If a greedy attacker is able to assemble more CPU power than all the honest nodes, he would have to choose between using it to defraud people by stealing back his payments, or using it to generate new coins. He ought to find it more profitable to play by the rules, such rules that favour him with more new coins than everyone else combined, than to undermine the system and the validity of his own wealth.

## 7. Reclaiming Disk Space

Once the latest transaction in a coin is buried under enough blocks, the spent transactions before it can be discarded to save disk space. To facilitate this without breaking the block’s hash, transactions are hashed in a Merkle Tree [7][2][5], with only the root included in the block’s hash. Old blocks can then be compacted by stubbing off branches of the tree. The interior hashes do not need to be stored.

A block header with no transactions would be about 80 bytes. If we suppose blocks are generated every 10 minutes, 80 bytes * 6 * 24 * 365 = 4.2MB per year. With computer systems typically selling with 2GB of RAM as of 2008, and Moore’s Law predicting current growth of 1.2GB per year, storage should not be a problem even if the block headers must be kept in memory.

## 8. Simplified Payment Verification

It is possible to verify payments without running a full network node. A user only needs to keep a copy of the block headers of the longest proof-of-work chain, which he can get by querying network nodes until he’s convinced he has the longest chain, and obtain the Merkle branch linking the transaction to the block it’s timestamped in. He can’t check the transaction for himself, but by linking it to a place in the chain, he can see that a network node has accepted it, and blocks added after it further confirm the network has accepted it.

As such, the verification is reliable as long as honest nodes control the network, but is more vulnerable if the network is overpowered by an attacker. While network nodes can verify transactions for themselves, the simplified method can be fooled by an attacker’s fabricated transactions for as long as the attacker can continue to overpower the network. One strategy to protect against this would be to accept alerts from network nodes when they detect an invalid block, prompting the user’s software to download the full block and alerted transactions to confirm the inconsistency. Businesses that receive frequent payments will probably still want to run their own nodes for more independent security and quicker verification.

## 9. Combining and Splitting Value

Although it would be possible to handle coins individually, it would be unwieldy to make a separate transaction for every cent in a transfer. To allow value to be split and combined, transactions contain multiple inputs and outputs. Normally there will be either a single input from a larger previous transaction or multiple inputs combining smaller amounts, and at most two outputs: one for the payment, and one returning the change, if any, back to the sender.

It should be noted that fan-out, where a transaction depends on several transactions, and those transactions depend on many more, is not a problem here. There is never the need to extract a complete standalone copy of a transaction’s history.

## 10. Privacy

The traditional banking model achieves a level of privacy by limiting access to information to the parties involved and the trusted third party. The necessity to announce all transactions publicly precludes this method, but privacy can still be maintained by breaking the flow of information in another place: by keeping public keys anonymous. The public can see that someone is sending an amount to someone else, but without information linking the transaction to anyone. This is similar to the level of information released by stock exchanges, where the time and size of individual trades, the “tape”, is made public, but without telling who the parties were.

As an additional firewall, a new key pair should be used for each transaction to keep them from being linked to a common owner. Some linking is still unavoidable with multi-input transactions, which necessarily reveal that their inputs were owned by the same owner. The risk is that if the owner of a key is revealed, linking could reveal other transactions that belonged to the same owner.

## 11. Calculations

We consider the scenario of an attacker trying to generate an alternate chain faster than the honest chain. Even if this is accomplished, it does not throw the system open to arbitrary changes, such as creating value out of thin air or taking money that never belonged to the attacker. Nodes are not going to accept an invalid transaction as payment, and honest nodes will never accept a block containing them. An attacker can only try to change one of his own transactions to take back money he recently spent.

The race between the honest chain and an attacker chain can be characterized as a Binomial Random Walk. The success event is the honest chain being extended by one block, increasing its lead by +1, and the failure event is the attacker’s chain being extended by one block, reducing the gap by -1.

The probability of an attacker catching up from a given deficit is analogous to a Gambler’s Ruin problem. Suppose a gambler with unlimited credit starts at a deficit and plays potentially an infinite number of trials to try to reach breakeven. We can calculate the probability he ever reaches breakeven, or that an attacker ever catches up with the honest chain, as follows[8]:

pqqz=== probability an honest node finds the next block probability the attacker finds the next block probability the attacker will ever catch up from z blocks behind
qz={1(q/p)zifpqifp>q}

Given our assumption that p>q

, the probability drops exponentially as the number of blocks the attacker has to catch up with increases. With the odds against him, if he doesn’t make a lucky lunge forward early on, his chances become vanishingly small as he falls further behind.

We now consider how long the recipient of a new transaction needs to wait before being sufficiently certain the sender can’t change the transaction. We assume the sender is an attacker who wants to make the recipient believe he paid him for a while, then switch it to pay back to himself after some time has passed. The receiver will be alerted when that happens, but the sender hopes it will be too late.

The receiver generates a new key pair and gives the public key to the sender shortly before signing. This prevents the sender from preparing a chain of blocks ahead of time by working on it continuously until he is lucky enough to get far enough ahead, then executing the transaction at that moment. Once the transaction is sent, the dishonest sender starts working in secret on a parallel chain containing an alternate version of his transaction.

The recipient waits until the transaction has been added to a block and z

blocks have been linked after it. He doesn’t know the exact amount of progress the attacker has made, but assuming the honest blocks took the average expected time per block, the attacker’s potential progress will be a Poisson distribution with expected value:

λ=zqp

To get the probability the attacker could still catch up now, we multiply the Poisson density for each amount of progress he could have made by the probability he could catch up from that point:

k=0λkeλk!{(q/p)(zk)1ifkzifk>z}

Rearranging to avoid summing the infinite tail of the distribution…

1k=0zλkeλk!(1(q/p)(zk))

Converting to C code…

#include
double AttackerSuccessProbability(double q, int z)
{
double p = 1.0 - q;
double lambda = z * (q / p);
double sum = 1.0;
int i, k;
for (k = 0; k <= z; k++)
{
double poisson = exp(-lambda);
for (i = 1; i <= k; i++)
poisson *= lambda / i;
sum -= poisson * (1 - pow(q / p, z - k));
}
return sum;
}


Running some results, we can see the probability drop off exponentially with z

.

q=0.1
z=0    P=1.0000000
z=1    P=0.2045873
z=2    P=0.0509779
z=3    P=0.0131722
z=4    P=0.0034552
z=5    P=0.0009137
z=6    P=0.0002428
z=7    P=0.0000647
z=8    P=0.0000173
z=9    P=0.0000046
z=10   P=0.0000012

q=0.3
z=0    P=1.0000000
z=5    P=0.1773523
z=10   P=0.0416605
z=15   P=0.0101008
z=20   P=0.0024804
z=25   P=0.0006132
z=30   P=0.0001522
z=35   P=0.0000379
z=40   P=0.0000095
z=45   P=0.0000024
z=50   P=0.0000006


Solving for P less than 0.1%…

P < 0.001
q=0.10   z=5
q=0.15   z=8
q=0.20   z=11
q=0.25   z=15
q=0.30   z=24
q=0.35   z=41
q=0.40   z=89
q=0.45   z=340


## 12. Conclusion

We have proposed a system for electronic transactions without relying on trust. We started with the usual framework of coins made from digital signatures, which provides strong control of ownership, but is incomplete without a way to prevent double-spending. To solve this, we proposed a peer-to-peer network using proof-of-work to record a public history of transactions that quickly becomes computationally impractical for an attacker to change if honest nodes control a majority of CPU power. The network is robust in its unstructured simplicity. Nodes work all at once with little coordination. They do not need to be identified, since messages are not routed to any particular place and only need to be delivered on a best effort basis. Nodes can leave and rejoin the network at will, accepting the proof-of-work chain as proof of what happened while they were gone. They vote with their CPU power, expressing their acceptance of valid blocks by working on extending them and rejecting invalid blocks by refusing to work on them. Any needed rules and incentives can be enforced with this consensus mechanism.

## References

1. W. Dai, “b-money,” http://www.weidai.com/bmoney.txt, 1998.
2. H. Massias, X.S. Avila, and J.-J. Quisquater, “Design of a secure timestamping service with minimal trust requirements,” In 20th Symposium on Information Theory in the Benelux, May 1999.
3. S. Haber, W.S. Stornetta, “How to time-stamp a digital document,” In Journal of Cryptology, vol 3, no 2, pages 99-111, 1991.
4. D. Bayer, S. Haber, W.S. Stornetta, “Improving the efficiency and reliability of digital time-stamping,” In Sequences II: Methods in Communication, Security and Computer Science, pages 329-334, 1993.
5. S. Haber, W.S. Stornetta, “Secure names for bit-strings,” In Proceedings of the 4th ACM Conference on Computer and Communications Security, pages 28-35, April 1997.
6. A. Back, “Hashcash – a denial of service counter-measure,” http://www.hashcash.org/papers/hashcash.pdf, 2002.
7. R.C. Merkle, “Protocols for public key cryptosystems,” In Proc. 1980 Symposium on Security and Privacy, IEEE Computer Society, pages 122-133, April 1980.
8. W. Feller, “An introduction to probability theory and its applications,” 1957.

# 2- Algorithms: THE Math Behind Bitcoin

An algorithm is a process or a procedure for making calculations. They’re not always intimidating scribblings mapped across multiple chalkboards in college classrooms. y = mx + b is the line drawing algorithm from algebra. It’s not very intimidating at all.

Algorithms are like machines. Data goes in, and the algorithm does some work, and data comes out. ECDSA is all of the “y = mx + b” mathematics that goes into creating Bitcoin key pairs.

As Erik explains,

[ECDSA]… a process that uses an elliptic curve and a finite field to “sign” data

He does a great job of defining the math. In practical terms, we’re drawing a big squiggly line on a graph within certain limits.

The line is an elliptic curve:

Also practically, the finite field is a graph or cartesian plane. The thing our math teachers made us draw the y = mx + b lines on. Finite fields are modular. Points that fall outside the size of the graph wrap around until they do.

To create a new key pair the elliptic curve is plotted across the finite field. A line is drawn across the curve such that it intersects three points on the curve. Bitcoin defines the formula for the curve and the parameters of the field so that every user has the same graph. The parameters used in Bitcoin’s elliptic curve, and finite field are defined as secp256k1.

A private key is any number between 1 and

1852673427797059126777135760139006525645401028465198470121682610264290583909392
or
FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFE BAAEDCE6 AF48A03B BFD25E8C D0364141
or
1111111111111111111111111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111110101110101010111011
0111001110011010101111010010001010000000111011101111111101001001011110100
01100110100000011011001000001010000010000

Between 1 and 2^256. The spot where the line originates on the graph is the base point. Multiply the base point by the private key and you have a public key. The base point does not change, one public key maps to one private key.

This part is important. Bitcoin has an enormous field.

There are 10^82 atoms in the universe. If you made the entire Universe our finite field and you drew a giant elliptic curve through it, each “point” in the universe would about 300 square atoms. At that size, each cell in your body takes up the space of 1,150,000,000 Bitcoin key pairs.

10^82 / 2^256 = 86362
sqrt(86362) ~ 300
10^14 / 86362 = 1.15 * 10^9

## That’s alotta keys

Trying to brute force every private key would be like mapping out every 300 square atom block in the universe. Yeah, that’s a silly thing to do.

There’s more! There’s something called Landauer’s principle that talks about the theoretical smallest amount of energy required to store a bit of data. There’s a lot more of math involved, and I’m pretty sure the laws of thermodynamics come into play.

In short, here is an ancient chart:

Let’s just say the heat death of the universe is in 10^120 years. A 25 GPU password cracker does about 350,000,000,000 hashes a second. It’s not the same algorithm, but let’s pretend we have oclVanityGen commanding those 25 GPUs and for fantasy sake say it goes just as fast.

1852673427797059126777135760139006525645401028465198470121682610264290583909392 / 350,000,000 =
5293352650848740362220387886111447216129717224100000000000000000000000 years
or
5 * 10^69 years

(And about 4000 years to calculate 1 human worth of private keys)

There’s a possibility of seeing a completely random Big Bang happening in 10^59 years. By that time humans will have transcended physical form and money will be indistinguishable from the tools of cavemen – if it is remembered at all.

A Bitcoin Address looks like this: 181TK6dMSy88SvjN1mmoDkjB9TmvXRqCCv

The address is not a public key. An Address is an RIPEMD-160 hash of an SHA256 hash of a public key. SHA256 and RIPEMD-160 are also algorithms. Unlike ECDSA, which is used to generate key pairs, RIPEMD-160 generates a hash. Think of an algorithm like a machine. You put in “stuff” and, hopefully, new “stuff” comes out.

A simple example of a hash

Every letter has a value of its position in the alphabet. A = 1; B = 2, etc.
Our hash algorithm is this:
for i=0 to len(word):
h = h + (i + letter_value)

So for the word “ABC” using our hash would be:

Loop for ‘A’
h = 0 + (0 + 1)
Loop ‘B’
h = 1 + (1 + 2)
‘C’
h = 4 + (2 + 3)
h = 9

‘ABC’ hashes to 9. Of course, RIPEMD is much more sophisticated.

RIPEMD uses your public key to create a hash. A bitcoin address is smaller than a public key. That introduces another term, collisions. When two unique inputs give the same output in a hash algorithm, it’s called a collision. In the above example, the word ‘C’ has the same output as ‘AA’. Using an enormous numbers, and a strong algorithm reduces collisions. But for Bitcoin it’s because we’re turning large numbers in to smaller numbers.

For Bitcoin, there are so many possible keys that collisions are astronomically unlikely. Furthermore, since there are only 21M bitcoins only a very miniscule fraction of keys can even claim a balance. So even if someone were to generate a key pair that collides with another – an astronomical feat – the other key likely wouldn’t have a balance.

## How It Actually Works

Your private key is kept secret. This is the key that unlocks funds owed to you in the Bitcoin block chain.

Bitcoin has a scripting system that is used to define the parameters necessary to spend bitcoins. When you build a transaction in addition to referencing previous transactions you’ve received, it contains a script with your private key’s signature and the matching public key. This is used to prove the provided public key matches the private key used to make the signature.

If that public key hashes (RIPEMD160) to the Bitcoin Address in a previously unclaimed transaction, it can be spent. That’s a high-level view of some of the ways Bitcoin uses cryptography.

# Bitcoin Monetary Inflation Schedule

This interactive chart visualizes the monetary inflation schedule used in Bitcoin.

The image below is a bitmap version of the original plot.ly chart. The chart is being hosted on Github Pages in order to avoid plot.ly’s 500-views-per-day limitation.

===

## Currency with Finite Supply

Block reward halving

Controlled supply

Bitcoins are created each time a user discovers a new block. The rate of block creation is adjusted every 2016 blocks to aim for a constant two week adjustment period (equivalent to 6 per hour.) The number of bitcoins generated per block is set to decrease geometrically, with a 50% reduction every 210,000 blocks, or approximately four years. The result is that the number of bitcoins in existence is not expected to exceed 21 million.[2] Speculated justifications for the unintuitive value “21 million” are that it matches a 4-year reward halving schedule; or the ultimate total number of Satoshis that will be mined is close to the maximum capacity of a 64-bit floating point number. Satoshi has never really justified or explained many of these constants.

This decreasing-supply algorithm was chosen because it approximates the rate at which commodities like gold are mined. Users who use their computers to perform calculations to try and discover a block are thus called Miners.

## Projected Bitcoins Short Term

This chart shows the number of bitcoins that will exist in the near future. The Year is a forecast and may be slightly off.

Date reached Block Reward Era BTC/block Year (estimate) Start BTC BTC Added End BTC BTC Increase End BTC % of Limit
2009-01-03 0 1 50.00 2009 0 2625000 2625000 infinite 12.500%
2010-04-22 52500 1 50.00 2010 2625000 2625000 5250000 100.00% 25.000%
2011-01-28 105000 1 50.00 2011* 5250000 2625000 7875000 50.00% 37.500%
2011-12-14 157500 1 50.00 2012 7875000 2625000 10500000 33.33% 50.000%
2012-11-28 210000 2 25.00 2013 10500000 1312500 11812500 12.50% 56.250%
2013-10-09 262500 2 25.00 2014 11812500 1312500 13125000 11.11% 62.500%
2014-08-11 315000 2 25.00 2015 13125000 1312500 14437500 10.00% 68.750%
2015-07-29 367500 2 25.00 2016 14437500 1312500 15750000 9.09% 75.000%
2016-07-09 420000 3 12.50 2016 15750000 656250 16406250 4.17% 78.125%
2017-06-23 472500 3 12.50 2018 16406250 656250 17062500 4.00% 81.250%
525000 3 12.50 2019 17062500 656250 17718750 3.85% 84.375%
577500 3 12.50 2020 17718750 656250 18375000 3.70% 87.500%
630000 4 6.25 2021 18375000 328125 18703125 1.79% 89.063%
682500 4 6.25 2022 18703125 328125 19031250 1.75% 90.625%
735000 4 6.25 2023 19031250 328125 19359375 1.72% 92.188%
787500 4 6.25 2024 19359375 328125 19687500 1.69% 93.750%

* In Block 124724, user midnightmagic mined a solo block to himself which underpaid the reward by a single Satoshi and simultaneously destroyed the block’s fees. This the the only known reduction in the total mined supply of Bitcoin. Therefore, from block 124724 onwards, all total supply estimates must technically be reduced by 1 Satoshi.

## Projected Bitcoins Long Term

Supply timeline estimation

Because the number of bitcoins created each time a user discovers a new block – the block reward – is halved based on a fixed interval of blocks, and the time it takes on average to discover a block can vary based on mining power and the network difficulty, the exact time when the block reward is halved can vary as well. Consequently, the time the last Bitcoin will be created will also vary, and is subject to speculation based on assumptions.

If the mining power had remained constant since the first Bitcoin was mined, the last Bitcoin would have been mined somewhere near October 8th, 2140. Due to the mining power having increased overall over time, as of block 367,500 – assuming mining power remained constant from that block forward – the last Bitcoin will be mined on May 7th, 2140.

As it is very difficult to predict how mining power will evolve into the future – i.e. whether technological progress will continue to make hardware faster or whether mining will hit a a technological wall; or whether or not faster methods of SHA2 calculation will be discovered – putting an exact date or even year on this event is difficult.

The total number of bitcoins, as mentioned earlier, has an asymptote at 21 million, due to a technical limitation in the data structure of the blockchain – specifically the integer storage type of the transaction output, this exact value would have been 20,999,999.9769 bitcoin. Should this technical limitation be adjusted by changing the width of the field, the total number will still only approach or be a maximum of 21 million.

Block Reward Era BTC/block Start BTC BTC Added End BTC BTC Increase End BTC % of Limit
0 1 50.00000000 0.00000000 10500000.00000000 10500000.00000000* infinite 50.00000006%
210000 2 25.00000000 10500000.00000000 5250000.00000000 15750000.00000000 50.00000000% 75.00000008%
420000 3 12.50000000 15750000.00000000 2625000.00000000 18375000.00000000 16.66666667% 87.50000010%
630000 4 6.25000000 18375000.00000000 1312500.00000000 19687500.00000000 7.14285714% 93.75000010%
840000 5 3.12500000 19687500.00000000 656250.00000000 20343750.00000000 3.33333333% 96.87500011%
1050000 6 1.56250000 20343750.00000000 328125.00000000 20671875.00000000 1.61290323% 98.43750011%
1260000 7 0.78125000 20671875.00000000 164062.50000000 20835937.50000000 0.79365079% 99.21875011%
1470000 8 0.39062500 20835937.50000000 82031.25000000 20917968.75000000 0.39370079% 99.60937511%
1680000 9 0.19531250 20917968.75000000 41015.62500000 20958984.37500000 0.19607843% 99.80468761%
1890000 10 0.09765625 20958984.37500000 20507.81250000 20979492.18750000 0.09784736% 99.90234386%
2100000 11 0.04882812 20979492.18750000 10253.90520000 20989746.09270000 0.04887585% 99.95117198%
2310000 12 0.02441406 20989746.09270000 5126.95260000 20994873.04530000 0.02442599% 99.97558604%
2520000 13 0.01220703 20994873.04530000 2563.47630000 20997436.52160000 0.01221001% 99.98779307%
2730000 14 0.00610351 20997436.52160000 1281.73710000 20998718.25870000 0.00610426% 99.99389658%
2940000 15 0.00305175 20998718.25870000 640.86750000 20999359.12620000 0.00305194% 99.99694833%
3150000 16 0.00152587 20999359.12620000 320.43270000 20999679.55890000 0.00152592% 99.99847420%
3360000 17 0.00076293 20999679.55890000 160.21530000 20999839.77420000 0.00076294% 99.99923713%
3570000 18 0.00038146 20999839.77420000 80.10660000 20999919.88080000 0.00038146% 99.99961859%
3780000 19 0.00019073 20999919.88080000 40.05330000 20999959.93410000 0.00019073% 99.99980932%
3990000 20 0.00009536 20999959.93410000 20.02560000 20999979.95970000 0.00009536% 99.99990468%
4200000 21 0.00004768 20999979.95970000 10.01280000 20999989.97250000 0.00004768% 99.99995236%
4410000 22 0.00002384 20999989.97250000 5.00640000 20999994.97890000 0.00002384% 99.99997620%
4620000 23 0.00001192 20999994.97890000 2.50320000 20999997.48210000 0.00001192% 99.99998812%
4830000 24 0.00000596 20999997.48210000 1.25160000 20999998.73370000 0.00000596% 99.99999408%
5040000 25 0.00000298 20999998.73370000 0.62580000 20999999.35950000 0.00000298% 99.99999706%
5250000 26 0.00000149 20999999.35950000 0.31290000 20999999.67240000 0.00000149% 99.99999855%
5460000 27 0.00000074 20999999.67240000 0.15540000 20999999.82780000 0.00000074% 99.99999929%
5670000 28 0.00000037 20999999.82780000 0.07770000 20999999.90550000 0.00000037% 99.99999966%
5880000 29 0.00000018 20999999.90550000 0.03780000 20999999.94330000 0.00000018% 99.99999984%
6090000 30 0.00000009 20999999.94330000 0.01890000 20999999.96220000 0.00000009% 99.99999993%
6300000 31 0.00000004 20999999.96220000 0.00840000 20999999.97060000 0.00000004% 99.99999997%
6510000 32 0.00000002 20999999.97060000 0.00420000 20999999.97480000 0.00000002% 99.99999999%
6720000 33 0.00000001 20999999.97480000 0.00210000 20999999.97690000 0.00000001% 100.00000000%
6930000 34 0.00000000 20999999.97690000 0.00000000 20999999.97690000 0.00000000% 100.00000000%

Note: The number of bitcoins are presented in a floating point format. However, these values are based on the number of satoshi per block originally in integer format to prevent compounding error.

* In block 124724, user midnightmagic solo mined a block which caused one less Satoshi to be created than would otherwise have come into existence. Therefore, all calculations from this block onwards must now, to be accurate, include this underpay in total Bitcoins in existence.

=