Bitcoin Forum
June 25, 2024, 08:13:39 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 [39] 40 41 »
761  Bitcoin / Wallet software / Re: secure private key handling on: July 22, 2014, 10:23:24 PM
There is nothing on it... and until I received funds there, every app will have had plenty of time to persist the key, wont it?

Probably true if it's a human generating the key, but what if it's a website application that's generating the key? I could easily see a case where the key is generated, persisted only to the disk cache, then a page with the address is sent to some user, and then a crash occurs...

Of course servers shouldn't be generating private keys at all, they should either be using a cache of public addresses or generating addresses deterministically from a master public key. 
762  Bitcoin / Wallet software / Re: What's the client with the best random number generation algorithm? on: July 22, 2014, 10:02:43 PM
I don't know what the very best is, but they're definitely not all the same. I somewhat answered this over here: https://bitcointalk.org/index.php?topic=704771.msg7975168#msg7975168.
763  Bitcoin / Bitcoin Technical Support / Re: How do different softwares compare when generating random private keys? on: July 22, 2014, 08:16:46 PM
I want to generate some private keys in an offline computer and I was thinking how do all the different options like bitaddress, multibit, etc compare in terms of generating random private keys offline.

Are they all the same, like using some kind of library?

What are your concerns / priorities?

Strong random number generation? For this, my first choice would be Armory. In addition to the OS's random number pool (either /dev/random or CryptGenRandom), it also mixes in:
Quote
timestamps, down to the microsecond, of every keypress and mouseclick made during the wallet creation wizard. Also logs mouse positions on every press, though it will be constant while typing. ... Then we throw in the [name,time,size] triplets of some volatile system directories, and the hash of a file in that directory that is expected to have timestamps and system-dependent parameters. Finally, take a desktop screenshot...
It's also a deterministic wallet if that matters to you.

Ease of use? For that I'd download a copy of https://bitcoinpaperwallet.com/ (download link is in the lower right of the live demo). It's not quite as thorough as Armory, but it does use window.crypto.getRandomValues which should in theory use the OS's random number pool, and it also uses mouse and keypress events. It's easy to use for paper wallet generation, and quite pretty too. Smiley

https://www.bitaddress.org/, while not quite as pretty, uses the same random number techniques as bitcoinpaperwallet (actually I think bitaddress was first, and bitcoinpaperwallet is based in part on bitaddress). It's probably the way to go if you want an easy method of generating a lot of paper wallets all at once.

Edited to add: both bitcoinpaperwallet and bitaddress support brain wallets, and bitcoinpaperwallet gives fairly decent advice on how to use dice or an extremely-well-shuffled deck of cards to generate the random keys, although there's better advice over in this thread.
764  Bitcoin / Bitcoin Technical Support / Re: can't open database wallet.dat on: July 21, 2014, 06:15:38 PM
error: {"code":-1,"message":"CDB : Error -30974, can't open database wallet.dat"}

This error is DB_RUNRECOVERY.

Assuming a simple restart doesn't fix it, there are two things I'd try.

If you're on Linux, you probably have easy access to the Berkeley DB tools. On Debian/Ubuntu, they can be installed with "sudo apt-get install db-util". After closing bitcoind and making a backup of the wallet.dat file, try running "db_recover -c wallet.dat" from inside the .bitcoin directory. If that succeeds, you're probably all set.

If you're not on Linux, or if the above doesn't succeed, try running "bitcoind -salvagewallet" (Bitcoin will make a backup on its own before trying to run the salvage routine).

If this also doesn't work and you're on Linux, look over here for another option.

If you're still having problems, pywallet is probably your next option, however it's got its own problems (that I mention in the post above).

Good luck!
765  Bitcoin / Wallet software / Re: Armory or Electrum? on: July 21, 2014, 04:42:15 PM
I'm looking for a non-hosted wallet, and I've narrowed down my choices to Armory or Electrum, since I don't have the resources to support Bitcoin Core, and MultiBit has some bugs that aren't preferred for what I'm doing.

I suspect you already have a good feel for the basic differences between wallet choices, but if not, this link might help: http://gurnec.github.io/btc-wallet-comparison/
766  Bitcoin / Bitcoin Technical Support / Re: Is it possible to recover an encrypted corrupt wallet if I have the passphrase? on: July 21, 2014, 03:17:51 PM
Code:
Program version 4.8 doesn't match environment version 5.3

