ICP custody with seed phrase and air-gapped machine

From Internet Computer Wiki
Revision as of 01:29, 10 November 2021 by Diego.prats (talk | contribs) (Created page with " ==Getting your hardware and software ready== What you will need: #'''[https://en.wikipedia.org/wiki/Air_gap_(networking) air-gapped] computer''' (not connected to the inter...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Getting your hardware and software ready

What you will need:

  1. air-gapped computer (not connected to the internet)
  2. networked smartphone

You will need to install the following into your air-gapped computer:

  1. `keysmith`
   - keysmith
   - You will use this generate important artifacts like `seed phrase` and `private key`s
  1. `openSSSL`
   - [1](https://wiki.openssl.org/index.php/Binaries)
   - required by `quill`
  1. `quill`
  - [2](https://github.com/dfinity/quill)
   - you will use this to craft messages like "create neuron" for the Internet Computer
   - You can install it by downloading the binary for your operating system or by cloning and compiling the code
   - note that once installed, the command to execute is `target/release/quill` 
  1. `qrencode`
   - https://github.com/fukuchi/libqrencode) 
   - [3](https://github.com/fukuchi/libqrencode) 
   - Generates QR codes for bridging the air gap
   - Tip: if you have Homebrew, you can install via `brew install qrencode`
  1. `jq`
   - [4](https://github.com/stedolan/jq) 
   - Required for creating multiple QR codes
   - Tip: if you have Homebrew, you can install via `brew install jq`
  1. Copy and paste the following bash script into a file named `quill-qr.sh`:

Warning: Only tested on MacOSX and Linux.

```bash

  1. !/usr/bin/env bash

URL=https://p5deo-6aaaa-aaaab-aaaxq-cai.raw.ic0.app IFS=$'\n' read -r -d -a messages < <( cat - | jq -M 'if . | type != "array" then [.] else . end' | jq -rcM .[] && printf '\0' )

for message in "${messages[@]}" do

   echo "$URL/?msg=$(echo "$message" | gzip -c | base64 | tr -d '\n' | sed -e 's/+/%2B/g' -e 's/\//%2F/g' -e 's/=/%3D/g')" | qrencode > qr.png
   open qr.png
   echo ENTER TO CONTINUE...
   read < /dev/tty
   clear

done ```

Because an air-gapped computer is not connected to the internet, it can be a bit awkward to install these. The most common way to do it is to download them to a networked computer and transfer the files to the air-gapped computer via CD or USB drive. Others install these on a networked computer *and then* air-gap it.