Debian Codegraph @

external/feather-docs/content/_guides/offline_tx_signing.md

raw
1 ---
2 title: Offline transaction signing
3 nav_title: Offline transaction signing
4 category: advanced
5 ---
6
7 To troubleshoot common issues, see [Help: Airgapped signing issues](airgapped-signing-issues).
8
9 Offline transaction signing (or airgapped signing) is a method of signing transactions without exposing the private spend key to a computer that is connected to the internet. Conceptually, it is similar to how a hardware wallet functions, except the process is done manually.
10
11 Two devices are required: one device connected to the internet that hosts a view-only wallet ("the online device"), and a second [airgapped](https://en.wikipedia.org/wiki/Air_gap_%28networking%29) device that hosts a corresponding wallet containing the secret spendkey ("the offline device"). The offline device is typically a laptop or desktop computer stripped of any network interfaces that is used exclusively for the purpose of offline transaction signing.
12
13 The procurement and setup of the offline device is outside the scope of this guide. However, we recommend installing a lightweight linux distribution with an [encrypted filesystem](https://wiki.archlinux.org/title/Dm-crypt/Encrypting_an_entire_system) on the offline device.
14
15 Transactions are constructed using the view-only wallet on the online device, then signed with the offline wallet on the offline device and later broadcast to the network using the view-only wallet on the online device or via another means such as a [transaction pusher](https://xmrchain.net/rawtx).
16
17 Feather supports two airgapped transaction signing methods:
18
19 - Using a webcam to scan **animated QR code** (Uniform Resources, or **UR** for short)
20 - By transferring **files** between computers (using a flash drive or SD card)
21
22 For this guide we assume you will be using animated QR codes.
23
24 ### A note on webcams
25
26 You will need to scan QR codes using both devices. We recommend getting two (cheap) detachable USB webcams, one for each
27 device. If you are short on budget, get one USB webcam that you can switch between devices. A resolution of 720P is sufficient.
28
29 It's possible to use a laptop's built-in webcam for one side, but this is less practical. You may need to hold up your laptop in front of the other screen to get it to scan a QR code.
30
31 ## Initial Setup
32
33 ### Creating a new offline wallet
34
35 ![Enable offline mode](/static/files/airgap_offline_mode.png)
36
37 On the offline device, go to **Settings → Network → Offline**. Make sure '**Disable all network connections (offline mode)**' is checked.
38
39 Then, [create a new wallet](create-wallet). Do not forget the write-down your seed and store it in a secure place.
40
41 After opening the wallet, your UI should look like this:
42
43 ![Offline mode](/static/files/airgap_mode.png)
44
45 Note that you are not able to access your transaction history or balance from the offline wallet. It does not store
46 transaction records or outputs (even imported ones), as it is unable to keep an accurate history due to it not being
47 connected to a node. You can view your transaction history in the view-only wallet.
48
49 ### Creating a view-only wallet
50
51 Now that you have your offline wallet set up, you need to create a corresponding view-only wallet on the online device.
52
53 Three pieces of information are required for this: secret view key, primary address, and restore height.
54
55 The easiest way to transfer this information to your online device is scanning a QR code.
56
57 ![Press view-only details](/static/files/airgap_mode_viewonly.png)
58
59 ![Show QR](/static/files/airgap_transmit.png)
60
61 Press **View-only details**, then press **Show QR**.
62
63 ![Restore wallet from keys](/static/files/airgap_menu.png)
64
65 On the **online** device, open the wizard and select **Restore wallet from keys** and press **Next**.
66
67 ![Scan UR](/static/files/airgap_restore.png)
68
69 Press **Scan QR** and scan the code shown on the offline device. If you have trouble scanning the QR code, see [Help: Airgapped signing issues](airgapped-signing-issues) for tips.
70
71 If everything went right, the dialog should close automatically and autofill the view-only details.
72
73 Step through the wizard.
74
75 - You do not need to adjust the restore height.
76 - You may choose a different wallet name.
77 - Remember to set a strong password.
78
79 ## Fund your wallet
80
81 On the view-only wallet, go to the **Receive** tab and copy an unused address. Or see [Primary adress](primary-address) if you need your wallet's primary address.
82
83 If you assume that the **view-only** is compromised, you can verify the address using the offline wallet.
84
85 - On the **offline** wallet, click **Show address**.
86 - Enter the index of the address. You can find this number on the **Receive** tab of the **view-only** wallet, to the left of the address.
87 - Verify that the address matches.
88
89 ## Sending a transaction
90
91 To initiate an airgapped transaction, try to [send a transaction](send-transaction) on your view-only wallet.
92
93 A wizard will pop up showing an animated QR code.
94
95 If this is your first time sending a transaction from this wallet, you will need to synchronize the key images. Don't
96 worry, the wizard will guide you through this.
97
98 ![Click 'Sign a transaction..'](/static/files/airgap_mode_sign.png)
99
100 To scan the animated QR code, click **Sign a transaction..** on the **offline** wallet. A dialog will show up that looks like this:
101
102 ![Scanning UI](/static/files/airgap_scan.png)
103
104 Familiarize yourself with the scanning UI:
105
106 1. If you have multiple cameras, you can click here to switch between cameras
107 2. You can click on 'Refresh' to refresh the list of cameras
108 3. This progress bar will fill up as you scan fragments. If it appears to get stuck on 99%, keep scanning.
109 4. If you have trouble scanning the QR code due to glare, you can enable manual exposure here if your camera supports it. Use the slider to adjust the exposure level.
110
111 Follow the instructions in the wizard. Or continue reading here to go step by step.
112
113 ### Step by step
114
115 #### Step 1: scan the outputs (offline wallet)
116
117 Scan the QR code shown on the view-only wallet with your offline wallet.
118
119 After the scan is complete, the offline wallet will automatically advance to the next step.
120
121 #### Step 2: scan the key images (view-only wallet)
122
123 On the view-only wallet, click **Next** to move it to step 2.
124
125 Now scan the animated QR code shown on the offline wallet with the view-only wallet.
126
127 The interface may freeze for a moment upon reaching 100%. Wait a few seconds.
128
129 The view-only wallet will now begin constructing a transaction. If anything goes wrong here, simply try resending your
130 transaction. You will not have to do steps 1 and 2 again.
131
132 #### Step 3: scan the unsigned transaction (offline wallet)
133
134 After the transaction is constructed, an animated QR code will show up on the view-only wallet.
135
136 On the **offline** wallet, click **Next** to move to step 3.
137
138 ![Sign the transaction](/static/files/airgap_sign.png)
139
140 After the scan is complete, a window will pop up showing you the transaction details. There will typically be two outputs,
141 one 'change' output that goes back to your wallet. This output has a yellow or green background. The other one is the
142 address you're sending money to.
143
144 Confirm the transaction details. Click **Sign**.
145
146 #### Step 4: scan the signed transaction (view-only wallet)
147
148 On the view-only wallet, click **Next** to move it to step 4.
149
150 Scan the animated QR code shown on the offline wallet with the view-only wallet.
151
152 After the scan is complete, a dialog will pop up asking you to confirm sending the transaction. You have just sent an airgapped transaction!
153
154 The next time you create a transaction, you will likely not have to go through steps 1 or 2.