mirror of
https://github.com/bitcoinbook/bitcoinbook
synced 2024-11-29 03:18:33 +00:00
fixes
This commit is contained in:
parent
dd464b28f5
commit
a1f430517b
@ -135,11 +135,11 @@ People can pay for goods and services using bitcoin as the currency. mg
|
|||||||
Bitcoin transactions, which transfer value from one bitcoin address to another, are recorded in a distributed ledger, called the _blockchain_. In simple terms, think of the ledger as a book with lines like this:
|
Bitcoin transactions, which transfer value from one bitcoin address to another, are recorded in a distributed ledger, called the _blockchain_. In simple terms, think of the ledger as a book with lines like this:
|
||||||
|
|
||||||
----
|
----
|
||||||
Address 27 gave 2 bitcoin to address 81
|
- Address 27 gave 2 bitcoin to address 81
|
||||||
Address 132 gave 1.05 bitcoin to address 22
|
- Address 132 gave 1.05 bitcoin to address 22
|
||||||
25 bitcoin were mined to address 76
|
- 25 bitcoin were mined to address 76
|
||||||
Address 13 gave 0.5 bitcoin to address 52
|
- Address 13 gave 0.5 bitcoin to address 52
|
||||||
Address 52 gave 0.015 bitcoin to address 166
|
- Address 52 gave 0.015 bitcoin to address 166
|
||||||
----
|
----
|
||||||
|
|
||||||
The ledger is a record of all bitcoin transactions and can be independently verified by every node.
|
The ledger is a record of all bitcoin transactions and can be independently verified by every node.
|
||||||
|
@ -39,32 +39,33 @@ Elliptic curve multiplication can be visualized on a curve as drawing a line con
|
|||||||
.Elliptic Curve Cryptography: Visualizing the addition operator on the points of an elliptic curve
|
.Elliptic Curve Cryptography: Visualizing the addition operator on the points of an elliptic curve
|
||||||
image::images/ecc-addition.png["Addition operator on points of an elliptic curve"]
|
image::images/ecc-addition.png["Addition operator on points of an elliptic curve"]
|
||||||
|
|
||||||
Bitcoin specifically uses the +secp256k1+ elliptic curve which is a standardized curve on a group field of large prime order:
|
Bitcoin specifically uses the +secp256k1+ elliptic curve:
|
||||||
|
|
||||||
[latexmath]
|
[latexmath]
|
||||||
++++
|
++++
|
||||||
\begin{equation}
|
\begin{equation}
|
||||||
{y^2 = (x^3 + 7)} over \mathbb{F}_p
|
{y^2 = (x^3 + 7)} over \mathbb{F}_p
|
||||||
|
\end{equation}
|
||||||
|
++++
|
||||||
|
|
||||||
or
|
or
|
||||||
|
|
||||||
|
[latexmath]
|
||||||
|
++++
|
||||||
|
\begin{equation}
|
||||||
{y^2 \mod p = (x^3 + 7) \mod p}
|
{y^2 \mod p = (x^3 + 7) \mod p}
|
||||||
|
|
||||||
where p = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFC2F, a very large prime.
|
|
||||||
|
|
||||||
\end{equation}
|
\end{equation}
|
||||||
++++
|
++++
|
||||||
|
|
||||||
|
where +p = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFC2F+, a very large prime.
|
||||||
|
|
||||||
|
|
||||||
The +mod p+ indicates that this curve is over a finite field of prime order +p+, also written as F(p). The curve looks like a pattern of dots scattered in two dimensions, which makes it difficult to visualize. However, the math is identical as that of an elliptic curve over the real numbers shown above.
|
The +mod p+ indicates that this curve is over a finite field of prime order +p+, also written as F(p). The curve looks like a pattern of dots scattered in two dimensions, which makes it difficult to visualize. However, the math is identical as that of an elliptic curve over the real numbers shown above.
|
||||||
|
|
||||||
[[ecc-over-F37-math]]
|
[[ecc-over-F37-math]]
|
||||||
.Elliptic Curve Cryptography: Visualizing the addition operator on the points of an elliptic curve over F(p)
|
.Elliptic Curve Cryptography: Visualizing the addition operator on the points of an elliptic curve over F(p)
|
||||||
image::images/ecc-over-F37-math.png["Addition operator on points of an elliptic curve over F(p)"]
|
image::images/ecc-over-F37-math.png["Addition operator on points of an elliptic curve over F(p)"]
|
||||||
|
|
||||||
[TIP]
|
|
||||||
====
|
|
||||||
The bitcoin private key is just a number. A public key can be generated from any private key. Therefore, a public key can be generated from any number, up to 256-bits long. You can pick your keys randomly using a method as simple as dice, pencil and paper.
|
|
||||||
====
|
|
||||||
|
|
||||||
==== Generating bitcoin keys
|
==== Generating bitcoin keys
|
||||||
|
|
||||||
@ -72,10 +73,11 @@ The first and most important step in generating keys is to find a secure source
|
|||||||
|
|
||||||
[TIP]
|
[TIP]
|
||||||
====
|
====
|
||||||
The size of bitcoin's private key, 2^256^ is a truly unfathomable number. It is equal to approximately 10^77^ in decimal. The visible universe contains approximately 10^80^ atoms.
|
The bitcoin private key is just a number. A public key can be generated from any private key. Therefore, a public key can be generated from any number, up to 256-bits long. You can pick your keys randomly using a method as simple as dice, pencil and paper.
|
||||||
====
|
====
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[[privkey_gen]]
|
[[privkey_gen]]
|
||||||
.Private key generation: From random mouse movements to a 256-bit number used as the private key
|
.Private key generation: From random mouse movements to a 256-bit number used as the private key
|
||||||
image::images/privkey-gen.png["Private key generation"]
|
image::images/privkey-gen.png["Private key generation"]
|
||||||
@ -138,7 +140,10 @@ err:
|
|||||||
<1> Multiplying the priv_key by the generator point of the elliptic curve group, produces the pub_key
|
<1> Multiplying the priv_key by the generator point of the elliptic curve group, produces the pub_key
|
||||||
====
|
====
|
||||||
|
|
||||||
|
[TIP]
|
||||||
|
====
|
||||||
|
The size of bitcoin's private key, 2^256^ is a truly unfathomable number. It is equal to approximately 10^77^ in decimal. The visible universe contains approximately 10^80^ atoms.
|
||||||
|
====
|
||||||
|
|
||||||
|
|
||||||
=== Simple Transactions
|
=== Simple Transactions
|
||||||
|
Loading…
Reference in New Issue
Block a user