Bitcoin Forum
July 10, 2024, 07:15:08 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: [1]
1  Bitcoin / Electrum / Re: Can electrum cold storage be attacked through transactions? on: December 05, 2020, 08:34:55 PM


If he loaded the phishing old version of Electrum, generated an offline transaction, then sent it over to his offline PC, signed it, back to his online computer, if he tried to broadcast the transaction he would have the fake phishing window saying to upgrade. Some people, especially since BTC almost hit $20K and some people are in a rush to sell before it drops, might click the link, download and open the executable. The fake electrum then sends the private keys to the hackers server. However since he has a cold storage setup, there is nothing to send over, maybe the master public key which doesn't really help them get anything. I don't think the fake version went thru the hassle of creating a fake looking offline transaction, hoping the user would sign it offline without noticing the different destination or change addresses. I never used the fake version but I am assuming its not this advanced. I think it went after the 99% of people who used Election online and assumed that if you are clever enough to hold your keys offline, you are clever enough not to fall for their phishing scam.


Exactly I would like to add that a good way to make sure that you are signing the correct thing, in case you have malware versions of electrum on both computers is to decode the raw transaction before sending it, if possible on a pc or mobile offline

thanks to all participants in the thread
2  Bitcoin / Electrum / Re: Can electrum cold storage be attacked through transactions? on: December 01, 2020, 02:57:30 PM

Not necessarily. If there is a vulnerability in the process used to generate the initial entropy, such that Electrum bases the whole key derivation process on pre-determined or deterministic entropy, then the seed phrase it produces will generate the same keys on other machines, while at the same time being known to the attacker. This is why I suggested that best way to mitigate would be to generate you own entropy by flipping a coin.

yes, the entropy of the seed may be weak, but if I add a passphrase using the diceware list, with 6 word, will I be safe?

thanks for your reply
3  Bitcoin / Electrum / Re: Can electrum cold storage be attacked through transactions? on: December 01, 2020, 01:51:18 PM

Generating weak keys. In theory, the OS could compromise Electrum and create a deterministic seed which would allow the attacker to compromise your funds without any connection to the internet. I don't find this much of a concern (if at all), I've never seen anything like this and Electrum might have implemented sanity checks (or the OS) to thwart such attempts anyways.

It doesn't hurt to validate the .iso file anyways.

true I had not thought about it, thank you very much for giving me that point of view

although normally I use a passphrase and check with a test seed and on another pc with electrum if it derives different addresses.


