Post
Topic
Board Bitcoin Discussion
Re: Private Key by 256 coin flips
by
bitmover
on 23/10/2019, 18:49:35 UTC
Can you explain the algorithm and the process of private key generation by a hardware wallet (ley's say by Ledger)?

Ledger nano does not generate private keys, but a BIP 39 24 word mnemonic seed. Different from what you are doing, because generating private keys directly (however, this allows you to create just one address)

I was able to find this information regarding randomness of the process (i think this is what you are looking for)


Quote
Here’s how a BIP 39 24-word mnemonic seed is generated:

The device generates a sequence of 256 random bits using the true random number generator (TRNG) built into the device’s Secure Element.
The first 8 bits of the SHA-256 hash of the initial 256 bits is appended to the end, giving us 264 bits.
All 264 bits are split into 24 groups of 11 bits.
Each group of 11 bits is interpreted as a number in the range 0 - 2047, which serves as an index to the BIP 39 wordlist, giving us 24 words.
https://ledger.readthedocs.io/en/latest/background/master_seed.html


Quote
Ledger devices also generate secrets securely with a large amount of entropy using an AIS-31 compliant true random number generator (TRNG). As such, it is more secure to use the device’s internally generated secrets rather than importing a secret from elsewhere which could have been compromised before being loaded onto the device.
https://ledger.readthedocs.io/en/latest/background/personal_security_devices.html#personal-security-devices

If you think their entropy is not good enough, you can also add a passphrase to your seed, it will add an additional entropy to your private keys generation.