Bridging the air gap with quill and QR codes
From Internet Computer Wiki
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.
Basic steps
- Air-gapped machine: Create a signed message (message.json) in quill
- Air-gapped machine: Convert the signed message into QR codes
- Networked smartphone: Scan the message-turned-QR code and go to the website
- 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:
- Run script
- QR code is generated
- Scan QR code with your smartphone
- Hit ENTER and return to step 2
- 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
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:
Scroll down and click on 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"