ryancdotorg / brainflayer

A proof-of-concept cracker for cryptocurrency brainwallets and other low entropy key algorithms.
https://rya.nc/brainflayer
906 stars 462 forks source link

Modify word generator #93

Closed ttran242 closed 5 years ago

ttran242 commented 5 years ago

I'd like to modify brainflayer in the part that generate word & calculate it into brainwallet. If i have a code like this.

std::string RandomString(int len)
{
    static int mySeed = (rand() % 601692057) + 1;
    srand(time(0) * len + ++mySeed);
    std::string str = "z012356789BmPnitopqrsYZab4gFyQRSTUVWXjkAlocdefhKLMNuvwxCDEGHJ";
    std::string newstr;
    int pos;
    while (newstr.size() != len) {
        pos = ((rand() % (str.size() - 1)));
        newstr += str.substr(pos, 1);
    }
    return newstr;
}

I wrote this in c++ & will replace the characters witht word array & plan to make the project run on gpu. How fast it would be compare to your function? Where shoud i put it in your code?

ryancdotorg commented 5 years ago

Brainflayer accepts newline terminated candidate passwords/phrases on stdin, as described in the readme. Just print each output of your function to stdout followed by a newline. By design, there is no support for generating passwords/phrases within brainflayer.

Please be aware that attempting to crack using random strings is a waste of cpu time.

Doing Brainwallet cracking on GPU would require porting a lot of very complex crypto code to OpenCL - existing stuff like oclvanitygen isn't going to help at all.