1
0
mirror of https://github.com/bitcoinbook/bitcoinbook synced 2024-11-23 00:28:14 +00:00
Commit Graph

430 Commits

Author SHA1 Message Date
David A. Harding
3a3d2181d4 CH04::headings, make various changes to improve logical hierarchy 2023-02-09 20:58:47 -10:00
David A. Harding
03259f9e60 CH04::privkeys: remove address function from here
We'll describe the commitment in the P2PKH section and base58check in
its section.
2023-02-09 20:58:47 -10:00
David A. Harding
1b4e3b7b2b CH04::pubkeys: remove repetitive text 2023-02-09 20:58:47 -10:00
David A. Harding
ceaa898888 CH04::pubkeys: move-only 2023-02-09 20:58:47 -10:00
David A. Harding
f11b3971d2 CH04::terminology: keys prove "control" of BTC, not "ownership" 2023-02-09 20:58:47 -10:00
David A. Harding
5fd0f159ca CH04::base58check: update info for later usage 2023-02-09 20:58:47 -10:00
David A. Harding
eeef3cdd34 CH04::dumpprivkey: remove
Remove text about dumping a private key:

- Example using Bitcoin Core is no longer supported for descriptor
  wallets.

- Dumping private keys is very bad practice with HD wallets due to risk
  of compromising the whole wallet.

- Because of safety risks, and lack of need, most modern wallets don't
  support private key export or import
2023-02-09 20:58:47 -10:00
David A. Harding
ca26228f58 CH04::privkeys: Hash digests aren't numbers
We just choose to interpet them that way
2023-02-09 20:58:47 -10:00
David A. Harding
bf46fef5bf CH04::privkeys: Add warning about generating from coinflips 2023-02-09 20:58:47 -10:00
David A. Harding
9de657b887 CH04::P2SH: describe collision attacks
This will be important for describing why RIPEMD160 isn't used for
segwit.
2023-02-09 20:58:47 -10:00
David A. Harding
206ee88a26 CH04::vanity addresses: update, drop code, clarify security/privacy
- Explain why almost nobody uses vanity addresses any more---HD wallets
  killed them, plus they suck for privacy.

- Remove example code.  It's only useful for base58check addresses, but
  those are no longer recommended and (as mentioned above) almost nobody
  uses vanity addresses any more, so there's not much point in updating
  it for bech32(m).

- Remove vanity address security section with unvetted security claims.

- Replace outdated claim about miners using GPUs.

- Remove specific amount for cost of vanity address pooling and URL for
  a pool.  That pool doesn't work, I don't know of any others, and I
  have no idea what the pricing would be even if there were existing
  pools.
2023-02-09 20:58:47 -10:00
David A. Harding
132094b670 CH04::legacy addresses: remove code examples
We instead provide an example for bech32 addresses, which are now the
preferred format.
2023-02-09 20:58:47 -10:00
David A. Harding
74c144bbf4 CH04::bech32 and bech32m: add new sections
- Briefly mention segwit and the need for new addresses.  Mention that
  getting wallets to a new base58check version would probably be only a
  little less work than upgrading to an entirely new address format.
  Describe the problems with base58check and the solutions provide by
  bech32.  Illustrate some of the problems and solutions.

- Describe the bech32 length extension issue and provide an example.

- Introduce bech32m as the solution to the lengith extension issue.

- Provide examples using the bech32m reference library for Python for
  encoding and decoding a bech32m address (mentioning the backwards
  compatibility with bech32 addresses).

- Ask wallet authors to ensure they support forward compatibility with
  future segwit versions.
2023-02-09 20:58:47 -10:00
David A. Harding
91eae20099 CH04::P2SH: remove multisig, describe p2sh rationale, give examples
- Start with a description of the problem that P2SH helps solve, the
  ability for the receiver to specify a script without having to
  communicate all the details of that script to the spender (and having
  the spender pay the tx fees for it).

- Mention that P2SH uses base58check.  Provide the prefix and continue
  using an existing example, but don't go into too much detail since
  bech32m addresses are now the preferred format
2023-02-09 20:58:47 -10:00
David A. Harding
708545a446 CH04::P2SH: move only
Put it after base58check in the history of addresses, rather than in the
advanced addresses section at the end.
2023-02-09 20:58:47 -10:00
David A. Harding
8c5b2fd291 CH04::privkey formats: add sidebar about format relevancy
Most software today doesn't export or import private keys, so add a
sidebar noting that this section is mainly for historical reasons.
2023-02-09 20:58:47 -10:00
David A. Harding
bdf31e90af CH04::private key formats: move-only 2023-02-09 20:58:47 -10:00
David A. Harding
1ddec1538e CH04::encrypted private keys: drop
These were always a bad idea and they've been superceded both in
theory and in practice by HD wallets.
2023-02-09 20:58:47 -10:00
David A. Harding
915b961d41 CH04::compressed pubkeys: merge with "pubkey formats"
This reduces repitive text, provides a better introducion to compressed
pubkeys, and updates adoption claims.
2023-02-09 20:58:47 -10:00
David A. Harding
e4c8d67956 CH04: Drop section about hex to base58check
This is extraneous information.  Any programmer who understands how to
create a base58check address can convert to it, or from it, using any
byte encoding supported by their programming language or one of its
libraries.
2023-02-09 20:58:47 -10:00
David A. Harding
97ba0810c1 CH04: added sectios for spk/ss, P2PK, and P2PKH
- A section for scriptPubKey and scriptSig allow us to explain how the
  hashes for P2PKH work.

- A section for P2PK allows us to connect P2PKH payments to the original
  Bitcoin paper and help us understand the underlying use of pubkeys and
  signatures

