ryancdotorg / brainflayer

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

Is there a way to specify a range of addresses as input so it will quit when it reaches the end address. #192

Closed IntrinsicInnovation closed 4 months ago

IntrinsicInnovation commented 4 months ago

Is there a way to specify a range of addresses as input so it will quit when it reaches the end address?

And, I guess still using the same bloom file is necessary?

Thanks again for the help!

tukaanimhaka commented 4 months ago

you can make that change...put a variable for it and check it in the loop. it will make the program slower though..since u need to check...

IntrinsicInnovation commented 4 months ago

you can make that change...put a variable for it and check it in the loop. it will make the program slower though..since u need to check...

I know C#. what's the best way to learn C?

IntrinsicInnovation commented 4 months ago

Wait a minute, supposedly theres a -stride option that does what I need. does it work?

ryancdotorg commented 4 months ago

I pulled in the -N option from the develop branch and updated the help screen.

tukaanimhaka commented 4 months ago

@ryancdotorg I see you have added 2 options that are the same -N. Will this take the right value as needed/

IntrinsicInnovation commented 4 months ago

I pulled in the -N option from the develop branch and updated the help screen.

Thanks. Ryan. much appreciated.

IntrinsicInnovation commented 4 months ago

@ryancdotorg I see you have added 2 options that are the same -N. Will this take the right value as needed/

@tukaanimhaka , how do you use the -N or -n option? all I see is "(brainflayer's -n and -k options may help). "

Thanks

IntrinsicInnovation commented 4 months ago

And, what about converting this to another language. Seems scripts are usually python. Would it be dramatically slower if I converted to that language? Is it worth doing?

tukaanimhaka commented 4 months ago

@IntrinsicInnovation no i dont think you should spend your time converting to python...this c code is very efficient.

IntrinsicInnovation commented 4 months ago

@IntrinsicInnovation no i dont think you should spend your time converting to python...this c code is very efficient.

ok, but I mean if I wanted to, how much slower would it be?

ryancdotorg commented 4 months ago

You could get maybe 5% of brainflayer's speed in Python, and even that would be a challenge.

The optimizations in brainflayer have basically no other sensible use case other than cracking keys.

The big ones are that it can use a massive precomputed table to speed up secp256k1 point multiplication, and it does batched affine transforms.

Regarding features, it was never intended to be a "complete" tool. When I was doing research with it, I ran it on dozens of separate computers with scripts managing it. That's why it doesn't have support for threading. Easier just to run independent processes with the skip options.

I'm not going to implement range support for incremental mode. The -N flag supports 64 bit values specified in decimal or hex (leading with 0x). If you want to search a range, set the start value and calculate how many keys to the end value. Actual range support would require a general purpose big integer implementation which is not already present.

On May 16, 2024 11:39:32 PM GMT+01:00, IntrinsicInnovation @.***> wrote:

@IntrinsicInnovation no i dont think you should spend your time converting to python...this c code is very efficient.

ok, but I mean if I wanted to, how much slower would it be?

IntrinsicInnovation commented 4 months ago

ok, thanks. when you say ". The -N flag supports 64 bit values specified in decimal or hex (leading with 0x). If you want to search a range, set the start value and calculate how many keys to the end value."

How would I know when to stop?