ICP custody with seed phrase and air-gapped machine

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

Warning: Only tested on MacOSX and Linux.

   bash
   #!/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.