It looks like the wallet was created (or modified) with a version of bitcoin that was built to use berkeley 5.3, and you are trying to salvage it using the built in 4.8

I have to disagree with coinsolidation... that message doesn't apply to the database version, but rather the environment version which is something else entirely in the complicated Berekeley DB world.... The Bitcoin client typically creates the environment on startup, and deletes it before exiting (except for really old versions of Bitcoin).

pywallet does not delete the environment before exiting, so I suspect that the warning message above is the result of running pywallet, and then running Bitcoin afterwards. In any case, I'm fairly sure it shouldn't cause any problems, and that it's just a warning.

Since you're on linux, you could use the Berkeley DB command line utilities to see if they can do any better. In theory, they try to do the same thing as -salvagewallet, but they're more up to date versions than the 4.8 that ships with Bitcoin, so maybe this will help.

On Debian/Ubuntu, they can be installed with "sudo apt-get install db-util". Then try this:

Code:
db_dump -r wallet.dat
db_dump -r wallet.dat | db_load newwallet.dat

If the first command produces a bunch of output, run the second one to create a newwallet.dat. If the first command doesn't produce output, try it again with a capital -R instead of the lowercase.

If all this still doesn't work, I could come up with some instructions for using pywallet's recovery methods. It would be my last choice though... pywallet doesn't recover the address book, and it's encryption facilities are fairly well broken, so you'd have to use them to create an unencrypted wallet and then deal with the consequences...
767  Bitcoin / Bitcoin Technical Support / Re: Is it possible to recover an encrypted corrupt wallet if I have the passphrase? on: July 20, 2014, 01:56:21 PM
I got the more detailed error:
Code:
bsddb.db.DBInvalidArgError: (22, 'Invalid argument -- BDB2509 the log files from a database environment')

Here's the full error message, which python truncates to just the last line:
Code:
BDB2506 file <filename> has LSN #/#, past end of log at #/#
BDB2507 Commonly caused by moving a database from one database environment
BDB2508 to another without clearing the database LSNs, or by removing all of
BDB2509 the log files from a database environment

Theoretically this should only happen if the wallet.dat file is copied out of the data directory while Bitcoin is still running or immediately following a crash.

If this is the only problem, running bitcoin-qt with the -salvagewallet option (with the wallet.dat to recover in the data dir) should be able to recover most if not all of the wallet.
768  Bitcoin / Wallet software / Re: secure private key handling on: July 18, 2014, 11:30:52 PM
I also don't really understand your main concern either... but I think if you tell us what you are trying to do, we will be better equipped to assist you.

Agreed... not that I'm claiming I'm knowledgeable enough to help, but I'll bet someone here is. Smiley

Electrum, supplemented with a printer interface which blocks until the key has been printed out could work. But I understand that there is no ready-to-use solution yet which automates the process of having keys securely synced before being used on the network.

This might be harder than you think, if you really want 100% foolproofness. Printers can run out of ink, hardware RAID can lie to the OS and claim that data has been written if it thinks its backup batteries are sufficient... there are a lot of what-ifs if you don't go into more details.

What I'm trying to say is that even if there is a client that makes the appropriate sync call, things can still go wrong. At some point, it becomes more about risk management than about 100% guarantees...

Also, for what it's worth, I can say that neither Bitcoin Core nor Armory (my two personal favorites...) force a sync after modifying a wallet file.
769  Bitcoin / Bitcoin Technical Support / Re: Is it possible to recover an encrypted corrupt wallet if I have the passphrase? on: July 18, 2014, 10:57:59 PM
I've tried using the latest version of pywallet (https://github.com/jackjack-jj/pywallet) from the command line, but always receive this message:
Code:
ERROR:root:Couldn't open wallet.dat/main. Try quitting Bitcoin and running this again.

I'd start with this:

Open pywallet.py in a text editor that can deal with Unix-style lines endings (I'm a fan of Notepad++ if you're on Windows) and search for that error message. Shortly before it, you'll see this:

Code:
	try:
