5

What randomness algo does Yoroi use for the wallet generation? Interested in seeing how secure it is.

1 Answer 1

1

Yoroi is using the bip39 JavaScript library to generate the mnemonic.

When we look at its code, we can discover the generation is actually pretty simple:

function generateMnemonic(strength, rng, wordlist) {
    strength = strength || 128;
    if (strength % 32 !== 0) {
        throw new TypeError(INVALID_ENTROPY);
    }
    rng = rng || randomBytes;
    return entropyToMnemonic(rng(strength / 8), wordlist);
}

We see that as no random number generator (rnd) is defined, it uses the randombytes library by default, which is in place using the Crypto.getRandomValues() function that is provided from your browser.

To sum this up, Yoroi is using randomness algorithm of your browser, which - depending on the browser - is your system-level entropy source.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.