(Is more of a reply to ranochigo's post, but system entropy is also used to derive private keys)

The kernel has its own entropy source, an ISO that fails the checksum check could have a backdoor implanted in the kernel random number generator /dev/random to discard entropy from hardware and return its own predictable entropy. This can even affect a verified version of Electrum, along with all other wallets like Core, even if a lot of programs might have already been read from /dev/random, as long as the sequence of bits generated since boot can be calculated. Just know how many bits Electrum uses for each secret and iterate through the entropy brute-forcing I..I+N bits with I beginning from 0 up to the total number of bits generated.

The problem here is that there is no system call to give the kernel RNG your own random bits to use. Even if there was, you wouldn't be able to provide it securely (It would have to go through the terminal, and then bash).

If the cold system will generate weak keys, if it uses the same seed and a passphrase in that system and in another pc, different keys should be generated, right?
4  Bitcoin / Electrum / Re: Can electrum cold storage be attacked through transactions? on: December 01, 2020, 01:45:10 PM


Follow up question then: Do you have persistent storage which is saving your wallet file, or are you restoring it from seed every time you want to use it?

i dont have persitent storage, restore the seed manually.

thank you very much for response.



5  Bitcoin / Electrum / Re: Can electrum cold storage be attacked through transactions? on: December 01, 2020, 12:15:53 AM
As far as the QR core transportation is concerned, vulnerabilities cannot be stuffed into a QR code itself because it just encodes a query string (something like "address=bc1qabcdefg&amount=0.01&label=My address"), there is nothing an attacker can put in there to implant malware in Electrum, although they can of course change the address which'll generate a different QR code causing you to get scammed.

You did verify the checksum of the live ISO you downloaded, right? There have been cases of Linux distribution websites getting hacked and having malicious ISOs places instead. Somebody could place a package in the operating system specifically for snooping on Electrum private keys.


yes, I checked the iso image

Anyway, even if there was a malicious software in the linux iso that could spy on the keys, how could it send them out of the computer if it will never have access to the internet and the only information that comes out is via QR, with a transaction?

no usb
no network
this computer will never be used for anything else
6  Bitcoin / Electrum / Re: Can electrum cold storage be attacked through transactions? on: November 30, 2020, 11:58:13 PM
Could you tell me some way to make my system stronger?
I would start by using the most up to date version of Electrum. Is there any particular reason you are still using 3.3.8? Even Tails has updated to Electrum 4.0.2.

I would be most concerned about physical access to your set up. Are you using full disk encryption on your airgapped device? I would suggest LUKS.

Thank you very much for the reply

i used 3.3.8 because every time i want update electrum, i need create a cd and destroy it.

The computer does not have any hard disk, it is a live system started in a USB, every time I use it I disconnect from the current to erase all the data stored in RAM, and the computer and USB are well protected from possible physical attacks

the theory says that no data is saved on the usb anyway
7  Bitcoin / Electrum / Re: Can electrum cold storage be attacked through transactions? on: November 29, 2020, 06:42:01 PM
Side channels through the analysis of time delays and CPU spikes when signing could present an issue if someone with plenty of resources is really really interested in your coins.

what do you mean with that? Can any relevant information be obtained through how the transaction was signed?


Could you tell me some way to make my system stronger?

I am simply curious to know how people with more experiences do it, I am not a very specialized person in the technical field but I try to learn everything I can

thanks so much
8  Bitcoin / Electrum / Can electrum cold storage be attacked through transactions? on: November 29, 2020, 06:31:10 PM
I may sound a bit paranoid, but I ask the following:

I have a pc without a network card
does not have usb
it will never be connected to the internet
run a live version of linux with electrum 3.3.8 loaded and its signatures verified
I use it with cold signatures through QR codes

Let's imagine that I create a transaction from the online version of electrum on my usual PC.
I bring it to my pc offline through a qr code and sign the transaction
I go through another qr code back to the online pc and launch it to the bitcoin network verifying the addresses and amounts in each case.

is there any way to break this system and attack it?

I also use trezor for another part of my coins but I don't like to put all the eggs in one basket or company

thanks so much
9  Bitcoin / Development & Technical Discussion / Re: 128 bits passphrase is enougth safe for online storage? on: August 31, 2020, 10:32:11 AM
TL;DR there are only two ways a GPG encrypted file can get compromised: By guessing the password or by using a backdoored GPG with a crippled AES cipher (or a vulnerable version of GPG that leaks AES keys). If you construct your diceware password without a computer and use a recent official GPG build with the default settings you should be safe. And also, you only need 10 diceware words to get 128 bits of entropy, each word is about 12.92 bits of entropy so 12 words will actually give you more, about 155 bits of entropy.



First let's assume the attacker does not know you used diceware.

For guessing the password, an attacker who knows nothing about it's composition will just run a brute force attack with every combination of graphical ASCII characters, and you can figure out that this takes too long to succeed.

There are 128-32-1=95 printable ASCII characters people usually make passwords from. So they make 95^1 + 95^2 + ... + 95^(N, the max length of password they're willing to crack) guesses to get the password. It's an astronomical number of guesses they have to make so we can rule out the possibility of someone successfully doing that for not small N. Even if they only tried cracking N length passwords they still have to do 95^N guesses.

Now let's assume they do know you used diceware and that your entropy came from things like coin flips and dice rolls so that the entropy is truly random. Even if they knew that and also how many words are in your diceware phrase, they still have to make 7776^(number of words) guesses to exhaust the entire random space. A diceware list has 7776 words in it.

So if you use 12 words in your diceware, and each of the words are on average 6 characters long, then they have to make 7776^12 = about 2^155 diceware guesses, or without using any diceware knowledge, a 95^(6*10+ 5 spaces) = 2^427 65-character brute force guesses (or an uncountable number of layman's 1,2,..,65-character brute force guesses). So the size of the random space to search dramatically drops with diceware but that isn't sometime to worry about because it's still too high to be exhausted by modern machines in the foreseeable future.



The AES cipher implementations used in GPG should be secure, given that there aren't any reported CVEs about it on https://www.cvedetails.com/vulnerability-list/vendor_id-4711/Gnupg.html. In fact, there are only 27 vulnerabilities reported on the entire program.

If you want maximum security you should download the GPG binaries or compile their source from their website, and verify the signature of what you download to make sure it's official. There have been cases of linux distributions getting compromised and delivering malicious packages so someone can theoretically replace the bundled official GPG with their own flawed GPG release. However, that particular case hasn't happened yet so if you only have a bundled GPG it should be safe to use that too (until such a case does play out, then I personally would migrate away from the impacted distribution).

In any case, if someone steals the encrypted file from Google drive, they have to go through all of the above labor to crack open the file.

P.s. Even quantum computers won't break AES 128 bit. Fully functional quantum computers will reduce the search space from 2128 to 264 which is still far away from being broken / insecure.

AES-256 can still withstand quantum computers because Grover's algorithm used in quantum computers would break it in 2^128 rounds. I don't think there's an optimization to half the AES-192 search space yet, at least according to stack exchange.

Thank you very much for your answers.

I understand that you mean that the version I use of gpg has some vulnerability or has been modified.

I use the version that ubuntu brings by default, I have not reviewed the code because my coding level is not good enough, but I understand that having many eyes looking is relatively safe.

Thanks once again, have a nice day.
10  Bitcoin / Development & Technical Discussion / Re: 128 bits passphrase is enougth safe for online storage? on: August 31, 2020, 10:23:07 AM
GPG is not an algorithm.
So, it really depends on the cipher used.

Usually, for backups, you want to use symmetric ciphers (e.g. AES or CAST5, both were/are standards used by gpg under linux).

Encrypting a file (or data, generally) asymmetrically is rarely needed. What you usually do is to encrypt the data/file with a symmetric cipher and encrypt that symmetric key (which is way shorter than an asymmetric one) with an asymmetric cipher.
Symmetric crypto is way faster than asymmetric one.

To at least partially answer your question, the security of keys compared (by the NIST):

(source)

Bitcoin is using 256 bit EC keys. So, using AES with 128 bit keys is roughly as secure as EC with 256 bit keys.
And both are considered secure by the NIST (and the rest of the world). (Source: https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-131Ar2.pdf)


Now, to finally answer your question: It depends on the algorithm. 128 bit AES is secure. 128 bit RSA is not.
You want to have a bit strength of at least 128 bit and you are fine.


However, the encryption is not everything you need to worry about. A few additional things would be:
  • Where is the decryption key stored?
  • Is your PC definitely not compromised upon encryption?
  • How do you generate the key (TRNG, dice)?
  • How has your seed been generated (TRNG)?



P.s. Even quantum computers won't break AES 128 bit. Fully functional quantum computers will reduce the search space from 2128 to 264 which is still far away from being broken / insecure.

Thanks for the answer I forgot to mention that I would use symmetric AES 256, and my question was if a key composed of 12 words from the diceware list would be secure enough

reading I have seen that keys with less than 80 bits of entropy could be broken by specialized attackers.

  • the key is store in a paper and in my mind
  • 1 pc used exclusively with bitcoin, not internet connection ever
  • i generate the key with method diceware.
  • the seed is generated in the same computer with a checked version of electrum

11  Bitcoin / Development & Technical Discussion / 128 bits entropy passphrase is enougth safe for online storage? on: August 30, 2020, 02:46:44 PM
Let's imagine that for some reason I don't have a safe place to store my seeds + passphrases and I decide to encrypt it with gpg (aes-256) using a 128-bit entropy password (12 words diceware list) and upload it to google drive

I would write that password on a piece of paper that I could carry and memorize it

I know it is not recommended, but would it be safe enough against any type of attack even from qualified attackers such as governments, NSAs, cluster servers, bitcoin miners?

sorry for my english, tranks
Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!