r = db.open(walletfile, "main", DB_BTREE, flags)
except DBError:
r = True

Replace the "r = True" with "raise", being careful to keep the same level of indentation, and then re-run the --dumpwallet command. This should hopefully result in a more useful error message.
770  Bitcoin / Wallet software / Re: secure private key handling on: July 17, 2014, 03:31:35 AM
Hi!

Is there any wallet software which guarantees that private keys are always committed to disk (using appropriate kernel primitives - there must be no chance that the key is still waiting in a write-behind cache) before being used on the network?

Thanks!

This answer is sort of cheating, but any deterministic wallet (Armory, Electrum, MultiBit HD) should qualify (even if it's not because they do so explicitly), assuming you do a reboot or a sync after initial wallet creation.
771  Other / MultiBit / Re: Heads up: Infected Multibit Wallet on: July 17, 2014, 12:39:33 AM
There is an infected multibit out there -> http://multibitcoinwallet.com

A user already tried to advertise it in bitcointalk, beware

Quote
MALWARE, just in case anyone had any doubts.

Upon execution, it drops a bunch of executables into %appdata%, runs them, and sets a few of them to be auto-started at boot or logon. I didn't bother trying to figure exactly what kind of stuff it tries to pull beyond this, but it's surely not for your benefit....

Executables it installs on my test system:

documents and settings\admin\application data\1tvcuplb.exe
documents and settings\admin\application data\dyfyljco.exe
documents and settings\admin\application data\eyn8sork.exe
documents and settings\admin\application data\install\host.exe
documents and settings\admin\application data\pua8hbxd.exe
documents and settings\admin\application data\qol58yud.exe

Virustotal report of these dropped executables is here: https://www.virustotal.com/en/file/88624d750fd17a4d61196fc9e63ba54532b508f1f20256a9214849bd8baa4a28/analysis/1405294627/.

Not that it really matters, but that malware wasn't claiming to specifically be a MultiBit executable, it is claiming to be a multi-bitcoin wallet, whatever the heck that is...
772  Bitcoin / Wallet software / [ANN] [REQ] Simple wallet comparison website on: July 16, 2014, 11:05:05 PM
Hi, all.

Every so often, there's a new "which wallet is best" thread that appears. The correct answer is almost always "it depends"... there are a lot of options out there, and the best wallet for one person may not be the best for someone else.

It can be particularly confusing for beginners. With this is mind, I've compiled a very simple table which I've put up online here:


There's not much to it so far... just 5 wallets listed, and a handful of columns that I thought would be most important for beginners. Note that I'm intentionally leaving out more complicated features (m of n, cold storage, etc.) because this is just geared towards beginners for now.

I'm very much open to input. If anyone has additional experience with different wallets, or just thinks I'm flat-out wrong with something that's already on that page, please speak up. You can do the whole GitHub fork / pull request thing if you like, but it seems easier to just respond in this thread or open an issue on GH.

I'm hoping that in the end, this will be a good starting point for answering the "which wallet is best for me" question for beginners.
773  Other / Beginners & Help / Re: Wallet Safety Help on: July 13, 2014, 05:50:00 PM
Along with running some anti-malware software, keeping your PC up-to-date, and so on, I posted some more Bitcoin-specific advice regarding how to avoid trojans over in the bottom half of this post. Most of it's basic common sense sort of stuff which you already seem to have a lot of though...  Smiley

i didn't notice trojan there, is it there?

The second half of that post talked about how to be safer when it comes to downloading suspicious executables... in other words, software that might actually be a trojan.
774  Other / Beginners & Help / Re: Wallet Safety Help on: July 13, 2014, 03:35:17 PM
As others have said, it sounds like you're off to a great start!

All of these files are encrypted using the built in Windows encryption tool.

Which version of Windows? Do you mean using EFS (where you right click, go to Properties, Advanced, and then check off Encrypt), or BitLocker?

- Both wallets use multibits encryption, so if i want to send BTC, i have to type in a passcode.

There's nothing wrong with MultiBit's encryption, as long as you realize that running brute-force guessers against MultBit wallets is quite a bit faster than against many other wallet types. Brute-forcers can guess around 500,000 to 1,000,000 passwords per second (compared to say 50 per second with Bitcoin Core for example) on a CPU, and possibly faster with a GPU or ASIC. As long as you have a nice long passphrase, you have nothing to worry about from brute-forcing, just be aware that in order to be secure it does have to be longer than you'd need with other wallet types.

Regarding privacy: MultiBit doesn't really encourage the use of multiple addresses, and this leads to some loss of privacy. I think this is fine if it doesn't matter to you (it doesn't matter much to me), as long as you're aware of it.

Regarding backups: Every time you add a new receiving address in MultiBit, your wallet file changes and it must be re-synced with your backups. If you don't often add new receiving addresses, this shouldn't be much of a problem.

Regarding malware: All the encryption and backups in the world won't do you any good if you have malware running on your PC. Along with running some anti-malware software, keeping your PC up-to-date, and so on, I posted some more Bitcoin-specific advice regarding how to avoid trojans over in the bottom half of this post. Most of it's basic common sense sort of stuff which you already seem to have a lot of though...  Smiley
775  Bitcoin / Development & Technical Discussion / Re: A bitcoin client with no PRNG. Possible? on: July 09, 2014, 04:20:46 PM
Maybe this is already obvious, but there's no reason to avoid using a potentially compromised entropy source assuming that you're also using a source that is likely to be good, is there?

In other words, why not use a shuffled deck + CryptGenRandom() (even though it's closed source) + RDSEED/RDRAND (even though it can't be inspected) + whatever else you can come up with? Even if one or more of those methods is insecure, the result is secure as long as at least one of those methods produced enough real entropy, correct?
776  Bitcoin / Development & Technical Discussion / Re: [Bounty 50BTC] Looking for a GPU implementation of this algorithm on: July 06, 2014, 04:01:03 PM
Hi, btchris!
...
I tried it yesterday, with an Electrum wallet.
I modified it to use only the first 44 characters of the encoded seed:
Code:
...
Maybe you can use it to extend your extract-scripts with Electrum as well.

You're right, the unencrypted seed is all hex, I completely missed that. That reduces each check from three AES block decryptions down to just one, and as you noticed makes an extract script possible which only extracts half the seed, still leaving 64 bits of unknown entropy once/if the password is found. I'll definitely be incorporating these improvements and an extract script for Electrum, thanks for discovering this!
777  Bitcoin / Armory / Re: Armory closing at 99% scanning transaction history on: July 03, 2014, 02:30:11 PM
TL;DR: Please try running Memtest86+, this worked for me!

About two or three weeks ago, I was having the worst problems getting past the Sync step. I spent probably about a week or two re-downloading the Bitcoin blockchain (more than once), rebuilding the Armory DB (several times), and rescanning, and it would always fail during the scanning phase with that same "Cannot get tx copy, because don't have full StoredTx!" error often at different points (at different %'s completed).

I became convinced there must be a bug somewhere in Armory. On one occasion in the debug log, it mentioned an additional error message "Invalid txIndex at height # index #". This gave me a place to start looking in the LevelDB database to see if there actually was a corruption. After quite a bit of digging, I did indeed find the issue: in the DB, each transaction in a block is given an ID starting at 0 (that's not the blockchain TxID). There was a transaction in the block whose sequential ID number was greater than the total number of transactions in that block (which is recorded separately in the DB). But how did this happen??

Looking at the transactions that should have been in this block, there was also one missing, so it looked like the corrupted transaction matched up with the missing transaction except for it's sequential ID. Looking closer, the ID was almost correct: it had just a single-bit error in its high nibble, flipping a 0 to a 1 and making it too large.

Well that's strange... maybe my hard drive was failing? Usually HD failures doen't cause single-bit errors, but rather entirely unreadable sectors or relatively large corruptions though.... Maybe a failing RAM stick?

Well, very long story short, I did indeed have some bad RAM which Memtest86+ found pretty quickly. After replacement, I had no trouble rebuilding and rescanning.

A big thanks to Armory for helping to find this bad RAM! If it weren't for all of the double and triple checking in the Armory code, this could have gone undetected for months, and who knows what I could have lost!! Thanks!!!
778  Bitcoin / Development & Technical Discussion / Re: [Bounty 50BTC] Looking for a GPU implementation of this algorithm on: July 03, 2014, 01:33:30 AM
Woh, great code there!

I have some wallet I do want to recovery. I did a dump with pywallet and discarded the wallet.dat long time ago. I do have a dictionary I made. Can I use the btcrecover starting from the pywallet data? Or I was guessing if I just can reconstruct the wallet.dat from another one, but that looks messy.

Thanks for the compliment, flattery will get you everywhere Wink

Getting what btcrecover needs from the pywallet dump is pretty easy.... if you actually manage to find the password, we can worry about the rest later.

Save only the "mkey" section from the pywallet dump to a new file, e.g. it should contain only something like this:

Code:
{
    "encrypted_key": "2e2c3b9b58e9b33c9799b4472e83c136e6246120c45e390daa6a57476e7fbe4f57d83f79d75f9b4c1db680fe5a846cb8",
    "nDerivationIterations": 67908,
    "nDerivationMethod": 0,
    "nID": 1,
    "otherParams": "",
    "salt": "4593aff5639179c7"
}

The Python script below produces output in the same format as extract-bitcoincore-mkey.py, but it uses the file above instead of a wallet.dat file. Give it the filename from above as the first argument, and it will print out some base64-encoded stuff that btcrecover can use:

Code:
import sys, json, struct, base64, zlib

data = json.load(open(sys.argv[1]))

encrypted_master_key = base64.b16decode(data["encrypted_key"], True)
salt                 = base64.b16decode(data["salt"], True)
iter_count           = data["nDerivationIterations"]

bytes     = b"bc:" + encrypted_master_key + salt + struct.pack("<I", iter_count)
crc_bytes = struct.pack("<I", zlib.crc32(bytes) & 0xffffffff)

print(base64.b64encode(bytes + crc_bytes))

Then you can feed that into btcrecover like this:

Code:
btcrecover.py --extract-data --passwordlist existing-dictionary-file.txt
Please enter the data from the extract script
> lV/wGO5oAUM42KTfq5s3egX3Uhk6gc5gEf1R3TppgzWNW7NGZQF5t5U3Ik0qYs5/dprb+ifLDHuGNQIA+8oRWA==
...
Password found: xxxx

If the dictionary file is particularly long, it might be worth trying to get the somewhat experimental GPU support working-- it can improve speed w/Bitcoin Core wallets from somewhere in the 50s to somewhere in the 1000s (tries per second), but it can take some effort to get working well.

Good luck!
779  Bitcoin / Development & Technical Discussion / Re: [Bounty 50BTC] Looking for a GPU implementation of this algorithm on: July 03, 2014, 01:10:11 AM
860k tries per second per core here (Intel(R) Core(TM) i5 CPU @ 2.67GHz)

Yeah, btcrecover has a lot of scaffolding to actually generate the passwords to test... still that's faster than I expected.
 
but I'd guess it could be improved if written entirely in C, or even better in OpenCL....
I don't think that GPU can beat CPU with AES-NI.

That could be true (I doubt PyCrypto uses AES-NI). Although the oclHashcat guys have done some impressive things, including password generation and AES decryption all on a GPU, which is far more than I've managed (I only do SHA's for Bitcoin Core in GPU, everything else is in CPU).
780  Bitcoin / Development & Technical Discussion / Re: [Bounty 50BTC] Looking for a GPU implementation of this algorithm on: July 02, 2014, 04:56:20 PM
I have made an interesting discovery: if you know the encoded seed of an Electrum wallet, then you can recover the unencrypted seed without the password stretching and fancy Elliptic Curve stuff. Simply try to decode the password, and if you get a valid hexadecimal number of 32 characters, then the password candidate is good, otherwise it is bad.
...
Its speed can be optimized to 10**7 (maybe 10**8 ) trials/sec/CPU_core.

Yup, that's exactly what I'm doing in btcrecover here. I'm only managing around 10^5 tries/s per CPU core (it's written in Python but uses libraries for SHA and AES written in C) but I'd guess it could be improved if written entirely in C, or even better in OpenCL....

It turns out that you can play similar tricks with many wallet encryption schemes (but not with Armory as far as I could find - Armory really got wallet encryption right).
Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 [39] 40 41 »
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!