gui: special case for swap recovey in bip85 UI
What changed, and why it matters
This commit changes the on-screen confirmation message shown to users when a specific BIP85 entropy export is requested. Normally the device warns that it is exporting an encrypted seed phrase for a specific BIP85 index. For the exact combination of a 12-word seed phrase at index 26589, the device instead shows a friendly 'Scan successful! Continue to pair with wallet app.' message under the title 'Enable Swaps'. The underlying cryptographic operation is unchanged; only the user-facing text is different. This could mislead users about what is actually being exported, but it does not by itself bypass the user's approval button press.
Review whether the new prompt adequately informs the user that they are exporting encrypted BIP85 entropy. If the swap-recovery flow requires the same sensitive operation as a normal BIP85 export, consider adding a secondary confirmation or clearer wording that mentions entropy export, and document why index 26589 is trusted for this purpose.
Security signals we found
UI wording special-cased for a fixed BIP85 index (26589) and word count (12)
Friendly pairing message replaces explicit key-export warning for the same cryptographic operation
No change to entropy calculation, RPC parsing, or authorization gating
Evidence from the diff
In main/process/get_bip85_entropy.c, get_bip85_bip39_entropy_data() now branches on (nwords == 12 && index == 26589). For that case it calls await_continueback_activity() with title ‘Enable Swaps’ and messages implying a successful scan/pairing, instead of the previous ‘Key Export’ / ‘Export an encrypted N word seed phrase for BIP85 index X?’ wording. The same helper is used, so the user must still tap continue, and the same encrypted entropy calculation follows. The change is purely a UI special case for ‘swap recovery’ in the BIP85 flow.
Changed components
main/process/get_bip85_entropy.cBIP85 entropy export UI flowCross-chain swap recovery user promptInspect captured patch +27 / −15
diff --git a/main/process/get_bip85_entropy.c b/main/process/get_bip85_entropy.c
index 9146314..b0488e1 100644
--- a/main/process/get_bip85_entropy.c
+++ b/main/process/get_bip85_entropy.c
@@ -183,21 +183,33 @@ static int get_bip85_bip39_entropy_data(const CborValue* params, bip85_data_t* b
return CBOR_RPC_BAD_PARAMETERS;
}
- // User to confirm
- char nwordphrase[24];
- int ret = snprintf(nwordphrase, sizeof(nwordphrase), "%u word seed phrase", nwords);
- JADE_ASSERT(ret > 0 && ret < sizeof(nwordphrase));
-
- char txtindex[24];
- ret = snprintf(txtindex, sizeof(txtindex), "for BIP85 index %u?", index);
- JADE_ASSERT(ret > 0 && ret < sizeof(txtindex));
-
- const char* message[] = { "Export an encrypted", nwordphrase, txtindex };
-
- if (!await_continueback_activity("Key Export", message, 3, false, "blkstrm.com/bip85")) {
- // User declined
- *errmsg = "User declined to export entropy";
- return CBOR_RPC_USER_CANCELLED;
+ // Special case for cross-chain swaps
+ if (nwords == 12 && index == 26589) {
+ // User to confirm
+ const char* message[] = { "Scan successful!", "Continue to pair", "with wallet app." };
+
+ if (!await_continueback_activity("Enable Swaps", message, 3, false, "blkstrm.com/bip85")) {
+ // User declined
+ *errmsg = "User declined to export entropy";
+ return CBOR_RPC_USER_CANCELLED;
+ }
+ } else {
+ // User to confirm
+ char nwordphrase[24];
+ int ret = snprintf(nwordphrase, sizeof(nwordphrase), "%u word seed phrase", nwords);
+ JADE_ASSERT(ret > 0 && ret < sizeof(nwordphrase));
+
+ char txtindex[24];
+ ret = snprintf(txtindex, sizeof(txtindex), "for BIP85 index %u?", index);
+ JADE_ASSERT(ret > 0 && ret < sizeof(txtindex));
+
+ const char* message[] = { "Export an encrypted", nwordphrase, txtindex };
+
+ if (!await_continueback_activity("Key Export", message, 3, false, "blkstrm.com/bip85")) {
+ // User declined
+ *errmsg = "User declined to export entropy";
+ return CBOR_RPC_USER_CANCELLED;
+ }
}
// Calculate encrypted entropy
Why this scored 30/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.