Bridging the air gap with quill and QR codes

From Internet Computer Wiki
Jump to: navigation, search

Summary

If you are using quill on an airgapped machine, you can use QR codes to "bridge the air gap" by sending the signed messages 'crafted' in quill.

bridging air gap


Basic steps

  1. Air-gapped machine: Create a signed message (message.json) in quill
  2. Air-gapped machine: Convert the signed message into QR codes
  3. Networked smartphone: Scan the message-turned-QR code and go to the website
  4. Networked smartphone: Click "send" to send the message to the IC

Step 1: Create a signed message (message.json) in quill

You will create many messages in quill such as creating a neuron in ICP staking with seed phrase and air-gapped computer#Step_2:_Create_a_neuron.

Example:

On the air-gapped computer:

// Create the message that tells IC "create the neuron" and save it in  "message.json"
$ target/release/quill --pem-file private.pem neuron-stake --name neuron3 --amount 1.01 > message.json

Step 2: Convert the signed message into QR codes

message.json file actually has multiple messages for the Internet Computer, so you will run a script that will put you in the following loop:

  1. Run script
  2. QR code is generated
  3. Scan QR code with your smartphone
  4. Hit ENTER and return to step 2
  5. The command will break up all the messages in message.json into QR codes you will scan sequentially in the following steps.

On the air-gapped machine:

$ bash ./quill-qr.sh < message.json

Step 3: Scan the message-turned-QR code and go to the website

bridging air gap

Step 4: Networked smartphone: Click "send" to send the message to the IC

What kind of website the QR code will open on your smartphone:

ic transaction scan

Scroll down and click on send:

ic transaction scan send

Record the response from the QR code

In the examples bellow you can see what kind of responses you may get depending on the message sent to the IC:

  • "neuron successfully created"
(
  record {
    result = opt variant {
      NeuronId = record { id = 5_241_875_388_871_980_017 }
    };
  },
)

In the example above, the neuron id is 5241875388871980017.


  • "error creating neuron"

error creating neuron

Related Topics