- A section on P2PKH explains why we use a hash commitment (to save
  space) and allows us to separate base58check (and addresses in
  general) from scripts.  It also helps set up a later section for P2SH.
2023-02-09 20:58:47 -10:00
David A. Harding
e5e465c4b0 CH04::paper wallets: update terminology
s/mnemonic/recovery code/
s/hardware wallet/hardware signing device/
2023-02-09 20:58:47 -10:00
David A. Harding
8e879b658a CH04::ecc: Replace OpenSSL callout with libsecp256k1 2023-02-09 20:58:47 -10:00
David A. Harding
64e9c3d7a7 CH04::privkeys: drop note about human-generated randomness
This was probaby the case on some JS-based private key websites, or when
using something like GPG, but it's unlikely to be the case on any modern
production software.
2023-02-09 20:58:47 -10:00
David A. Harding
a906f0735f CH04::privkeys: update for HD wallets
- Previously said privkeys were numbers picked at random.  Updated to
  say "derived from numbers picked at random".
2023-02-09 20:58:47 -10:00
David A. Harding
94f864cda4 CH04::intro: retitle and replace intro
- Introduce the problem keys solve (pseudonymonous encumbrance and
  satisfaction) and tell the user that we'll build up to addresses
2023-02-09 20:58:47 -10:00
David A. Harding
c604a1650a CH04: reflow text so that future diffs will be more readable 2023-02-09 20:58:47 -10:00
David A. Harding
2f0d7d8c3a Revert CC-BY-SA material added since the second edition
The commit ab5ae32bae is the last commit
for the second edition, so all changes since then are dropped except for
several commits for the third edition authored by Andreas Antonopoulos.

No attempt is made to remove CC-BY-SA or other licensed content present
in the already-published first or second editions.

This revert may itself be reverted for versions of the book published
under CC-BY-SA.
2023-02-01 06:31:10 -10:00
Andreas M. Antonopoulos
a3229bbbc0 bitcoin/Bitcoin capitalization changed everywhere 2021-10-25 23:51:17 +02:00
Will Binns
8d85a09ea9
Merge pull request #926 from RunesReader/fix_ch_04
Swapped public key to address
2021-07-25 10:26:38 +02:00
Igor Arsenkin
626e5f8e1e Swapped public key to address 2021-04-30 16:59:20 +03:00
Dan Raviv
35b9de0cb4 Replace http scheme with https where appropriate 2021-04-10 10:51:03 +03:00
Will Binns
b9a5fdb605
Merge pull request #825 from rating89us/patch-38
ch04: add missing line break
2021-03-04 19:37:54 +01:00
Will Binns
50f36c4943
Merge pull request #818 from krupawan5618/patch-2
Update ch04.asciidoc - consistency with hexadecimal and bytes
2021-03-04 19:28:29 +01:00
Will Binns
4a469266ee
Merge pull request #817 from vasild/fix_vertical_line_vs_tangent
ch04: the line through (x,y) and (x,-y) is not "tangent"
2021-03-04 19:25:03 +01:00
Will Binns
ff5e3fddb8
Merge pull request #816 from krupawan5618/patch-1
Update ch04.asciidoc - added "8G"
2021-03-04 19:23:50 +01:00
Will Binns
f54b6736c0
Merge pull request #743 from syncom/syncom/ch04-suggest-a-more-appropriate-xref
chp04: xref <<vanity_minor_code>> seems better for note on std:random…
2021-03-04 18:54:51 +01:00
rating89us
485fc5b5ad
ch04: add missing line break 2021-02-26 16:32:54 +01:00
Andreas M. Antonopoulos
07da92ac95 Paper wallet warning and removal of bitcoinpaperwallet.com 2021-02-25 09:23:46 -06:00
krupawan5618
29455e4657
Update ch04.asciidoc
Values changed to hexadecimal and bytes to maintain consistency with concurrent graphs and images.
2021-02-25 02:07:02 -05:00
Vasil Dimov
821580d2c7
ch04: the line through (x,y) and (x,-y) is not "tangent"
On the elliptic curve, a line that goes through two different points
with the same `x` coordinates, but different `y` coordinates (they must
be `y` and `-y`) is not "tangent".
2021-02-25 07:23:18 +01:00
krupawan5618
608c0c0318
Update ch04.asciidoc
Added 8G for completeness and as depicted by image.
2021-02-24 20:45:50 -05:00
Will Binns
363030efb5
Merge pull request #800 from rating89us/patch-35
ch04: Base-58 -> Base58
2021-02-20 21:46:55 +00:00
Will Binns
fe1c8ab907
Merge pull request #797 from rating89us/patch-36
ch04: add "web, desktop, or mobile" wallet
2021-02-20 21:45:30 +00:00
Will Binns
2cacfc186a
Merge pull request #753 from rating89us/patch-13
ch04: sentence is about vanity pool, not pools in general
2021-02-20 18:40:51 +00:00
Will Binns
835c964fb9
Merge pull request #756 from rating89us/patch-16
ch04: add . to end sentence
2021-02-20 18:38:00 +00:00
rating89us
4306ebdb6e
ch04: Base-58 -> Base58 2021-02-20 17:30:11 +01:00
rating89us
57eaed3c52 ch04: add "web, desktop, or mobile" wallet 2021-02-20 15:32:05 +01:00
Will Binns
9a8224e0cc
Merge pull request #768 from Matthiti/ch04-period-in-quote
Chapter 4: put period outside of quote marks.
2021-02-20 13:41:13 +00:00
Will Binns
2ca87a4e5c
Merge pull request #772 from ffilozov/ch04_fix1
Rewording phrase to be consistent with earlier phrasing
2021-02-20 13:25:38 +00:00