Skip to content

Commit

Permalink
* Improving recovery instructions
Browse files Browse the repository at this point in the history
* Adding instructions on how to use the windows command prompt, and linking to instructions on how to use the command prompt on linux.
* Adding a script to generate html files from the markdown, to create release bundles that have html files instead of markdown (since html is more standard and everyone has a way to view them).
  • Loading branch information
fresheneesz committed Jun 15, 2020
1 parent 0fd286e commit 443c5d4
Show file tree
Hide file tree
Showing 21 changed files with 272 additions and 32 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.idea
tordlWalletProtocols.iml
releases
new-release
node_modules
Binary file added Clipboard02.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions GlacierProtocol.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
The Setup Protocol is used to prepare hardware, and download and verify needed software & documentation.

The first thing we need to do is verify the integrity of the Glacier protocol document (the one you are reading) to ensure that it has not been tampered with. After verifying the document, we’ll print a hardcopy.

Printing is important, because a verified electronic copy will not be accessible at all times during protocol execution due to reboots and other changes to the computing environment. Printing a hardcopy ensures there is always a verified copy of the document available.

Find a computer which has Internet access, printer access, and which you have permission to install new software on. We’ll refer to this computer as the “SETUP 1” computer.
Review the errata for the version of Glacier you are using at https://github.com/GlacierProtocol/GlacierProtocol/releases.
Download the latest full release of Glacier (not just the protocol document) at https://github.com/GlacierProtocol/GlacierProtocol/releases.
If your browser does not automatically extract the ZIP file contents into a folder within your downloads directory, do so.
Rename the folder to “glacier.”
If you have used Glacier before, and you know you have the Glacier public key imported into a local GPG keyring, skip the next step. (If you don’t know, that’s fine; proceed as normal.)
Obtain the Glacier “public key,” used to cryptographically verify the protocol document.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,21 @@ Each protocol in this section defines a protocol for setting up a single wallet
* Good for small amounts (**< $500**).
* Loss Redundancy: **inaccessible**/**none**, Compromise Resilience: **brute-force**/**single**.
* Note: This protocol does not protect against memory loss or death.
* Requires at least 1 storage location.
* [2-of-3 Multisig Wallet Protocol](singleWalletProtocols/2-of-3-Wallet.md)
* Good for medium amounts (**< $20,000**).
* Loss Redundancy: **none**/**single**, Compromise Resilience: **single**/**double**.
* Requires at least 2 storage locations.
* [Redundancy-focused 3-of-5 Multisig Wallet Protocol](singleWalletProtocols/3-of-5-Redundancy-focused-Wallet.md)
* Good for large amounts (**> $20,000**).
* Loss Redundancy: **single**/**double**, Compromise Resilience: **single**/**double**.
* Resilient to the [$5 wrench attack](https://xkcd.com/538/).
* Requires at least 3 storage locations.
* [Security-focused 3-of-5 Multisig Wallet Protocol](singleWalletProtocols/3-of-5-Security-focused-Wallet.md)
* Good for large amounts (**> $20,000**).
* Loss Redundancy: **none**/**single**, Compromise Resilience: **double**/**triple**.
* Resilient to the [$5 wrench attack](https://xkcd.com/538/).
* Requires at least 3 storage locations.

### Tiered Wallets

Expand Down Expand Up @@ -92,6 +96,12 @@ These methods are protocols for creation of memorable passphrases that satisfy t
* [Simple Inheritance Plan](inheritance/simple-inheritance-plan.md)
* [Risks](misc/risks.md)

## Similar Projects

* [The Glacier Protocol](https://glacierprotocol.org)
* [Yeticold](https://yeticold.com/)
* [Other methods](https://en.bitcoin.it/wiki/Links_to_Storage_Methods) listed on the bitcoin.it wiki.

## Contribution

Please feel free to propose additional methods using github issues or as pull requests. Also feel free to use github issues as a forum for discussion of anything in this repository. If you'd like to be a co-owner of this repo, please send a message via github issues.
Expand Down
4 changes: 4 additions & 0 deletions backupMethods/Stamped-Metal-Seed-Backup.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,8 @@ The following lists the best known metal backup options:

See [James Lopp's Seed Storage Stress Test](https://blog.lopp.net/metal-bitcoin-seed-storage-stress-test--part-ii-/) for more info.

## Recommendations

* Its recommended to use punched metal backups like the [Blockplate](https://www.blockplate.com/collections/frontpage/products/blockplate) or [Steelwallet](https://shop.blockark.de/steelwallet).

# Weaknesses
87 changes: 87 additions & 0 deletions generate-release.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
var fs = require("fs").promises
var path = require("path")
var marked = require("marked")
var fwalk = require('kc-fwalk')

var newReleaseDirName = "new-release"
var ignoreDirectories = [".", "node_modules", "releases", "generate-release.js", "yarn.lock", newReleaseDirName]

;(async function() {
try {
try {
await fs.mkdir(newReleaseDirName)
} catch (e) {
if(e.code === "EEXIST") {
console.log("Directory "+newReleaseDirName+" already exists. Quitting.")
} else {
throw e
}
}
//
// var cssContent = await fs.readFile(__dirname+"/style.css")
// await fs.writeFile(__dirname+"/"+newReleaseDirName+"/style.css", cssContent.toString())

// var filename = "./singleWalletProtocols/Basic-Hot-Wallet.md"
await Promise.all(getFilenames(ignoreDirectories).map(async function(filename) {
var basename = path.basename(filename)
var dirname = path.dirname(filename)
var sourceFilePath = __dirname+"/"+filename.slice(2)


var isMarkdown = filename.slice(-3) === ".md"
if(isMarkdown) {
var releaseFileName = basename.slice(0, -2)+"html"
var baseDirectoryPath = strmult("../", dirname.split('/').length-1)
} else {
var releaseFileName = basename
}

var releaseFilePath = __dirname+"/"+newReleaseDirName+dirname.slice(1)+"/"+releaseFileName
await fs.mkdir(path.dirname(releaseFilePath), {recursive:true})
if(isMarkdown) {
var file = await fs.readFile(sourceFilePath)
var contentsToWrite = generateHtml(file.toString(), baseDirectoryPath)
await fs.writeFile(releaseFilePath, contentsToWrite)
} else {
await fs.copyFile(sourceFilePath, releaseFilePath)
}
}))
} catch(e) {
console.error(e)
}
})()

function generateHtml(markdown, baseDirectoryPath) {
marked.use({renderer: {link: function(href, title, text) {
if(href.indexOf("http") !== 0 && href.slice(-3) === ".md") {
// Replace local markdown links with the path to the html version
href = href.slice(0, -3)+".html"
}
return "<a href='"+href+"'>"+text+"</a>"
}}})

return "<head><link rel='stylesheet' type='text/css' href='"+baseDirectoryPath+"style.css'></style></head>\n"+marked(markdown)
}

// Gets the filenames to copy
function getFilenames(ignoreDirectories) {
var filenames = []
fwalk(".").forEach(function(filename) {
// Filter out non-project directories
for(var n=0; n<ignoreDirectories.length; n++) {
if(filename.indexOf("./"+ignoreDirectories[n]) === 0) return // Ignore file in that directory.
}

filenames.push(filename)
})
return filenames
}

// Concatenate a string together multiple times
function strmult(str, count) {
var result = []
for(var n=0; n<count; n++) {
result.push(str)
}
return result.join("")
}
8 changes: 2 additions & 6 deletions misc/obtaining-tordl.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,13 @@ This page goes over how to obtain and verify a release of the Tordl Wallet Proto

* A file named something like "`tordl-wallet-protocols-vX.Y.Z.zip.sig`" is the `Tordl Protocols Signature File`.

4. [Verify the authenticity of the release's zip file](verifying-a-gpg-signature) using the following things:
4. [Verify the authenticity of the release's zip file](verifying-a-gpg-signature.md) using the following things:

* `file` should be the `Tordl Protocols Zip File`,
* `signature` should be the `Tordl Protocols Signature File`, and
* `public key` should be `fresheneesz's public key` (contained in the "`fresheneesz.asc`" from keybase).

5. Extract the zip file into a folder and start using the protocol by opening the main README.md file.

## Recommendations

* I recommend using [Typora](https://typora.io/) to read the files. You can ctrl-click on links to open them.
5. Extract the zip file into a folder and start using the protocol by opening the main README.html file.

## Rationale

Expand Down
2 changes: 1 addition & 1 deletion misc/securityBasics.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ This also requires you to know that the method or software (for example, the web

Good security just isn't simple. But despair not, perfect security is never the goal. Perfect security is impossible. The security you're looking for is "good enough" security. Security that is unlikely to be compromised. That's why good security matches up with the value of the things you're security.

Its not necessary to have security guards guard your one dollar bill. But it makes sense if you're guarding $1 million in cash. Similarly, if your password is protecting your myspace account, it probably doesn't matter if an attacker can hack your account by running a password cracker for a week - your myspace account is safe because no hacker would waste a week of their time on it. But if your password is protecting your bank account, its important to use a [stronger password](../passphraseMethods/Basic-Master-Passphrase).
Its not necessary to have security guards guard your one dollar bill. But it makes sense if you're guarding $1 million in cash. Similarly, if your password is protecting your myspace account, it probably doesn't matter if an attacker can hack your account by running a password cracker for a week - your myspace account is safe because no hacker would waste a week of their time on it. But if your password is protecting your bank account, its important to use a [stronger password](../passphraseMethods/Basic-Master-Passphrase.md).

So tl;dr:

Expand Down
6 changes: 3 additions & 3 deletions misc/verifying-a-gpg-signature.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ This section goes over how to install and verify GPG.

If you're on linux, you can simply install it using your package manager, which should ensure the integrity of the installation automatically.

**Ubuntu/Debian/etc**: sudo apt install gnupg
**Ubuntu/Debian/etc**: Run `sudo apt install gnupg` the [command line](https://www.howtogeek.com/140679/beginner-geek-how-to-start-using-the-linux-terminal/).

**CentOS/Fedora/RHEL**: sudo yum install gnupg
**CentOS/Fedora/RHEL**: Run `sudo yum install gnupg` the [command line](https://www.howtogeek.com/140679/beginner-geek-how-to-start-using-the-linux-terminal/).

**On Windows**:

1. Download GPG from [www.gpg4win.org](https://www.gpg4win.org)
2. Compute a checksum by running `certutil -hashfile <gpg installer> sha256`. Example command: `certutil -hashfile gpg4win-3.1.7.exe sha256`.
2. Compute a checksum by running `certutil -hashfile <gpg installer> sha256` on the [windows command line](windows-os-info.md). Example command: `certutil -hashfile gpg4win-3.1.7.exe sha256`.
3. Verify the checksum matches what's published on [gpg4win's package-integrity page](https://www.gpg4win.org/package-integrity.html)
4. Open the signature details on the installer file.
1. Right click -> properties -> Digital Signatures.
Expand Down
Binary file added misc/windows-cmd-paste.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
35 changes: 35 additions & 0 deletions misc/windows-os-info.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Info for Windows Operating System users

## Turning on filename extensions

Windows has filename extensions hidden by default, which is bad because it makes it easier for people to run malicious programs disguised as an image or text file. It also makes it harder to change file types or work with things on the command line. To enable filename extensions:

1. Open up any windows folder.
2. Click on the *View* menu at the top.
3. Near the top right of the folder should now be an option called *File name extensions*. Ensure that option is checked.

## Using the command line

The command line (aka command prompt or incorrectly as the "DOS prompt") is a program on windows (and other OSes) that you can use to run text commands that you can use to run programs and manipulate files and folders on your computer. Many advanced tasks require the use of the command line. On windows, this program is called **cmd.exe**.

The easiest way to open it is to go to your start menu and search for "cmd".

![cmd](https://www.lifewire.com/thmb/LX3O2ZWWJb7hcB6MqSlbjb6bLl4=/1118x0/filters:no_upscale():max_bytes(150000):strip_icc():format(webp)/open-command-prompt-w10-5c19531146e0fb00013852e8.png)

Commands must be entered into Command Prompt exactly. The wrong [syntax](https://www.lifewire.com/what-is-syntax-2626014) or a misspelling could cause the command to fail or worse: it could execute the wrong command or the right command in the wrong way.

The most important things you'll need to know how to do for this guide are how to paste, and how to use the `cd` command.

#### How to paste into the command prompt

![pasting](windows-cmd-paste.png)

On some systems, ctrl-v does not work to paste. If this is the case, paste by clicking on the top left of the window (on the icon), select *Edit*, then select *Paste*.

#### How to use the `cd` command.

The command `cd` stands for `c`hange `d`irectory. You can think of this the same way you would double click on a folder and then be "in" that folder. Note that "directory" and "folder" both mean the same thing in this context.

* Change to a particular folder: In this guide, usually you'll simply want to change to a particular folder. To do that type a command of the form `cd <folder you want to go to>`, for example, to go to `C:\Users\you\Desktop\pics` you would type `cd C:\Users\fresh\Desktop\pics` and then press enter to submit the command. Use the instructions *How to paste into the command prompt* to make this easier. You can copy the path a folder is at by clicking to the right of the folder's address bar.
* If you're changing to a directory with a different drive letter than your current working directory, you'll need to additionally type that drive letter. For example, if your command prompt's line starts with `C:\Users\yourUsername>` and you need to switch to the directory `D:\some-folder\`, then you'll need to type `d:` into the command prompt and press enter. You can do this before or after the `cd` command.
* Usually, when you start the command prompt, your "working directory" (the folder you start in) is the folder that contains your desktop's files. So if you're just trying to get to your desktop, enter the command `cd Desktop`.
6 changes: 3 additions & 3 deletions multiWalletProtocols/Simple-2-Tier-Wallet.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
* [2-of-3 Multisig Wallet](../singleWalletProtocols/2-of-3-Wallet.md)
* [3-of-5 Redundancy-focused Multisig Wallet](../singleWalletProtocols/3-of-5-Redundancy-focused-Wallet.md)
* [3-of-5 Security-focused Multisig Wallet.md](../singleWalletProtocols/3-of-5-Security-focused-Wallet.md)
* (Optional) Some number of Decoy Wallets
* If your choice of cold wallet is not resilient to the $5 wrench attack, optionally use [Decoy Wallet](../singleWalletProtocols/Decoy-Wallet.md) with the following note:
* Use the same configuration for this wallet as you chose for the cold wallet. The only thing that should be different is the Offline Master Passphrase you use.
* (Optional) If your choice of cold wallet is not resilient to the $5 wrench attack, optionally use some number of [Decoy Wallets](../singleWalletProtocols/Decoy-Wallet.md), where for each:
* `Wallet Configuration` - Use the same configuration for this wallet as you chose for the cold wallet.
* `Different Password` should be different than the `Offline Master Passphrase` you use.

## Rationale

Expand Down
6 changes: 6 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"dependencies": {
"kc-fwalk": "^1.0.5",
"marked": "^1.1.0"
}
}
2 changes: 2 additions & 0 deletions passphraseMethods/numeralEncodedPassphrases/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Numerical Encoding Security

This directory contains `numeralEncodingSecurity.js` which is a script that calculates cracking time for a couple word lists as well as for those word lists after transforming the words to numbers where each letter is represented by a single number.

For example, using the following number pad "boyhowdy" would be represented as "26946939":
Expand Down
1 change: 1 addition & 0 deletions singleWalletProtocols/2-of-3-Wallet.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,4 @@ Good for medium amounts (< $20,000).
* No location has enough seeds to lead to theft of the wallet if any single location is compromised (as long as the passphrase isn't compromised).
* Normal use of the wallet requires only 2 of 3 keys because that increases the with-passphrase redundancy to double redundancy (from single redundancy if all keys were required).
* Uses 2 of 3 where the HW Seed is involved in 2 of the keys, so that in the case you lose your mobile seed and your mobile wallet, you can still recover funds (using just the contents of the safe deposit box).
* One of the three wallets is created with the same base-seed as another of the wallets, with the addition of a 25th word passphrase (the `Offline Master Passphrase`). The reason for this is to make the wallet easier to access and use by the owner, while not diminishing the compromise resilience of the wallet and still allowing passphraseless recovery (eg for inheritance).
3 changes: 2 additions & 1 deletion singleWalletProtocols/3-of-5-Wallet.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,5 @@ Good for medium to large amounts (> $1000).
## Rationale

* Normal use of the wallet requires only 3 of 5 keys because that increases the with-passphrase redundancy by one.

* Two of the five wallets use the same base-seed as another two w
* Two of the five wallets are created with the same base-seed as another two wallets, with the addition of a 25th word passphrase (the `Offline Master Passphrase`). The reason for this is to make the wallet easier to access and use by the owner, while not diminishing the compromise resilience of the wallet and still allowing passphraseless recovery (eg for inheritance). Basically, this set up is pretty much as easy to use as a passphrase-less 2-of-3 multisig wallet, but more secure or redundant.
Loading

0 comments on commit 443c5d4

Please sign in to comment.