1
0
mirror of https://github.com/bitcoinbook/bitcoinbook synced 2024-12-26 08:28:15 +00:00

link fix 2

This commit is contained in:
Andreas M. Antonopoulos 2013-09-06 19:28:22 -07:00
parent a1f430517b
commit ab3324fb07
2 changed files with 14 additions and 21 deletions

View File

@ -106,7 +106,7 @@ Symbols: B⃦, Ƀ, ฿
Currency Code: BTC (unofficial), XBT (possible ISO standard)
[[table_bitcoinunits]]
.Table of bitcoin units from bitcoin wiki (link:$$https://en.bitcoin.it/wiki/Units$$[])
.Table of bitcoin units from bitcoin wiki (https://en.bitcoin.it/wiki/Units)
[options="header"]
|=======
| Unit Name | Notation | Value
@ -182,7 +182,7 @@ The reference bitcoin software implementation, known as the _Satoshi Client_ and
There are many different implementations of bitcoin, from the front-end user interface to various libraries, servers and bitcoin network nodes.
The reference implementation of bitcoin, which combines a full bitcoin network node, a wallet and a user interface is known as the _Satoshi Client_, or also as its executable name +bitcoind+ on Unix-like systems and +bitcoin-qt+ for the graphical user interface component. The Satoshi client is maintained by a network of volunteers as an open source project hosted on Github link::$$https://github.com/bitcoin/bitcoin$$[].
The reference implementation of bitcoin, which combines a full bitcoin network node, a wallet and a user interface is known as the _Satoshi Client_, or also as its executable name +bitcoind+ on Unix-like systems and +bitcoin-qt+ for the graphical user interface component. The Satoshi client is maintained by a network of volunteers as an open source project hosted on Github https://github.com/bitcoin/bitcoin.
==== Full node client or lightweight client?
@ -203,7 +203,7 @@ For the purposes of following the examples in this book, we recommend you downlo
===== Reference Client (bitcoind, bitcoin-qt)
Versions for Windows, Mac, Linux and source code can be found at link::$$http://bitcoin.org/en/download$$[]
Versions for Windows, Mac, Linux and source code can be found at http://bitcoin.org/en/download
When you first run the bitcoin-qt application, it will start downloading the full blockchain, several gigabytes of data. It may take several days to fully synchronize the complete blockchain. During that time, the client will display "out of sync" next to balances and show "Synchronizing" in the footer.
@ -221,9 +221,9 @@ For more immediate use of the bitcoin software, try downloading a lightweight cl
On Android, you can find many bitcoin clients by searching for "bitcoin wallet" in the official application market. The most notable are:
* Andreas Shildbach's Android Bitcoin Wallet link::$$https://play.google.com/store/apps/details?id=de.schildbach.wallet$$[]
* Mycelium light-weight node link::$$https://play.google.com/store/apps/details?id=com.mycelium.wallet$$[]
* Blockchain.info hybrid web/mobile wallet link::$$https://play.google.com/store/apps/details?id=piuk.blockchain.android$$[]
* Andreas Shildbach's Android Bitcoin Wallet https://play.google.com/store/apps/details?id=de.schildbach.wallet
* Mycelium light-weight node https://play.google.com/store/apps/details?id=com.mycelium.wallet$$[]
* Blockchain.info hybrid web/mobile wallet https://play.google.com/store/apps/details?id=piuk.blockchain.android
Due to restrictions by Apple, there are no wallet applications for iOS. However, you can use web wallets in your iOS browser.
@ -257,7 +257,7 @@ Public-key cryptography, or assymetric cryptography, is a key part of a crypto-c
In a nutshell, public-key cryptography is like a digital padlock, which can only be opened by the owner of a secret key. The owner of that key can hand out as many copies of the padlock as they want, and others can use it to "lock" bitcoins inside transactions recorded on the blockchain. Only the owner of the key can then unlock and "redeem" these transactions, as only they can open the digital padlock.
In more specific terms, bitcoin uses Elliptic Curve Cryptography (ECC) on the secp256k1 curve, defined by link::$$http://www.secg.org/index.php?action=secg,docs_secg$$[SEC 2: Recommended Elliptic Curve Domain Parameters version 2.0]. The name secp256k1 indicates a curve whose points are a prime field, with a 256-bit prime and the k indicating a Koblitz curve variant.
In more specific terms, bitcoin uses Elliptic Curve Cryptography (ECC) on the secp256k1 curve, defined by http://www.secg.org/index.php?action=secg,docs_secg[SEC 2: Recommended Elliptic Curve Domain Parameters version 2.0]. The name secp256k1 indicates a curve whose points are a prime field, with a 256-bit prime and the k indicating a Koblitz curve variant.
The end-user, or the wallet application they are using, will generate a new key-pair using a random seed. The key pair consists of a secret part the _private key_ and a public part, the _public key_.
@ -276,7 +276,7 @@ Bitcoin is more than just a currency, it is also the payment network that carrie
The bitcoin network is a peer-to-peer network, which is formed by all the bitcoin clients that are running a full-node client. At any moment, the bitcoin network can range in size anywhere from a tens of thousands to hundreds of thousands of nodes. Only a tiny subset of those is required to operate, but good network propagation and distribution ensures resillience and survivability of the overall bitcoin network.
You can see a graphical representation of the nodes seen on the bitcoin network by visiting a popular chart on blockchain.info link::$$https://blockchain.info/nodes-globe$$[]
You can see a graphical representation of the nodes seen on the bitcoin network by visiting a popular chart on blockchain.info https://blockchain.info/nodes-globe$$[]
In the bitcoin peer-to-peer network, the nodes are much more sophisticated than most p2p networks. All nodes can validate the basic information inside a block for themselves and confirm the transactions. A full-node client can independently confirm each and every bitcoin in every transaction, in an unbroken chain all the way back to it's genesis in a newly minted block. The network therefore plays a subordinate role. It propagates transactions, but those transactions are independently verified by the nodes. The network is not trusted per-se, as each node does not depend on any third-party for trust. Instead, the network facilitates the propagation of blocks so that nodes that are mining can create new blocks and all nodes can verify them.

View File

@ -42,21 +42,18 @@ image::images/ecc-addition.png["Addition operator on points of an elliptic curve
Bitcoin specifically uses the +secp256k1+ elliptic curve:
[latexmath]
.The secp256k1 elliptic curve equation
++++
\begin{equation}
{y^2 = (x^3 + 7)} over \mathbb{F}_p
{y^2 = (x^3 + 7)} \over \mathbb{F}_p
\end{equation}
++++
or
[latexmath]
++++
\begin{equation}
{y^2 \mod p = (x^3 + 7) \mod p}
\end{equation}
++++
where +p = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFC2F+, a very large prime.
@ -82,14 +79,12 @@ The bitcoin private key is just a number. A public key can be generated from any
.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"]
Once a private key has been generated, the public key equivalent can be derived from it using the elliptic curve multiplication function. Many software implementations of bitcoin use the OpenSSL library, specifically the Elliptic Curve (link::$$https://www.openssl.org/docs/crypto/ec.html#$$[] library and supporting utilities.
Once a private key has been generated, the public key equivalent can be derived from it using the elliptic curve multiplication function. Many software implementations of bitcoin use the OpenSSL library, specifically the https://www.openssl.org/docs/crypto/ec.html[Elliptic Curve library].
Here's an example from the reference implementation, generating a public key from an existing private key
[[genesis_block_cpp]]
.The Genesis Block, statically encoded in the source code of the reference client
link::$$https://github.com/bitcoin/bitcoin/blob/0.8.4/src/key.cpp#L31$$[
bitcoin / src / key.cpp : 31 ]
.The Genesis Block, statically encoded in the source code of the reference client https://github.com/bitcoin/bitcoin/blob/0.8.4/src/key.cpp#L31[bitcoin/src/key.cpp : 31]
====
[source, c++]
----
@ -162,8 +157,7 @@ https://blockexplorer.com/b/0
[[genesis_block_cpp]]
.The Genesis Block, statically encoded in the source code of the reference client
link::$$https://github.com/bitcoin/bitcoin/blob/master/src/chainparams.cpp#L120$$[bitcoin/src/chainparams.cpp:line 120]
.The Genesis Block, statically encoded in the source code of the reference client https://github.com/bitcoin/bitcoin/blob/master/src/chainparams.cpp#L120[bitcoin/src/chainparams.cpp:line 120]
====
[source, c++]
----
@ -202,7 +196,6 @@ With SHA-256, the output is always 256 bits long, regardless of the size of the
[[sha256_example1]]
.SHA256 Example
====
++++
$ python
Python 2.7.1 (r271:86832, Jul 31 2011, 19:30:53)
@ -214,7 +207,7 @@ Type "help", "copyright", "credits" or "license" for more information.
5d7c7ba21cbbcd75d14800b100252d5b428e5b1213d27c385bc141ca6b47989e
++++
====
The example shows that if we calculate the hash of the phrase +"I am Satoshi Nakamoto"+, it will produce +5d7c7ba21cbbcd75d14800b100252d5b428e5b1213d27c385bc141ca6b47989e+. This 256-bit number is the _hash_ or _digest_ of the phrase and depends on every part of the phrase. Adding a single letter, punctuation mark or any character will produce a different hash.