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

282 Commits

Author SHA1 Message Date
David A. Harding
491891fdaa CH05-06: edits for Murchandamus feedback
- Explicitly describe what BIPs are before we start dropping references
  to them.

- Mention that addresses don't encode a message, so using a unique
  address that the receiver has privately associated with a spender is
  the only guaranteed way to identify payments from that spender.

- Correct how many blocks need to elapse before an output can be spent
  by an input with a relative lock time.

- Many other small edits.
2023-08-01 07:34:58 -10:00
David A. Harding
1a27ee296e CH07: Add MAST, P2C, scriptless multisignature, taproot, tapscript 2023-03-30 14:01:06 -10:00
David A. Harding
fc1de7cf2d CH05: edits suggested by arufino (thanks!) 2023-03-05 11:40:16 -10:00
David A. Harding
f3689a028a Update cross-references 2023-03-05 11:05:36 -10:00
David A. Harding
99a41afdb1 CH05::Implementation details: edits
Edits to the implementation details section to conform to updated
language (wallet->wallet application/database, hardware wallet->hardware
signing device, mnemonic->recovery code) and also to update some
descriptions.
2023-02-17 22:32:19 -10:00
David A. Harding
5ded97927a CH05::Tech details: new section name & intro
Previously this section described all the "best practices" technologies
in detail.  We dropped the best practices section, since there are
multiple valid alternatives, so we need to describe now why we're only
focusing on a subset of the available technologies.
2023-02-17 22:32:19 -10:00
David A. Harding
1f55e04eb0 CH05::xpubs: warn about the gap limit 2023-02-17 22:32:19 -10:00
David A. Harding
331cb5a14a CH05::seeds: explain why entroy is 128/256/512 bits
I think it's probably confusing to people learning about this to see
that BIP32 takes up to 512 bits of entropy, BIP39 accepts up to 256
bits, and Aezeed uses 128 bits, not to mention all the other possible
combinations.  This commit adds a sidebar explaining why you can't get
any better than 256 and that 128 is probably appropriate.
2023-02-17 22:32:19 -10:00
David A. Harding
305a205437 CH05::key stretching: clarify that BIP39 key stretching adds little security 2023-02-17 22:32:19 -10:00
David A. Harding
0605638d38 CH05::remove web-based BIP39 generator/editor
Even in the hands of an expert, the security of these things is dubious.
When used by a novice, there's a pretty high chance of them leaking or
breaking their keys.
2023-02-17 22:32:19 -10:00
David A. Harding
eb7164212e CH05::best practices/using wallet: remove these sections
The previous version of this chapter focused on a single set of
technologies: BIP32 HD wallets, BIP39 seeds, and BIP43/44 paths.  The
previous Best Practices section described these as a de facto standard.

In the rewrite of this chapter, we've introduced several alternatives
for BIP39 seeds and BIP43/44 paths, all of which are good practices.  I
have my opinions about what might best, but I think it's entirely
possible for a reasonable person to conclude one of the other choices is
best, so we remove that section.

The Using A Wallet section was redundant; we've already introduce all of
those concepts.
2023-02-17 22:32:19 -10:00
David A. Harding
c82128839a CH05::HD derivation: extended keys
Previous text said that extended keys were 512 bit concatenations, but
BIP32 includes extra data, including the depth, fingerprint, child
number, and a null byte for private keys.  Update to be less precise but
more accurate.
2023-02-17 22:32:19 -10:00
David A. Harding
960f16645f CH05: add section about backing up path information
- Previously this chapter recommended using the BIP43/44 family of
  implicit paths.  New text starts with an introduction to why path
  information is necessary (thsi was previously at teh end of the
  chapter) and then uses that to describe the two modern ways of dealing
  with paths:

    - Implicit paths, e.g. BIP43/44

    - Expilict paths, e.g. output script descriptors
