# Weak seed phrase generation at Metamask

**URL:** <https://community.metamask.com/t/weak-seed-phrase-generation-at-metamask/26815>\
**Category:** Security\
**Tags:** community-keep\
**Created:** [August 28, 2023, 6:52pm UTC](https://community.metamask.com/t/weak-seed-phrase-generation-at-metamask/26815 "2023-08-28T18:52:07Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![pick0ut](https://avatars.discourse-cdn.com/v4/letter/p/e47774/32.png) [@pick0ut](https://community.metamask.com/u/pick0ut)\
**Post date:** [August 28, 2023, 6:52pm UTC](https://community.metamask.com/t/weak-seed-phrase-generation-at-metamask/26815/1 "2023-08-28T18:52:07Z")

</div>

I found in the latest MetaMask audit from Cure53 in March 2023

And the documentation says on slide 5 that MetaMask uses 32 bit entropy.

Do I understand correctly that by creating a wallet in MetaMask seed phrase is created with 32bit entropy?

I have shared links to the sources of my posts, but the forum won’t let me do it ☹

---

<div class="post-metadata">

**Author:** ![nakedwinnie](https://dub1.discourse-cdn.com/metamask/user_avatar/community.metamask.com/nakedwinnie/32/5551_2.png) [@nakedwinnie](https://community.metamask.com/u/nakedwinnie)\
**Post date:** [August 28, 2023, 7:11pm UTC](https://community.metamask.com/t/weak-seed-phrase-generation-at-metamask/26815/2 "2023-08-28T19:11:55Z")

</div>

Hey @pick0ut, this article on our Knowledge Base may provide more helpful info:

> **[How does MetaMask generate your keys?](https://support.metamask.io/hc/en-us/articles/360020091432-How-does-MetaMask-generate-your-keys-)**
>
> In the world of cryptographic technologies, your accounts are only as safe as your secret keys are secret and unguessable. For that reason, it's healthy to ask: Where are my MetaMask keys coming fr...

---

<div class="post-metadata">

**Author:** ![pick0ut](https://avatars.discourse-cdn.com/v4/letter/p/e47774/32.png) [@pick0ut](https://community.metamask.com/u/pick0ut)\
**Post date:** [August 28, 2023, 7:22pm UTC](https://community.metamask.com/t/weak-seed-phrase-generation-at-metamask/26815/3 "2023-08-28T19:22:15Z")

</div>

I’ve read about it, it doesn’t answer the question I asked.

Bip39 uses 128 bit entropy, but why does the Cure53 report say 32 bit entropy?

It looks like all wallets created in MetaMask extension have 32 bit entropy instead of 128 bit entropy

---

<div class="post-metadata">

**Author:** ![nakedwinnie](https://dub1.discourse-cdn.com/metamask/user_avatar/community.metamask.com/nakedwinnie/32/5551_2.png) [@nakedwinnie](https://community.metamask.com/u/nakedwinnie)\
**Post date:** [August 28, 2023, 7:56pm UTC](https://community.metamask.com/t/weak-seed-phrase-generation-at-metamask/26815/4 "2023-08-28T19:56:02Z")

</div>

If you are referring to “The number of child keys that can be derived from any extended key constitutes 2³² maximum, so each child key has an associated index.”

2³² = 32 bit entropy. But this is for child keys.  
I think the correct answer is that this is an implementation of BIP32: [BIP 0032 - Bitcoin Wiki](https://en.bitcoin.it/wiki/BIP_0032)

---

<div class="post-metadata">

**Author:** ![pick0ut](https://avatars.discourse-cdn.com/v4/letter/p/e47774/32.png) [@pick0ut](https://community.metamask.com/u/pick0ut)\
**Post date:** [August 28, 2023, 8:02pm UTC](https://community.metamask.com/t/weak-seed-phrase-generation-at-metamask/26815/5 "2023-08-28T20:02:17Z")

</div>

No, I’m interested in creating a seed phrase exactly, you use BIP39 to create it. But, on the link above you sent an article and if you go to the site and read about getRandomValues() method, it uses only 32 bits of system time and you use 32 bits to create a wallet?

---

<div class="post-metadata">

**Author:** ![pick0ut](https://avatars.discourse-cdn.com/v4/letter/p/e47774/32.png) [@pick0ut](https://community.metamask.com/u/pick0ut)\
**Post date:** [August 28, 2023, 8:17pm UTC](https://community.metamask.com/t/weak-seed-phrase-generation-at-metamask/26815/6 "2023-08-28T20:17:57Z")

</div>

![image](https://europe1.discourse-cdn.com/metamask/original/3X/2/1/2198d243bc62400104a2f4f50b017463e9e4401d.png)  
This is this screenshot from the audit I’m talking about, it says 32bit entropy.

Maybe I misunderstood something

---

<div class="post-metadata">

**Author:** ![nakedwinnie](https://dub1.discourse-cdn.com/metamask/user_avatar/community.metamask.com/nakedwinnie/32/5551_2.png) [@nakedwinnie](https://community.metamask.com/u/nakedwinnie)\
**Post date:** [August 28, 2023, 8:40pm UTC](https://community.metamask.com/t/weak-seed-phrase-generation-at-metamask/26815/7 "2023-08-28T20:40:24Z")

</div>

This is for generating child keys from an HD wallet. This does not mean we use 32 bits to create a wallet. The audit is for [GitHub - MetaMask/key-tree](https://github.com/MetaMask/key-tree) which is a library used in MetaMask for deriving child keys. This is not how the seed phrase is created

---

<div class="post-metadata">

**Author:** ![pick0ut](https://avatars.discourse-cdn.com/v4/letter/p/e47774/32.png) [@pick0ut](https://community.metamask.com/u/pick0ut)\
**Post date:** [August 28, 2023, 8:49pm UTC](https://community.metamask.com/t/weak-seed-phrase-generation-at-metamask/26815/8 "2023-08-28T20:49:50Z")

</div>

Could you suggest then how the seed phrase itself is created in MetaMask?

---

<div class="post-metadata">

**Author:** ![pick0ut](https://avatars.discourse-cdn.com/v4/letter/p/e47774/32.png) [@pick0ut](https://community.metamask.com/u/pick0ut)\
**Post date:** [August 28, 2023, 8:59pm UTC](https://community.metamask.com/t/weak-seed-phrase-generation-at-metamask/26815/10 "2023-08-28T20:59:10Z")

</div>

I have read this, I have an understanding of how to create a normal wallet on BIP39, I am interested in how to create a wallet in MetaMask.

Just from the information you gave above, you are using PRNG.  
Although there is some documentation that the entropy is not enough when generating and instead of 128 bits it has only 32.

Is there any way I can share a link to the documentation?  
https:// milksad. info

---

<div class="post-metadata">

**Author:** ![nakedwinnie](https://dub1.discourse-cdn.com/metamask/user_avatar/community.metamask.com/nakedwinnie/32/5551_2.png) [@nakedwinnie](https://community.metamask.com/u/nakedwinnie)\
**Post date:** [August 28, 2023, 9:07pm UTC](https://community.metamask.com/t/weak-seed-phrase-generation-at-metamask/26815/11 "2023-08-28T21:07:53Z")

</div>

Who’s documentation? You can break the link by adding spaces, i.e. www. gooogle . com

---

<div class="post-metadata">

**Author:** ![pick0ut](https://avatars.discourse-cdn.com/v4/letter/p/e47774/32.png) [@pick0ut](https://community.metamask.com/u/pick0ut)\
**Post date:** [August 29, 2023, 6:27pm UTC](https://community.metamask.com/t/weak-seed-phrase-generation-at-metamask/26815/12 "2023-08-29T18:27:53Z")

</div>

Here’s the source https:// milksad. info  
It states that the Mersenne Twister PRNG method is unreliable.  
Your documentation also says you use PRNG to generate the initial phrase, I would like to know what type is used for this.

Your forum blocked me from replying for 24 hours, that’s why the wait was so long ☹

---

<div class="post-metadata">

**Author:** ![pick0ut](https://avatars.discourse-cdn.com/v4/letter/p/e47774/32.png) [@pick0ut](https://community.metamask.com/u/pick0ut)\
**Post date:** [August 31, 2023, 12:55pm UTC](https://community.metamask.com/t/weak-seed-phrase-generation-at-metamask/26815/13 "2023-08-31T12:55:51Z")

</div>

Hey, maybe you missed my answer 😶

---

<div class="post-metadata">

**Author:** ![nakedwinnie](https://dub1.discourse-cdn.com/metamask/user_avatar/community.metamask.com/nakedwinnie/32/5551_2.png) [@nakedwinnie](https://community.metamask.com/u/nakedwinnie)\
**Post date:** [August 31, 2023, 2:43pm UTC](https://community.metamask.com/t/weak-seed-phrase-generation-at-metamask/26815/14 "2023-08-31T14:43:42Z")

</div>

Hey sorry! Asking the team now.

> [@pick0ut](#):
>
> Your forum blocked me from replying for 24 hours, that’s why the wait was so long

Sorry that this happened, it’s to prevent spammers, it just so happened that you sent a lot of posts the first day your account was created

---

<div class="post-metadata">

**Author:** ![nakedwinnie](https://dub1.discourse-cdn.com/metamask/user_avatar/community.metamask.com/nakedwinnie/32/5551_2.png) [@nakedwinnie](https://community.metamask.com/u/nakedwinnie)\
**Post date:** [August 31, 2023, 3:14pm UTC](https://community.metamask.com/t/weak-seed-phrase-generation-at-metamask/26815/15 "2023-08-31T15:14:51Z")

</div>

MetaMask utilizes the browser’s PRNG, which in turn leverages the Web Crypto API. You can find more information about the Web Crypto API [here](https://developer.mozilla.org/en-US/docs/Web/API/Web_Crypto_API).

The entropy of this PRNG is 16 bytes, equivalent to 128 bits. This means that the number of possible keys is 2^128.

To help you visualize this vast number, consider this analogy: If our Earth were a grain of sand within a much larger Earth, there would be approximately 2^80 such Earths. Now, how many grains of sand would there be in total? The answer is 2^160.

In other words, the probability of randomly generating a specific number using our PRNG is akin to finding a specific grain of sand on half of a super Earth. This super Earth is filled with super grains of sand, each of which contains a full Earth’s worth of regular grains of sand.

---

<div class="post-metadata">

**Author:** ![system](https://europe1.discourse-cdn.com/metamask/original/3X/3/8/3812168020a49f264784b1dbfcf12435abbb09ad.png) [@system](https://community.metamask.com/u/system)\
**Post date:** [September 27, 2023, 6:52pm UTC](https://community.metamask.com/t/weak-seed-phrase-generation-at-metamask/26815/16 "2023-09-27T18:52:20Z")

</div>

Closed on September 27, 2023, 6:52pm UTC

This topic was automatically closed after 30 days. New replies are no longer allowed.
