Bitcoin Forum
May 29, 2024, 11:13:34 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: URGENT is electrum affected?  (Read 135 times)
Folio (OP)
Member
**
Offline Offline

Activity: 76
Merit: 35


View Profile
May 11, 2021, 07:41:53 PM
 #1

Hi, the guys at cakewallet have warned people who had a 12 word wallet in their old version.
Is electrum affected by the same problem too?

https://www.reddit.com/r/Monero/comments/n9yypd/urgent_action_needed_for_bitcoin_wallets_cake/
hosseinimr93
Legendary
*
Online Online

Activity: 2408
Merit: 5281



View Profile
May 11, 2021, 08:46:41 PM
 #2

Electrum generates the seed phrase 100% random.
If you have downloaded electrum from its official website and you are the only one who has access to your seed, there is nothing to worry about.
Just keep your seed phrase offline and in a safe place.

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
BitMaxz
Legendary
*
Offline Offline

Activity: 3262
Merit: 2979


:( My PC broke due trying to recover an old wallet


View Profile WWW
May 11, 2021, 11:46:18 PM
 #3

I read the link and they only talking about their wallet, not Electrum.
This is what they said

Quote
This issue is NOT with the Monero wallets – but only with Bitcoin wallets.

It means the bitcoin wallets from their own app not the other Bitcoin wallets like Electrum, mycelium, wasabi, or any bitcoin wallets.

There might be sort of a problem on their wallet that generates invalid random seeds or maybe there are other reasons why they are pushing users to generate a new seed(Maybe they are compromised or maybe they want to log all generated seeds).

Anyway, If you are using Cake wallet for storing your BTC I suggest you switch to other wallets like Electrum. Or if you already made a Bitcoin wallet on Cake wallet I'm sure the seed you generated from their old cake wallet will also work on Electrum just make sure you know the exact derivation path of that wallet.

However, it still recommended to use a newly generated seed from Electrum compared to the seed you generated from the cake wallet.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
pooya87
Legendary
*
Offline Offline

Activity: 3458
Merit: 10604



View Profile
May 12, 2021, 02:49:51 AM
 #4

No, Electrum is not affected since it is using RNGs correctly!


It seems like poor code by Cake wallet specifically since they claim that it only affects the bitcoin wallet not the Monero wallet. Why should the entropy generation be different based on wallet type?! Key sizes are the same and the byte array (the entropy) generated for either individual keys or the master key or the entropy for mnemonic generation is all the same.

Also size of the entropy should not affect the security or lack of it as long as it is bigger than 128 bits. Saying the "12-word Bitcoin seed" was vulnerable while the 24-word wasn't raises serious questions about the "fix" and whether there are serious flaws in their cryptography!

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
FinneysTrueVision
Sr. Member
****
Offline Offline

Activity: 1666
Merit: 379


Top Crypto Casino


View Profile WWW
May 12, 2021, 03:41:23 AM
 #5

The issue only affects Cake Wallet. This is why I don't use altcoin wallets to store bitcoin. Cake Wallet is a Monero focused wallet that recently started adding other currencies recently. Their experience is not with Bitcoin so I wouldn't expect it to have all the necessary features and it might not have the same security standards that we expect in the bitcoin community.

█████████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████
█████████████████████████
.
BC.GAME
▄▄░░░▄▀▀▄████████
▄▄▄
██████████████
█████░░▄▄▄▄████████
▄▄▄▄▄▄▄▄▄██▄██████▄▄▄▄████
▄███▄█▄▄██████████▄████▄████
███████████████████████████▀███
▀████▄██▄██▄░░░░▄████████████
▀▀▀█████▄▄▄███████████▀██
███████████████████▀██
███████████████████▄██
▄███████████████████▄██
█████████████████████▀██
██████████████████████▄
.
CASINO
.
SPORTS
.
RACING
OFFICIAL PARTNER OF
Argentina NT
CLOUD9
█░░░░░░█░░░░░░█
▀███▀░░▀███▀░░▀███▀
▀░▀░░░░▀░▀░░░░▀░▀
░░░░░░░░░░░░
▀██████████
░░░░░███░░░░
░░█░░░███▄█░░░
░░██▌░░███░▀░░██▌
░█░██░░███░░░█░██
░█▀▀▀█▌░███░░█▀▀▀█▌
▄█▄░░░██▄███▄█▄░░▄██▄
▄███▄
░░░░▀██▄▀


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
HCP
Legendary
*
Offline Offline

Activity: 2086
Merit: 4316

<insert witty quote here>


View Profile
May 12, 2021, 06:08:34 AM
Merited by pooya87 (1)
 #6

Our developers found that insufficient randomness was used while generating the 12-word Bitcoin seed. As we continue to strive to improve the platform and security, BTC wallets generated from version 4.1.7 onwards use a 24-word seed as well as we replaced random bytes generation by platform specific generator further enhancing the security of the wallets.

and then a bit further down the thread:
Hang on, was this previously using Random from the math package to generate the seed? I want to make sure I'm reading this right.

Edit: Yep, that appears to be the case.

The randomBytes function is called by generateMnemonic without a second parameter, causing it to use the insecure random implementation: https://github.com/cake-tech/cake_wallet/blob/b67bb0664f7268c31c24bd9fb9cbd438c691f5e3/lib/bitcoin/bitcoin_mnemonic.dart#L11-L22. Good god.



The Dart API says:
Random class

A generator of random bool, int, or double values.

The default implementation supplies a stream of pseudo-random bits that are not suitable for cryptographic purposes.
Use the Random.secure constructor for cryptographic purposes.
(NOTE: emphasis added)

Constructors

Random([int? seed])
Creates a random number generator. [...]

Random.secure()
Creates a cryptographically secure random number generator. [...]


Looking at the Cake Wallet github code that was linked... you can see if the randomBytes method is called without the "secure" parameter being set to "true", it will default to "false" and you end up with the insecure Random() number generator instead of the Random.secure() cryptographically secure RNG! #yikes Shocked Shocked Shocked

And old note I found here: http://commondatastorage.googleapis.com/dartlang-api-docs/13991/dart_math/Random.html indicates that the original insecure Random() uses "up to" 64 bits of seed Undecided
Quote
Implementation note: The default implementation uses up to 64-bits of seed.

█████████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████
█████████████████████████
.
BC.GAME
▄▄░░░▄▀▀▄████████
▄▄▄
██████████████
█████░░▄▄▄▄████████
▄▄▄▄▄▄▄▄▄██▄██████▄▄▄▄████
▄███▄█▄▄██████████▄████▄████
███████████████████████████▀███
▀████▄██▄██▄░░░░▄████████████
▀▀▀█████▄▄▄███████████▀██
███████████████████▀██
███████████████████▄██
▄███████████████████▄██
█████████████████████▀██
██████████████████████▄
.
..CASINO....SPORTS....RACING..
█░░░░░░█░░░░░░█
▀███▀░░▀███▀░░▀███▀
▀░▀░░░░▀░▀░░░░▀░▀
░░░░░░░░░░░░
▀██████████
░░░░░███░░░░
░░█░░░███▄█░░░
░░██▌░░███░▀░░██▌
░█░██░░███░░░█░██
░█▀▀▀█▌░███░░█▀▀▀█▌
▄█▄░░░██▄███▄█▄░░▄██▄
▄███▄
░░░░▀██▄▀


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
pooya87
Legendary
*
Offline Offline

Activity: 3458
Merit: 10604



View Profile
May 12, 2021, 08:18:08 AM
 #7

https://github.com/cake-tech/cake_wallet/blob/b67bb0664f7268c31c24bd9fb9cbd438c691f5e3/lib/bitcoin/bitcoin_mnemonic.dart#L112
This is another good example of why people shouldn't use unpopular low quality multi currency wallets that keep popping up these days, specially for mobile! You see this one that is open source had such a serious flaw who knows what the closed source ones do!

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
ranochigo
Legendary
*
Offline Offline

Activity: 2982
Merit: 4193



View Profile
May 12, 2021, 03:16:54 PM
 #8

There might be sort of a problem on their wallet that generates invalid random seeds or maybe there are other reasons why they are pushing users to generate a new seed(Maybe they are compromised or maybe they want to log all generated seeds).

Anyway, If you are using Cake wallet for storing your BTC I suggest you switch to other wallets like Electrum. Or if you already made a Bitcoin wallet on Cake wallet I'm sure the seed you generated from their old cake wallet will also work on Electrum just make sure you know the exact derivation path of that wallet.
It doesn't generate invalid random seeds, quite the opposite; it generates valid non-random seed. Electrum uses randrange which is seeded from the OS's CSPRNG (/dev/urandom) and it thus generates a seed with sufficient entropy and is not prone to issue like this. Unfortunately, there is just way too many developers who overlook certain aspects which are arguably pretty important and putting their user's funds at risk. This isn't the first time something like this has happened.

Are the signatures generated by the wallet deterministic or do they rely on the flawed RNG as well?

█████████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████
█████████████████████████
.
BC.GAME
▄▄░░░▄▀▀▄████████
▄▄▄
██████████████
█████░░▄▄▄▄████████
▄▄▄▄▄▄▄▄▄██▄██████▄▄▄▄████
▄███▄█▄▄██████████▄████▄████
███████████████████████████▀███
▀████▄██▄██▄░░░░▄████████████
▀▀▀█████▄▄▄███████████▀██
███████████████████▀██
███████████████████▄██
▄███████████████████▄██
█████████████████████▀██
██████████████████████▄
.
..CASINO....SPORTS....RACING..
█░░░░░░█░░░░░░█
▀███▀░░▀███▀░░▀███▀
▀░▀░░░░▀░▀░░░░▀░▀
░░░░░░░░░░░░
▀██████████
░░░░░███░░░░
░░█░░░███▄█░░░
░░██▌░░███░▀░░██▌
░█░██░░███░░░█░██
░█▀▀▀█▌░███░░█▀▀▀█▌
▄█▄░░░██▄███▄█▄░░▄██▄
▄███▄
░░░░▀██▄▀


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!