2023-02-17 22:32:19 -10:00
David A. Harding
a69a1246f1 CH05: add section about backing up non-key data
An often-overlooked backup concern among both wallet developers and
users is labels, which can't be restored from an HD seed.  Also,
wallets for LN and other contract protocols may have additional data
they need to recover all funds.  Mention these concerns and describe the
method used by several wallets (including LND) of encrypting wallet data
to one of the wallet's BIP32-derived keys.
2023-02-17 22:32:19 -10:00
David A. Harding
184ff4d73b CH05::mnemonics: rename and expand
- Rename from Seeds and Mnemonic Codes (BIP39) to Seeds and Recovery Codes

- Describe several notable alternatives to BIP39 and how they improve
  upon it, such as Electrum v2, Aezeed, Muun, and SLIP39.

- Provide a sidebar that goes into detail about recovery code
  passphrases, discussing the tradeoffs related to plausible
  deniability.
2023-02-17 22:32:19 -10:00
David A. Harding
ab15f629a1 CH05::hd wallets: rename and moderately edit
- Rename to HD Key Generation to avoid confusing use of the term
  "wallet"

- Remove detail that's now redundant thanks to the introduction of the
  newly added previous sections.

- Lightly edit the rest.
2023-02-17 22:32:19 -10:00
David A. Harding
40fd08c4b4 CH05::HD wallets: add section for public child key derivation
As we rewrite the opening of the chapter to introduce HD wallets in
stages, this introduces the penultimate part: the ability to create
derived public keys without access to the corresponding private keys.
2023-02-17 22:32:19 -10:00
David A. Harding
d6e05eeaae CH05::determistic key generation:revise
- Use updated terminology introduced in previous commits.

- Provide a very simple example of deterministic key generation.

- Tease the next section.
2023-02-17 22:32:19 -10:00
David A. Harding
0213feb9ce CH05::overview: reduce material about JBOK wallets
There are no modern wallets applications which use
independently-generated keys, except when providing backwards
compatibility, so we reduce the amount of text devoted to this
concept.

We also begin trying to be consistent about using the terms "wallet
application" and "wallet database" it disambiguate the term "wallet".
2023-02-17 22:32:19 -10:00
David A. Harding
ab30a5f0a2 CH05::Intro: re-title and re-introduce
- Retitle from "wallets" to "wallet recovery".  The existing chapter is
  entirely about generating keys in a way that can be recovered after a
  data loss.  I worry that calling this chapter "wallets" results in ignoring
  many other aspects of wallet design, such as how they scan for
  transactions (important for privacy) and how they sign (important for
  security and wallet interoperation).

