<p>This was <a href="https://github.com/Blockstream/Jade/issues/69" rel="nofollow noreferrer">answered</a> by Jamie Driver in the Jade repo.</p>
<blockquote>
<p>Short answer:
See this <a href="https://help.blockstream.com/hc/en-us/articles/9640569620761-How-does-Blockstream-Jade-generate-it-s-recovery-phrase-" rel="nofollow noreferrer">web post</a></p>
<p>Long answer:
If you opt for new wallet on Jade (ie for Jade to create you a new wallet on-board the hw - always the best option!), <a href="https://github.com/Blockstream/Jade/blob/eeaeb1103ba0e02ef05f778ba13f7846474e6520/main/keychain.c#L256" rel="nofollow noreferrer">this function</a> is called.
As you can see it gets some entropy whose length depends on how many words you want in your recovery phrase (12-words/128bits is usually considered sufficient, especially if paired with a passphrase, but we also offer 24-words/256bits).</p>
<p>The entropy is obtained by calling <a href="https://github.com/Blockstream/Jade/blob/eeaeb1103ba0e02ef05f778ba13f7846474e6520/main/random.c#L136" rel="nofollow noreferrer">get_random()</a> which gets entropy from the internal random machine.</p>
<p>When Jade starts up, the random machine is seeded with initial entropy from a number of sources/sensors on the chip - temperature, battery/usb current/voltages, radio noise etc. - these environment sensors themselves include a degree of random 'noise' as well as whatever they actually sample. See <a href="https://github.com/Blockstream/Jade/blob/eeaeb1103ba0e02ef05f778ba13f7846474e6520/main/random.c#L65" rel="nofollow noreferrer">here</a>.</p>
<p>Also during boot the camera is activated and a number of frames of image data is fed into the random seeding - again even is jade was lying on a desk, the 'black frames' captured would contain random noise. See the boot up code <a href="https://github.com/Blockstream/Jade/blob/eeaeb1103ba0e02ef05f778ba13f7846474e6520/main/main.c#L59" rel="nofollow noreferrer">here</a> and <a href="https://github.com/Blockstream/Jade/blob/eeaeb1103ba0e02ef05f778ba13f7846474e6520/main/main.c#L136" rel="nofollow noreferrer">here</a>.</p>
<p>During operation, the internal random machine frequently re-fetches source entropy from the sensors on the chip - temperature, battery/usb current/voltages, radio noise etc. as above (but not the camera) to feed into the machine. See wherever <a href="https://github.com/Blockstream/Jade/blob/eeaeb1103ba0e02ef05f778ba13f7846474e6520/main/random.c#L129" rel="nofollow noreferrer">refeed_entropy()</a> is called.</p>
<p>Additionally at any point the connected application can send in some entropy which jade also throws into its mix of seed entropy. <a href="https://github.com/Blockstream/Jade/blob/eeaeb1103ba0e02ef05f778ba13f7846474e6520/main/process/dashboard.c#L276" rel="nofollow noreferrer">See here</a> (Apps would usually feed in some entropy when they initially connect.)</p>
<p>NOTE: when source entropy is feed into the machine it is always cumulative/additional. We are always 'adding' some more seed randomness, not 'replacing' old data with new data.</p>
</blockquote>

CC BY-SA 4.0
2023-06-03T10:54:56.983Z
2023-06-03T10:54:56.983Z
Michael Folkson
<p>On the Jade hardware wallet/signer how is the entropy created for generating the mnemonic? Where is the code located in Jade repo?</p>
<p>This was asked by <a href="https://github.com/Blockstream/Jade/issues/67#issuecomment-1572153756" rel="nofollow noreferrer">samsam380</a>.</p>

<hardware-wallet><random><jade>
How is the entropy created for generating the mnemonic on the Jade hardware wallet?
Michael Folkson
# How is the entropy created for generating the mnemonic on the Jade hardware wallet?

(Asked by: username_0 on 2023-06-03)

On the Jade hardware wallet/signer how is the entropy created for generating the mnemonic? Where is the code located in Jade repo?

This was asked by [samsam380](https://github.com/Blockstream/Jade/issues/67#issuecomment-1572153756).

**Tags:** hardware-wallet, random, jade


---

## 1 answers

### Answer by username_0 on 2023-06-03. Score: 2 | Accepted answer

This was [answered](https://github.com/Blockstream/Jade/issues/69) by Jamie Driver in the Jade repo.

> Short answer:
> See this [web post](https://help.blockstream.com/hc/en-us/articles/9640569620761-How-does-Blockstream-Jade-generate-it-s-recovery-phrase-)
>
> Long answer:
> If you opt for new wallet on Jade (ie for Jade to create you a new wallet on-board the hw - always the best option!), [this function](https://github.com/Blockstream/Jade/blob/eeaeb1103ba0e02ef05f778ba13f7846474e6520/main/keychain.c#L256) is called.
> As you can see it gets some entropy whose length depends on how many words you want in your recovery phrase (12-words/128bits is usually considered sufficient, especially if paired with a passphrase, but we also offer 24-words/256bits).
>
> The entropy is obtained by calling [get\_random()](https://github.com/Blockstream/Jade/blob/eeaeb1103ba0e02ef05f778ba13f7846474e6520/main/random.c#L136) which gets entropy from the internal random machine.
>
> When Jade starts up, the random machine is seeded with initial entropy from a number of sources/sensors on the chip - temperature, battery/usb current/voltages, radio noise etc. - these environment sensors themselves include a degree of random 'noise' as well as whatever they actually sample. See [here](https://github.com/Blockstream/Jade/blob/eeaeb1103ba0e02ef05f778ba13f7846474e6520/main/random.c#L65).
>
> Also during boot the camera is activated and a number of frames of image data is fed into the random seeding - again even is jade was lying on a desk, the 'black frames' captured would contain random noise. See the boot up code [here](https://github.com/Blockstream/Jade/blob/eeaeb1103ba0e02ef05f778ba13f7846474e6520/main/main.c#L59) and [here](https://github.com/Blockstream/Jade/blob/eeaeb1103ba0e02ef05f778ba13f7846474e6520/main/main.c#L136).
>
> During operation, the internal random machine frequently re-fetches source entropy from the sensors on the chip - temperature, battery/usb current/voltages, radio noise etc. as above (but not the camera) to feed into the machine. See wherever [refeed\_entropy()](https://github.com/Blockstream/Jade/blob/eeaeb1103ba0e02ef05f778ba13f7846474e6520/main/random.c#L129) is called.
>
> Additionally at any point the connected application can send in some entropy which jade also throws into its mix of seed entropy. [See here](https://github.com/Blockstream/Jade/blob/eeaeb1103ba0e02ef05f778ba13f7846474e6520/main/process/dashboard.c#L276) (Apps would usually feed in some entropy when they initially connect.)
>
> NOTE: when source entropy is feed into the machine it is always cumulative/additional. We are always 'adding' some more seed randomness, not 'replacing' old data with new data.


---

