From 8b7bbbc6af044818ab3a435166e09c4216aa2d4f Mon Sep 17 00:00:00 2001 From: Trent Nelson Date: Thu, 19 Dec 2019 20:59:07 -0500 Subject: [PATCH] Streamline paper wallet pubkey verification docs (#7570) * Book: Move paper wallet keypair docs to usage page * Book: Remove dedicated paper wallet keypair docs * Nudge our reader. Be extra clear * Clarify `--skip-seed-phrase-validation` argument rationale --- book/src/SUMMARY.md | 1 - book/src/paper-wallet/README.md | 2 - book/src/paper-wallet/keypair.md | 74 --------------------------- book/src/paper-wallet/usage.md | 88 ++++++++++++++++++++++++++++++-- 4 files changed, 84 insertions(+), 81 deletions(-) delete mode 100644 book/src/paper-wallet/keypair.md diff --git a/book/src/SUMMARY.md b/book/src/SUMMARY.md index c6f12b60e9..123b208950 100644 --- a/book/src/SUMMARY.md +++ b/book/src/SUMMARY.md @@ -37,7 +37,6 @@ * [Running an Archiver](running-archiver.md) * [Paper Wallet](paper-wallet/README.md) * [Installation](paper-wallet/installation.md) - * [Creating and Using a Seed Phrase](paper-wallet/keypair.md) * [Paper Wallet Usage](paper-wallet/usage.md) * [API Reference](api-reference/README.md) * [Transaction](api-reference/transaction-api.md) diff --git a/book/src/paper-wallet/README.md b/book/src/paper-wallet/README.md index 8a115a7cb5..1b5a1022b2 100644 --- a/book/src/paper-wallet/README.md +++ b/book/src/paper-wallet/README.md @@ -19,6 +19,4 @@ To learn more about the BIP39 standard, visit the Bitcoin BIPs Github repository {% page-ref page="installation.md" %} -{% page-ref page="keypair.md" %} - {% page-ref page="usage.md" %} diff --git a/book/src/paper-wallet/keypair.md b/book/src/paper-wallet/keypair.md deleted file mode 100644 index bfe72d0dc0..0000000000 --- a/book/src/paper-wallet/keypair.md +++ /dev/null @@ -1,74 +0,0 @@ -# Creating a Paper Wallet - -Using the `solana-keygen` tool, it is possible to generate new seed phrases as -well as derive a keypair from an existing seed phrase and (optional) passphrase. -The seed phrase and passphrase can be used together as a paper wallet. As long -as you keep your seed phrase and passphrase stored safely, you can use them to -access your account. - -{% hint style="info" %} -For more information about how seed phrases work, review this -[Bitcoin Wiki page](https://en.bitcoin.it/wiki/Seed_phrase). -{% endhint %} - -## Seed Phrase Generation - -Generating a new keypair can be done using the `solana-keygen new` command. The -command will generate a random seed phrase, ask you to enter an optional -passphrase, and then will display the derived public key and the generated seed -phrase for your paper wallet. - -```bash -solana-keygen new --no-outfile -``` - -{% hint style="warning" %} -If the `--no-outfile` flag is **omitted**, the default behavior is to write the -keypair to `~/.config/solana/id.json` -{% endhint %} - -{% hint style="info" %} -For added security, increase the seed phrase word count using the `--word-count` -argument -{% endhint %} - -For full usage details run: - -```bash -solana-keygen new --help -``` - -## Public Key Derivation - -Public keys can be derived from a seed phrase and a passphrase if you choose to -use one. This is useful for using an offline-generated seed phrase to -derive a valid public key. The `solana-keygen pubkey` command will walk you -through entering your seed phrase and a passphrase if you chose to use one. - -```bash -solana-keygen pubkey ASK -``` - -{% hint style="info" %} -Note that you could potentially use different passphrases for the same seed -phrase. Each unique passphrase will yield a different keypair. -{% endhint %} - -The `solana-keygen` tool assumes the use of the BIP39 standard English word -list. If you chose to deviate from the word list or used a different language -for your seed phrase, you can still derive a valid public key but will need to -explicitly skip seed phrase validation. - -```bash -solana-keygen pubkey ASK --skip-seed-phrase-validation -``` - -{% hint style="info" %} -Copy the derived public key to a USB stick for easy usage on networked computers -{% endhint %} - -For full usage details run: - -```bash -solana-keygen pubkey --help -``` diff --git a/book/src/paper-wallet/usage.md b/book/src/paper-wallet/usage.md index 66c7973e17..87c76e952b 100644 --- a/book/src/paper-wallet/usage.md +++ b/book/src/paper-wallet/usage.md @@ -10,13 +10,93 @@ written to disk by unencrypted memory swaps. It is the user's responsibility to protect against this scenario. {% endhint %} +## Creating a Paper Wallet + +Using the `solana-keygen` tool, it is possible to generate new seed phrases as +well as derive a keypair from an existing seed phrase and (optional) passphrase. +The seed phrase and passphrase can be used together as a paper wallet. As long +as you keep your seed phrase and passphrase stored safely, you can use them to +access your account. + +{% hint style="info" %} +For more information about how seed phrases work, review this +[Bitcoin Wiki page](https://en.bitcoin.it/wiki/Seed_phrase). +{% endhint %} + +### Seed Phrase Generation + +Generating a new keypair can be done using the `solana-keygen new` command. The +command will generate a random seed phrase, ask you to enter an optional +passphrase, and then will display the derived public key and the generated seed +phrase for your paper wallet. + +```bash +solana-keygen new --no-outfile +``` + +{% hint style="warning" %} +If the `--no-outfile` flag is **omitted**, the default behavior is to write the +keypair to `~/.config/solana/id.json` +{% endhint %} + +{% hint style="info" %} +For added security, increase the seed phrase word count using the `--word-count` +argument +{% endhint %} + +For full usage details run: + +```bash +solana-keygen new --help +``` + +### Public Key Derivation + +Public keys can be derived from a seed phrase and a passphrase if you choose to +use one. This is useful for using an offline-generated seed phrase to +derive a valid public key. The `solana-keygen pubkey` command will walk you +through entering your seed phrase and a passphrase if you chose to use one. + +```bash +solana-keygen pubkey ASK +``` + +{% hint style="info" %} +Note that you could potentially use different passphrases for the same seed +phrase. Each unique passphrase will yield a different keypair. +{% endhint %} + +The `solana-keygen` tool uses the same BIP39 standard English word list as it +does to generate seed phrases. If your seed phrase was generated with another +tool that uses a different word list, you can still use `solana-keygen`, but +will need to pass the `--skip-seed-phrase-validation` argument and forego this +validation. + +```bash +solana-keygen pubkey ASK --skip-seed-phrase-validation +``` + +{% hint style="info" %} +Copy the derived public key to a USB stick for easy usage on networked computers +{% endhint %} + +{% hint style="info" %} +A common next step is to [check the balance](#checking-account-balance) of the +account associated with a public key +{% endhint %} + +For full usage details run: + +```bash +solana-keygen pubkey --help +``` ## Checking Account Balance All that is needed to check an account balance is the public key of an account. To retrieve public keys securely from a paper wallet, follow the -[Public Key Derivation](keypair.md#public-key-derivation) instructions on an +[Public Key Derivation](#public-key-derivation) instructions on an [air gapped computer](https://en.wikipedia.org/wiki/Air_gap_\(networking\)). -Public keys can then be typed manually or transferred via a USB stick into a +Public keys can then be typed manually or transferred via a USB stick to a networked machine. Next, configure the `solana` CLI tool to connect to a particular cluster: @@ -31,8 +111,8 @@ Finally, to check the balance, run the following command: solana balance ``` -In order to check a list of public keys quickly, append public keys to a file -like so: +In order to check a list of public keys quickly, append public keys to a file, +one per line, like so: `public_keys.txt` ```bash