Warn before dice-only seed generation
What changed, and why it matters
This commit adds a warning screen before users create a Bitcoin wallet seed using only dice rolls. It tells users that no hardware randomness is added, and that the on-screen hash must be kept secret because anyone who sees it could recreate the wallet and steal funds. This is a user-experience and safety improvement, not a fix for a software vulnerability.
No action required beyond normal review. The change improves user awareness but does not address a code-level vulnerability. Users who rely on dice-only seed generation should follow the new guidance.
Security signals we found
Adds explicit security warning for dice-only seed generation
Warns that on-screen hash is secret and must not be photographed
Informs users that no hardware randomness is mixed into dice-only seeds
No cryptographic or RNG code changed
Evidence from the diff
The patch introduces a new DICE_ONLY_WARNING string in shared/seed.py and displays it via ux_show_story() inside new_from_dice() before dice-roll seed generation proceeds. The warning explains that dice rolls alone supply entropy, no hardware RNG is mixed in, and the rolling hash is sensitive. A test in testing/test_ux.py verifies the warning appears. The change is purely informational; no cryptographic logic is modified.
Changed components
shared/seed.pytesting/test_ux.pyreleases/Next-ChangeLog.mdInspect captured patch +19 / −0
### releases/Next-ChangeLog.md
@@ -20,6 +20,8 @@ This lists the new changes that have not yet been published in a normal release.
gaps is conservatively credited with two bits. The full timing delta and key
identity are mixed in, but key identity receives no entropy credit. Users may
continue mashing beyond 65 presses to contribute additional timing entropy.
+- Enhancement: Dice-only seed generation now warns that no hardware randomness is
+ included and the final hash shown on-screen must be kept secret.
- Bugfix: Detect RNG_SR_SEIS and RNG_SR_SECS, retry safely, and fail closed on persistent faults.
- Bugfix: Prevent access to Seed Vault entries through Seed XOR restore in Delta Mode. Thanks to
Rety for reporting this.
### shared/seed.py
@@ -78,6 +78,13 @@
You must enter at least 128 coin flips.'''
+DICE_ONLY_WARNING = '''\
+These dice rolls will be the only source of randomness for your seed. No hardware-generated randomness is mixed in.
+
+The hash shown while rolling is SECRET. Anyone who sees or photographs the final hash can recreate your wallet and steal the funds.
+
+Keep the screen hidden from people and cameras. If you verify the hash elsewhere, use only a trusted offline device and erase all traces afterward.'''
+
# maximum length for BIP-39 passphrase
MAX_PASS_LEN = 100
@@ -514,6 +521,10 @@ async def new_from_dice(nwords):
# Note: only 2.585 bits of entropy per roll, so need lots!
# 50 => 128bits, 99 => 256bits
+ prompt = '\n\nPress %s to continue, %s to exit.' % (OK, X)
+ if await ux_show_story(DICE_ONLY_WARNING + prompt, title='WARNING') == 'x':
+ return
+
seed = b''
count = 0
### testing/test_ux.py
@@ -229,6 +229,12 @@ def test_import_from_dice(count, nwords, goto_home, pick_menu_item, cap_story, n
pick_menu_item('Advanced')
pick_menu_item(f'{nwords} Word Dice Roll')
+ title, warning = cap_story()
+ assert title == 'WARNING'
+ assert 'only source of randomness' in warning
+ assert 'final hash can recreate your wallet' in warning
+ press_select()
+ time.sleep(0.1)
gave = ''
for i in range(count):Why this scored 22/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.