Skip to content

Commit d70c483

Browse files
Document how to multisig coldkeys, improve wallet docs (#535)
1 parent d4db598 commit d70c483

File tree

6 files changed

+346
-121
lines changed

6 files changed

+346
-121
lines changed

docs/getting-started/coldkey-hotkey-security.md

Lines changed: 4 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ See also:
1010

1111
- [Intro to Wallets, Coldkeys and Hotkeys in Bittensor](./wallets)
1212
- [Bittensor CLI: Permissions Guide](../btcli-permissions)
13-
13+
- [Handle your Seed Phrase/Mnemonic Securely](../keys/handle-seed-phrase)
1414

1515
Interacting with Bittensor generally falls into one of three levels of security, depending on whether you need to use your coldkey private key, hotkey private key, or neither.
1616

@@ -49,10 +49,11 @@ Websites that offer permissionless browsing of Bittensor data include:
4949

5050
## Coldkey workstation
5151

52-
Your coldkey private key, accessible with your recovery seed phrase, is the complete representation of your identity to Bittensor. In otherwords, holding the coldkey or seed phrase is the ultimate authority over your Bittensor wallet. If your coldkey key is leaked or stolen allows an attacker holder to transfer (steal) your TAO, redelegate your stakes, or take other actions that can’t be reversed. Conversely, without your coldkey private key or the seedphrase, there is no possible way to recover access to your wallet.
52+
Your coldkey private key, accessible with your recovery [seed phrase](./wallets#the-seed-phrase-aka-mnemonic), is the complete representation of your identity to Bittensor. In otherwords, holding the coldkey or seed phrase is the ultimate authority over your Bittensor wallet. If your coldkey key is leaked or stolen allows an attacker holder to transfer (steal) your TAO, redelegate your stakes, or take other actions that can’t be reversed. Conversely, without your coldkey private key or the seed phrase, there is no possible way to recover access to your wallet.
5353

5454
Because of these high stakes, best practices should be diligently followed. Always prioritize confidentiality and integrity over convenience when handling coldkeys.
5555

56+
5657
### Isolation of coldkey operations
5758

5859
The first principle is to isolate coldkey operations from day-to-day or internet-exposed systems. This means using a dedicated machine that is minimally connected to the internet, protected with full disk encryption, and has only highly trusted software installed to minimize the risk of malware or keyloggers intercepting your coldkey.
@@ -81,34 +82,14 @@ This is required for using `btcli` or the Bittensor Python SDK for advanced use
8182
### Operational Hygiene
8283

8384
Even on a minimal or air-gapped machine, follow standard security hygiene:
85+
- Always [Handle your Seed Phrase/Mnemonic Securely](../keys/handle-seed-phrase).
8486
- Use strong passwords for your encryption passphrases.
8587
- Do not reuse credentials across different environments.
8688
- Keep your workstation’s operating system and critical software updated with the latest security patches.
8789
- Disable all network services (SSH, RDP, or anything else) that are not strictly needed.
8890
- Maintain logs of important oprations.
8991

90-
### Your seed phrase
91-
92-
The ***seed phrase*** (a.k.a. 'menemonic' or 'recovery phrase') is a series of (at least 12) words that is generated together with your wallet's cryptographic key pair, and which can be used to recover the coldkey private key. This seed phrase is therefore a human-usable way to save access to the cryptographic wallet offline, and to import the cryptographic wallet into a wallet application.
93-
94-
### Do not leak your seed-phrase
95-
96-
1. Do not keep paper/analog copies somewhere they can be accessed without your knowledge.
97-
1. Do not expose your seed-phrase to untrustworthy software by entering into apps:
98-
- messaging
99-
- email
100-
- online word processors
101-
1. Beware key-loggers, especially if you enter your seed phrase.
102-
1. Beward cameras and eye-balls (the "over the shoulder" attack) if you generate and export your seed phrase.
103-
104-
### Do not lose your keys/seed-phrase
105-
106-
You must keep redundant backups of your coldkey. If you lose all access to your seed-phrase/initialized wallets, you permanently and unrecoverably lose access to your account (TAO, stake, etc.).
10792

108-
Common approaches:
109-
- **Paper backups** of the mnemonic phrase, sealed in tamper-evident envelopes and locked in a safety deposit box or safe.
110-
- **Encrypted USB drives** with strong passphrases stored in a safety deposit box or safe.
111-
- **Multiple locations strategy** so that a single disaster (fire or flood) cannot destroy all copies.
11293

11394
### Rotating your coldkey
11495

docs/getting-started/wallets.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,43 @@ The coldkey private key is needed to authorize highly sensitive operations invol
2222

2323
The coldkey public key identifies a wallet to the internet, serving as an address. To transfer ownership of TAO or alpha stake from one wallet to another, the sender needs only the public key of the recipient, and their own private key.
2424

25+
## Wallets and wallet applications
26+
27+
We must be careful to distinguish two senses of the term 'wallet' that can otherwise be confusing:
28+
29+
- The **cryptographic wallet** is one or more cryptographic key pairs that comprise an identity, and allow a person to sign transactions or be referred to in transactions signed by others. In this sense, the wallet is more or less synonymous with the unique **coldkey** that controls access to your assets and serves as your public identity.
30+
31+
- The **wallet application** is software that runs on your device and allows you to interact with the blockchain by entering your keys. There are several officially supported Bittensor wallet applications:
32+
33+
- The Bittensor wallet app for mobile: [bittensor.com/wallet](https://bittensor.com/wallet)
34+
- [The Chrome extension](https://chromewebstore.google.com/detail/bittensor-wallet/bdgmdoedahdcjmpmifafdhnffjinddgc), which is also compatible with use of a Ledger hardware wallet. See [Using Ledger Hardware Wallet](../staking-and-delegation/using-ledger-hw-wallet.md)
35+
- The Bittensor Python SDK, which includes the secure [Bittensor Wallet module](https://docs.bittensor.com/btwallet-api/html/autoapi/btwallet/wallet/index.html).
36+
- The Bittensor CLI, `btcli`, which uses the Bittensor Wallet module under the hood.
37+
38+
Every Bittensor user has one or more cryptographic wallets, i.e. one or more coldkey. Any cryptographic wallet can be loaded into any number of wallet applications. If every wallet application that has been initialized with your cryptographic wallet (i.e. signed into with your coldkey private key) is closed, logged out, etc., and the device incinerated, your cryptographic wallet exists on the blockchain, and can be recovered with your *seed phrase*.
39+
40+
Different wallet applications have different levels of functionality:
41+
42+
- The mobile app and Chrome extension allow for staking and transfer of TAO balalnces, but do not include any hotkey management or advanced functionality.
43+
44+
- Note that the Chome extension is compatible with a hardware wallet, which can be a strong security option. This implies using a laptop as your [coldkey workstation](../getting-started/coldkey-hotkey-security).
45+
46+
- The mobile app depends on using a secure phone as a [coldkey workstation](../getting-started/coldkey-hotkey-security).
47+
48+
- `btcli` and the SDK allow for hotkey management and other advanced functionality. These require a laptop as a [coldkey workstation](../getting-started/coldkey-hotkey-security).
49+
50+
:::tip
51+
Note that you can also check balances on an unsecure device without entering your coldkey private key. For example, using [https://bittensor.com/scan](https://bittensor.com/scan). These website can be considered permissionless wallet applications.
52+
53+
See [Coldkey and Hotkey Workstation Security: Permissionless workstation](../getting-started/coldkey-hotkey-security#permissionless-workstation)
54+
:::
55+
56+
## The seed phrase a.k.a. mnemonic
57+
58+
The ***seed phrase*** (a.k.a. 'menemonic' or 'recovery phrase') is a series of (at least 12) words that is generated together with your wallet's cryptographic key pair, and which can be used to recover the coldkey private key. This seed phrase is therefore a human-usable way to save access to the cryptographic wallet offline, and to import the cryptographic wallet into a wallet application.
59+
60+
Arguably the most important operational goal when handling Bittensor wallets is to avoid losing or leaking your seed phrase. Make sure you [Handle your Seed Phrase/Mnemonic Securely](../keys/handle-seed-phrase).
61+
2562
## Wallet applications
2663

2764
There are many different applications that can interact with your public and/or private keys in some way.

docs/keys/handle-seed-phrase.md

Lines changed: 139 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,139 @@
1+
---
2+
title: "Handle your Seed Phrase/Mnemonic Securely"
3+
---
4+
5+
# Handle your Seed Phrase/Mnemonic Securely
6+
7+
The seed phrase (a.k.a. 'menemonic' or 'recovery phrase') is a series of (at least 12) words that is generated together with your wallet's cryptographic key pair, and which can be used to recover the coldkey private key. This seed phrase is therefore a human-usable way to save access to the cryptographic wallet offline, and to import the cryptographic wallet into a wallet application.
8+
9+
Whoever holds the seed phrase has full control over the wallet, so you should treat it like the keys to your digital safe. If someone else gains access to it, they can steal your assets. If you lose it, your assets are lost forever.
10+
11+
There are two categories of security failure with a secret like a seed phrase/mnemonic:
12+
13+
- To *lose* the secret means no longer having access to it. This implies permanent, unrecoverable loss of the resources (TAO and alpha stake, subnet creator permissions on a subnet, etc.) controlled by a Bittensor coldkey private key.
14+
- To *leak* the secret means accidentally giving someone else access to it. This may result in them stealing your resources, or further leaking it to others who may in turn act maliciously. If your secret is leaked, you can (and should) rotate it, i.e. perform a coldkey swap.
15+
16+
See: [Rotating your coldkey](../getting-started/coldkey-hotkey-security#rotating-your-coldkey)
17+
18+
## Do not leak your keys/seed phrase
19+
20+
1. Do not keep paper/analog copies somewhere they can be accessed without your knowledge.
21+
1. Do not expose your seed phrase to untrustworthy software by entering into applications:
22+
- messaging
23+
- email
24+
- online word processors
25+
1. Beware key-logging software if you enter your seed phrase. Never enter your seed phrase on a device that may be compromised with malware!
26+
1. Beware screen capture software if you generate and export your seed phrase. Never enter your seed phrase on a device that may be compromised with malware!
27+
1. Beware cameras and eye-balls (the "over the shoulder" attack) if you generate and export your seed phrase. Don’t write it down or display it on screen in public or semi-public places.
28+
29+
## Do not lose your keys/seed phrase
30+
31+
You must keep redundant backups of your coldkey. If you lose all access to your seed phrase/initialized wallets, you permanently and unrecoverably lose access to your account (TAO, stake, etc.).
32+
33+
## Backup tactics
34+
35+
Every option for backing up a seed phrase has pros and cons, and a full backup strategy relies on a combination of tactics that offers you a reasonable balance of security and accessbility.
36+
37+
### Multiple-locations
38+
39+
Keep redundant backups in separate, secure physical locations.
40+
41+
Ensure that a single point of failure—like fire, flood, or theft—cannot destroy all copies.
42+
43+
### Paper
44+
45+
Tactics:
46+
47+
- Write your seed phrase on acid-free, archival-quality paper.
48+
- Store it in a tamper-evident envelope in a locked safe or safety deposit box.
49+
- Avoid common paper degradation risks: humidity, fire, ink fade, etc.
50+
51+
Pros:
52+
53+
- No risk of digital leak (except cameras).
54+
- Can be hard to lose if properly secured in a safe.
55+
56+
Cons:
57+
- Easy to leak if physical security is compromised (anyone can read or take a picture of it when the paper is exposed).
58+
- Easy to lose to physical disaster (e.g. fire).
59+
60+
### Metal
61+
62+
Tactic: Etch or stamp your seed phrase onto a metal plate.
63+
64+
Pros: Extremely resistant to loss by destruction (e.g. fire).
65+
66+
Cons: Easy to leak if physical security is compromised (anyone can read or take a picture of it when the plate is exposed).
67+
68+
### Encrypted drive
69+
70+
Tactics:
71+
- Save the seed phrase in an encrypted text file on a USB drive.
72+
- Use strong, unique passphrases and encrypt using industry-standard tools (e.g., GPG, VeraCrypt).
73+
- Store the USB in a secure physical location—never leave it connected to a device.
74+
- Only connect the USB drive to secure coldkey workstations.
75+
76+
### Hardware wallet
77+
78+
A hardware wallet such as a Ledger device that has a coldkey loaded into it can act as a backup, in a sense. It cannot be used to exfiltrate the seed phrase, but it can be used to transfer out assets or even coldkey swap to a new coldkey.
79+
80+
Pros:
81+
82+
- Strong protection against leaks
83+
- Tamper-resistant, PIN-protected
84+
85+
Cons:
86+
87+
- Signing device, *not* full backup; cannot export seed phrase
88+
- If lost and not backed up elsewhere, access is lost
89+
- High risk of loss due to mistaken factory reset (e.g. wrong PIN too many times)
90+
91+
:::danger
92+
Only to be used in addition to backups of the seed phrase.
93+
:::
94+
95+
Here’s a concise, on-brand section you can drop into your doc, matching the tone and structure of the others:
96+
97+
### Mobile phone vault (e.g. Polkadot Vault)
98+
99+
[Polkadot Vault](https://wiki.polkadot.network/general/polkadot-vault/) turns a smartphone into an air-gapped signing device. It holds your private keys securely offline and is used only to sign transactions via QR code.
100+
101+
Pros:
102+
103+
- Strong protection against remote compromise (air-gapped and network-disabled).
104+
- No direct exposure of seed phrase during signing.
105+
- Can be used to sign extrinsics without revealing keys to online devices.
106+
107+
Cons:
108+
109+
- Signing device, *not* full backup; cannot export seed phrase
110+
- Physical access can compromise keys.
111+
- Requires careful configuration for offline mode.
112+
- App updates require full device reset and recovery from seed.
113+
114+
:::tip
115+
Use only a repurposed device kept permanently offline.
116+
:::
117+
118+
### Shamir's Secret Sharing
119+
120+
[Shamir’s Secret Sharing (SSS)](https://en.wikipedia.org/wiki/Shamir%27s_secret_sharing) is a cryptographic method for securely splitting a secret—like your seed phrase—into multiple pieces or “shares.” A minimum number of these shares must be recombined to reconstruct the original secret. This offers strong protection against both loss and leak.
121+
122+
For example, you might split a seed phrase into 5 shares, requiring any 3 to restore the secret. These can be stored separately or given to different custodians.
123+
124+
Pros:
125+
126+
- Extremely resistant to both single-point loss and leakage:
127+
- The leak of any share does not compromise your wallet.
128+
- The loss of any share does not result in loss of the wallet.
129+
- Shares can be safely distributed across multiple locations or people.
130+
131+
Cons:
132+
- Imposes additional operational complexity.
133+
- Stored secret is no longer human readable. Can be remedied with [slip39](https://github.com/satoshilabs/slips/blob/master/slip-0039.md).
134+
135+
Tools:
136+
- [`sssa-golang`](https://github.com/SSSaaS/sssa-golang): An implementation of Shamir's Secret Sharing Algorithm in Go.
137+
- [Banana Split](https://github.com/paritytech/banana_split): Open source tool that uses a variation of SSS to split a seed phrase into QR codes.
138+
- [PyCryptodome SSS](https://pycryptodome.readthedocs.io/en/latest/src/protocol/ss.html): A Python-based implementation of the Shamir scheme.
139+

0 commit comments

Comments
 (0)