random – How is the entropy created for producing the mnemonic on the Jade {hardware} pockets?

2 views 8:57 pm 0 Comments June 3, 2023


This was answered by Jamie Driver within the Jade repo.

Quick reply:
See this internet publish

Lengthy reply:
If you happen to go for new pockets on Jade (ie for Jade to create you a brand new pockets on-board the hw – all the time the most suitable choice!), this perform is named.
As you’ll be able to see it will get some entropy whose size relies on what number of phrases you need in your restoration phrase (12-words/128bits is normally thought of ample, particularly if paired with a passphrase, however we additionally provide 24-words/256bits).

The entropy is obtained by calling get_random() which will get entropy from the inner random machine.

When Jade begins up, the random machine is seeded with preliminary entropy from numerous sources/sensors on the chip – temperature, battery/usb present/voltages, radio noise and many others. – these setting sensors themselves embrace a level of random ‘noise’ in addition to no matter they really pattern. See right here.

Additionally throughout boot the digicam is activated and numerous frames of picture knowledge is fed into the random seeding – once more even is jade was mendacity on a desk, the ‘black frames’ captured would comprise random noise. See the boot up code right here and right here.

Throughout operation, the inner random machine regularly re-fetches supply entropy from the sensors on the chip – temperature, battery/usb present/voltages, radio noise and many others. as above (however not the digicam) to feed into the machine. See wherever refeed_entropy() is named.

Moreover at any level the linked software can ship in some entropy which jade additionally throws into its mixture of seed entropy. See right here (Apps would normally feed in some entropy after they initially join.)

NOTE: when supply entropy is feed into the machine it’s all the time cumulative/further. We’re all the time ‘including’ some extra seed randomness, not ‘changing’ previous knowledge with new knowledge.

Leave a Reply

Your email address will not be published. Required fields are marked *