- Re-introduce the chapter, given the changed name.
2023-02-17 22:32:19 -10:00
David A. Harding
24b31b369e CH05::style: s/BIP-/BIP/ for compatibility with many modern docs 2023-02-17 22:18:34 -10:00
David A. Harding
22c7060518 CH05: reflow text so that future diffs will be more readable 2023-02-17 22:18:34 -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
rating89us
92f81f9000 ch05: use Trezor Suite to export xpub 2022-01-07 15:49:58 +01:00
lilac-ss
b28ec7d769
Fix typo in chapter 5 ("intially" => "initially") 2022-01-02 00:17:54 +09:00
Andreas M. Antonopoulos
a3229bbbc0 bitcoin/Bitcoin capitalization changed everywhere 2021-10-25 23:51:17 +02:00
Will Binns
696019bd29
Merge pull request #922 from tkuye/develop
Update ch05.asciidoc
2021-05-29 22:47:07 +01:00
Tosin
fc2015c28c
Update ch05.asciidoc
fixed minor grammatical error
2021-04-13 01:35:31 -06:00
rating89us
5dea2ac63b
ch05: fix typo (hierarchical); rewording gap limit explanation 2021-04-09 19:19:06 +02:00
Will Binns
0278ed96fe
Merge pull request #894 from krupawan5618/patch-7
Ch. 05 - A Tip Box that details sufficiency of 12 words for mnemonic phrase  generation
2021-04-08 12:46:00 +02:00
Will Binns
2adc107f54
Merge pull request #904 from raulsiles/patch-1
Replace seed by a more appropriate term in some occurrences
2021-04-08 12:43:02 +02:00
krupawan5618
0aec869040
Update ch05.asciidoc 2021-04-08 06:20:07 -04:00
Raul Siles
3d499e621c
Replace seed by a most appropriate term in some occurrences
- Replace 'seed' by 'random sequence' twice, as using the term 'seed' to refer to the initial random sequence or value encoded by the mnemonic words is confusing, as these mnemonic words are later on used to derive the real 512-bit seed.
- Introduced the term "initial seed" to clarify that the "mnemonic" random sequence (entropy) can be considered, in fact, a seed, but to avoid confusion with the root seed, or seed, used later.
- Replace 'seed' by 'mnemonic code' twice, when covering the optional passphrase in BIP-39, as the mnemonic code plus the optional passphrase is what produces the seed. It is confusing if the term seed is used to refer to the initial entropy, rather than the 512-bit seed.
- All these modifications have been carefully evaluated to minimise the number of changes and leave the original usage of the (root) seed.
2021-04-03 23:02:08 +02:00
krupawan5618
a196ec0170
Update ch05.asciidoc 2021-03-29 10:40:04 -04:00
krupawan5618
f3b15fa715
Update ch05.asciidoc 2021-03-28 16:25:55 -04:00
krupawan5618
fc37c08bd0
Update ch05.asciidoc 2021-03-28 16:06:22 -04:00
krupawan5618
3c1f4f2e8b
ch05 - Address the Gap Limit and Account discovery
Detailed how BTCPay server manages generation of public keys using the xpub and how the gap limit is used to import a wallet, as detailed in BIP-44.
2021-03-28 16:04:40 -04:00
krupawan5618
a87fbfb693
Update ch05.asciidoc
Addressing the gap limit
2021-03-28 15:56:46 -04:00
krupawan5618
ee26183329
Update ch05.asciidoc 2021-03-28 14:39:08 -04:00
krupawan5618
d630f26de6
A Tip Box that details sufficiency of 12 words
Tip box regarding 12 words being sufficient entropy to the production of an HD wallet.
2021-03-28 14:35:09 -04:00
Will Binns
3f8789f8cb
Merge pull request #866 from krupawan5618/patch-2
ch01: Removed Mycelium and replaced with Bluewallet
2021-03-11 08:49:51 +01:00
Will Binns
8d55f0759a
ch05: Don't use web pages to generate mnemonics
Due to the recent controversy regarding bitcoinpaperwallet.com,
recommending we don't even point people to places where they can use
webpages to generate private keys and/or mnemonics.
2021-03-11 08:35:40 +01:00
Will Binns
97fc0ed895
ch05: Revise wording regarding derivation
Closes #552
2021-03-10 09:08:36 +01:00
Will Binns
cda3029400
ch05: s/Mycelium Gear/BTCPay Server/ 2021-03-09 10:36:59 +01:00
Will Binns
ec6887c389
ch05: Fix redirected link 2021-03-09 10:29:28 +01:00
krupawan5618
a344ffb053
Update ch05.asciidoc
Replacing mycelium with Bluewallet.
2021-03-08 14:49:15 -05:00
Will Binns
72abc050e1
Merge pull request #803 from rating89us/patch-1
ch05: Keepkey -> KeepKey
2021-03-04 20:09:51 +01:00
Will Binns
a1990f0606
Merge pull request #805 from rating89us/patch-4
ch05: detailing HD wallet path example
2021-03-04 19:06:40 +01:00
rating89us
8fbe66c494
ch05: detailing HD wallet path example 2021-02-22 14:23:22 +01:00
rating89us
4035aa00fc
ch05: add key and (non-hardened) 2021-02-22 13:53:43 +01:00