Can ASIC miners easily be used to guess brainwallet passphrases? After reading the Bitcoin wiki page for brainwallets it seems to me that mining equipment can be used to brute force brainwallet passphrases. Is this correct?


  "...so hackers can collectively try multiple trillions of passwords every second in the privacy of their own homes with the very same equipment they use for mining bitcoins (in the usual sense)."


How would one use an ASIC miner to brute force the blockchain with a dictionary attack? 
What would the application logic look like? 
Can a standalone(The Antminer S1 for instance) miner be "tricked" into believing it is doing normal work for a pool when actually just hashing random strings or would it need custom drivers?
What follows is an educated guess, not certain statements, and is based on Electrum's brainwallet phrases (just figured it'd be a good example), not other schemes or human-generated ones.

No, a miner can't easily be tricked into doing it (e.g. solely by a rogue pool), but can be programmed to try to crack brainwallet phrases. This is because ordinary hashing involves totally different inputs (a block header and nonce, hashed twice) than brainwallet cracking (a random 128 bit seed, hashed 100,000 times).

You'd do this by trying random 128-bit seeds, through Electrum's algorithm, which involves taking the seed and running 100,000 SHA256 hashes on it (maybe some other stuff I'm missing would make it more difficult). You can then do a few more calculations to come up with the addresses that the key generates, and check the blockchain to see if any of these match.

The current network hashrate is ~50,000,000 GH/s. If all of that were instead put towards breaking everybody's Electrum keys, and all it takes is the 100K hashes, there'd be 5*10^11 out of 2^128 checked every second. You could check all of the keys in about 2*10^19 years, or 1.6*10^9 times the age of the universe. While you'd probably get collisions long before this (dependent on how many Electrum-generated addresses are in use), I think this gives you an idea of the infeasibility of this sort of attack.