Bitcoin Forum
April 25, 2024, 12:39:36 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: How to use brainflayer on each cpu core ? multithreaded ?  (Read 928 times)
btctousd81 (OP)
Sr. Member
****
Offline Offline

Activity: 434
Merit: 270


View Profile WWW
February 05, 2018, 08:10:47 AM
 #1

ref: https://github.com/ryancdotorg/brainflayer

hi all., i am trying to use brainflayer., but its single threaded app and runs on single core., while other cpu cores are at idle.,

the author says

Quote
Unfortunately, brainflayer is not currently multithreaded. If you want to have it keep multiple cores busy, you'll have to come up with a way to distribute the work yourself (brainflayer's -n and -k options may help)

help says


Code:
Usage: /root/brainflayer/./brainflayer [OPTION]...

 -a                          open output file in append mode
 -b FILE                     check for matches against bloom filter FILE
 -f FILE                     verify matches against sorted hash160s in FILE
 -i FILE                     read from FILE instead of stdin
 -o FILE                     write to FILE instead of stdout
 -c TYPES                    use TYPES for public key to hash160 computation
                             multiple can be specified, for example the default
                             is 'uc', which will check for both uncompressed
                             and compressed addresses using Bitcoin's algorithm
                             u - uncompressed address
                             c - compressed address
                             e - ethereum address
                             x - most signifigant bits of x coordinate
 -t TYPE                     inputs are TYPE - supported types:
                             sha256 (default) - classic brainwallet
                             sha3   - sha3-256
                             priv   - raw private keys (requires -x)
                             warp   - WarpWallet (supports -s or -p)
                             bwio   - brainwallet.io (supports -s or -p)
                             bv2    - brainv2 (supports -s or -p) VERY SLOW
                             rush   - rushwallet (requires -r) FAST
                             keccak - keccak256 (ethercamp/old ethaddress)
                             camp2  - keccak256 * 2031 (new ethercamp)
 -x                          treat input as hex encoded
 -s SALT                     use SALT for salted input types (default: none)
 -p PASSPHRASE               use PASSPHRASE for salted input types, inputs
                             will be treated as salts
 -r FRAGMENT                 use FRAGMENT for cracking rushwallet passphrase
 -I HEXPRIVKEY               incremental private key cracking mode, starting
                             at HEXPRIVKEY (supports -n) FAST
 -k K                        skip the first K lines of input
 -n K/N                      use only the Kth of every N input lines
 -B                          batch size for affine transformations
                             must be a power of 2 (default/max: 4096)
 -w WINDOW_SIZE              window size for ecmult table (default: 16)
                             uses about 3 * 2^w KiB memory on startup, but
                             only about 2^w KiB once the table is built
 -m FILE                     load ecmult table from FILE
                             the ecmtabgen tool can build such a table
 -v                          verbose - display cracking progress
 -h                          show this help


i dont understand how to use the -k and -n flags.,

anyone have experiecne in this ?

Thanks

p.s. i am trying to break the wallet's which are open for challenges and bitcoin eater address , if you are so concerned about .


if i use it like this

Code:
/root/brainflayer/./brainflayer -v -I 0000000000000000000000000000000000000000000000000000000000000001 -b example.blf -f example.bin  -k 1 -n 4
i get this

Code:
Invalid '-n' argument, remainder '4' must be <= modulus '0'


so what am i missing here ?

i tried asking him i guess, but he is super busy., .

1714048776
Hero Member
*
Offline Offline

Posts: 1714048776

View Profile Personal Message (Offline)

Ignore
1714048776
Reply with quote  #2

1714048776
Report to moderator
1714048776
Hero Member
*
Offline Offline

Posts: 1714048776

View Profile Personal Message (Offline)

Ignore
1714048776
Reply with quote  #2

1714048776
Report to moderator
Every time a block is mined, a certain amount of BTC (called the subsidy) is created out of thin air and given to the miner. The subsidy halves every four years and will reach 0 in about 130 years.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714048776
Hero Member
*
Offline Offline

Posts: 1714048776

View Profile Personal Message (Offline)

Ignore
1714048776
Reply with quote  #2

1714048776
Report to moderator
1714048776
Hero Member
*
Offline Offline

Posts: 1714048776

View Profile Personal Message (Offline)

Ignore
1714048776
Reply with quote  #2

1714048776
Report to moderator
jrian
Jr. Member
*
Offline Offline

Activity: 39
Merit: 6


View Profile
February 05, 2018, 11:39:12 AM
 #2

how many CPU you want to use for brainflayer?

if two CPU - you can run two brainflayer instances

first
./brainflayer -v -I 0000000000000000000000000000000000000000000000000000000000000001 -b example.blf -f example.bin  -n 1/2
second
./brainflayer -v -I 0000000000000000000000000000000000000000000000000000000000000001 -b example.blf -f example.bin  -n 2/2


btw - why you use -f example.bin ?
btctousd81 (OP)
Sr. Member
****
Offline Offline

Activity: 434
Merit: 270


View Profile WWW
February 05, 2018, 11:50:26 AM
 #3

how many CPU you want to use for brainflayer?

if two CPU - you can run two brainflayer instances

first
./brainflayer -v -I 0000000000000000000000000000000000000000000000000000000000000001 -b example.blf -f example.bin  -n 1/2
second
./brainflayer -v -I 0000000000000000000000000000000000000000000000000000000000000001 -b example.blf -f example.bin  -n 2/2


btw - why you use -f example.bin ?


Thanks i have 4 core cpu.

so i must use like these ,
1/4
2/4
3/4
4/4

i use -f example.bin to reduce the falce positive messages, as bloom filter is not that correct.

jrian
Jr. Member
*
Offline Offline

Activity: 39
Merit: 6


View Profile
February 05, 2018, 11:55:52 AM
 #4

Thanks i have 4 core cpu.

so i must use like these ,
1/4
2/4
3/4
4/4




yes, and you can test how it's work

just make new blf file
and insert 4 different hash160 there

for example, hash160 of this HEX'es
0000000000000000000000000000000000000000000000000000000000000011
0000000000000000000000000000000000000000000000000000000000000111
etc

and run brainflayer with -I 0000000000000000000000000000000000000000000000000000000000000001 option
btctousd81 (OP)
Sr. Member
****
Offline Offline

Activity: 434
Merit: 270


View Profile WWW
February 05, 2018, 11:59:18 AM
 #5

Thanks i have 4 core cpu.

so i must use like these ,
1/4
2/4
3/4
4/4




yes, and you can test how it's work

just make new blf file
and insert 4 different hash160 there

for example, hash160 of this HEX'es
0000000000000000000000000000000000000000000000000000000000000011
0000000000000000000000000000000000000000000000000000000000000111
etc

and run brainflayer with -I 0000000000000000000000000000000000000000000000000000000000000001 option

but what does this mean ?

Code:
 -n K/N                      use only the Kth of every N input lines

sorry but english isnt my primary language.,

does it mean that its not going to try incrementally ? and going to pass/skip every nth value while doing incrementation ?

Thanks

jrian
Jr. Member
*
Offline Offline

Activity: 39
Merit: 6


View Profile
February 05, 2018, 01:20:14 PM
 #6



but what does this mean ?

Code:
 -n K/N                      use only the Kth of every N input lines

sorry but english isnt my primary language.,

does it mean that its not going to try incrementally ? and going to pass/skip every nth value while doing incrementation ?

Thanks


It's just number of lines in every input lines
example
you have 10 lines in your BLF file
you have 5 CPUs
you want to  run 5 brainflayer instances
you run it with
1. -n 1/5
2. -n 2/5
3. -n 3/5
...

so, in 1st example, brainflayer read just first line of every 5 lines in your blf file
btctousd81 (OP)
Sr. Member
****
Offline Offline

Activity: 434
Merit: 270


View Profile WWW
February 05, 2018, 01:30:11 PM
 #7



but what does this mean ?

Code:
 -n K/N                      use only the Kth of every N input lines

sorry but english isnt my primary language.,

does it mean that its not going to try incrementally ? and going to pass/skip every nth value while doing incrementation ?

Thanks


It's just number of lines in every input lines
example
you have 10 lines in your BLF file
you have 5 CPUs
you want to  run 5 brainflayer instances
you run it with
1. -n 1/5
2. -n 2/5
3. -n 3/5
...

so, in 1st example, brainflayer read just first line of every 5 lines in your blf file

alright it means , i have to use the exact same command i.e. -I number in all the 4 instances of brainflayer.

damn, its not what i was thinking.,

i thought i could run 4 instances of brainflayer and use new -I number for each instance.

but that would miss the hashes from .blf file.

thanks  for the info.

btctousd81 (OP)
Sr. Member
****
Offline Offline

Activity: 434
Merit: 270


View Profile WWW
February 05, 2018, 01:43:49 PM
 #8

ref: https://github.com/ryancdotorg/brainflayer


 -I HEXPRIVKEY               incremental private key cracking mode, starting
                             at HEXPRIVKEY (supports -n) FAST
 -k K                        skip the first K lines of input
 -n K/N                      use only the Kth of every N input lines
 -B                          batch size for affine transformations
                             must be a power of 2 (default/max: 4096)
 -w WINDOW_SIZE              window size for ecmult table (default: 16)
                             uses about 3 * 2^w KiB memory on startup, but
                             only about 2^w KiB once the table is built

-I is where do you start

-k is first skip K lines when you start, use a different 'k' for each instance process, or you can do as advised here -n 1/N

Read the article on wiki 'baby-step giant step' about how to do discrete log cracking of btc, as this is essentially what your doing, each process is a giant step, and then each process does its own baby step, the reason NO to use one is that MERSENE PRIMES are better for incrementing, and the base -I its best to do a statisical analysis of what your trying to crack, .e.g. d=SQRT(r), where are is public-key, is first best guess of the private-key

The author 'ryan' of brainflayer doesn't help people cuz he doesn't want morons to crack btc, thus he keep this tool in obscurity, that said, you can run -I forever and never get a hit, for instance, if you first have to have a BLF file of good high value hex-160 addresses, then you need to have BIN file to kick out the false-postives; Just running BF in brute-force mode will heat your house and nothing more

The question here is how to use the muli-process, how ryan set up the multi was to use the baby-step/giant-step paradigm and have a bash-shell fire up BF client's as needed, one problem with -I is that it run's forever, thus if you serious you need to hack BF ( brainflayer ) I have dozens of versions running, and for the -I I have a -S ( stop N ) that tells BF to stop otherwise you can over-run your giant steps and waste cpu power,

Feel free to ask questions i have spent about six months hacking BF

IMHO BF is not useful for brute-force, where its useful is generating private-key/seed pairs for all the crypt-algos and then build a HUGE database of hash160/private-key pairs, then watch memory-pool on BTC, and when a user uses an address(hash160) and if you have that private-key ( you should if you have say 200 million hash160/pk pairs), then you own that btc

Just willy nilly run bf on -I tells you next to nothing and let's say you have the pristine.hex list, that's say 40k but that means your odd's of a hit are one in 1/10e77, as likely to find a fly some where in the universe, thus first step is to cultivate all h160's ( addresses) you can find say 500 million, and then use hash-cat to generate a 500 gb uniq rainb0w and use BF to generate the h160/pk pairs, now you will have increased the odds of finding a hit,

In summary just running BF in -I mode given odd's are 1/10e77 are a complete waste of time,

Before one can really use BF one must spend months building databases of address/h160's, and hi-values,

It's almost not worth  spending time trying to crack the pristine ( satoshi coin ) as it hasn't been to done to date, thus not likely, I have tried 6+ months and have not cracked

What you can crack is newbies that are not using high-entropy seeds for private-key, with your database and if your fast you can nab those, but bare in mind there are 100's of bots doing the same

Thanks for the detailed info.,

i have built dedicated box just for this.

cron job every 6 hours, parses new blocks.
having + amount addresses, creates new blf and bin file and rotates it .

my php script then

calculates random int (using my logic)
check if its in range .
start brainflayer with -I mode using this hex, gets its PID
sleep 10 seconds
kill this process.,

do above all steps continuously. with new hex number evey time. its been up 1 month and didnt find anything.

i have tried the password bruteforce method , but it also didnt gave much success.,

i like incremental thingy coz you never know when you are gonna hit a gem., coz its all random.


i have couple of questions.,

1) what is ecmult table and how can i create it and how it can benefit my cause ?

as every time killing running brainflayer process and starting new takes around 1-4 seconds.,

2) is there something like centralised blf file in memory loaded so spawinig brainflayer will be really faster., as for each instance, it first loads it in memory and then start -I counter from there.

Thanks , i really appreciate your input.

nullius
Copper Member
Hero Member
*****
Offline Offline

Activity: 630
Merit: 2610


If you don’t do PGP, you don’t do crypto!


View Profile WWW
February 05, 2018, 02:04:38 PM
 #9

i have built dedicated box just for this.

[...]

do above all steps continuously. with new hex number evey time. its been up 1 month and didnt find anything.

My, that’s an expensive hobby for such an unprofitable purpose:

p.s. i am trying to break the wallet's which are open for challenges and bitcoin eater address , if you are so concerned about .

Wait...  a “gem”?  Perhaps you really expect to hit the 2-160 jackpot and find a key for an “eater” address?  That address with the all-zeroes Hash160 has a balance of 65 BTC plus change; that would be a “gem”, but one you’ll never find.  What other “gems” do you seek?

i like incremental thingy coz you never know when you are gonna hit a gem., coz its all random.

(FYI, I’d be much less snide if you just came out and said, “Yes!  I think that brainwallet users deserve a fine for their criminal stupidity in how they undermine the foundation of all cryptographic security; and I am here to collect the penalty.  Consider me a Robbin’ Hood(lum) who steals from the stupid to give to me, me, me.”)

btctousd81 (OP)
Sr. Member
****
Offline Offline

Activity: 434
Merit: 270


View Profile WWW
February 05, 2018, 02:47:11 PM
 #10

i have built dedicated box just for this.

[...]

do above all steps continuously. with new hex number evey time. its been up 1 month and didnt find anything.

My, that’s an expensive hobby for such an unprofitable purpose:

i am from 3rd world, so its not expensive once the box is built, its just cheap electricity that matters and it gives me hope.
edit: the main struggle is keeping electricity on 24x7 and keeping internet on. as the power outages are common.


Quote
p.s. i am trying to break the wallet's which are open for challenges and bitcoin eater address , if you are so concerned about .

Wait...  a “gem”?  Perhaps you really expect to hit the 2-160 jackpot and find a key for an “eater” address?  That address with the all-zeroes Hash160 has a balance of 65 BTC plus change; that would be a “gem”, but one you’ll never find.  What other “gems” do you seek?

yes, i have that one too in my list and one which is open for challenge. aka warp wallet


Elysium Miner
Newbie
*
Offline Offline

Activity: 12
Merit: 0


View Profile
March 06, 2018, 02:49:13 AM
 #11

I am also interested in using the sequential hash function of brainflayer to sequence ALL inputs;  not just sequencing from left to right.

For example:
./brainflayer -v -I 0A00E00F00000F000008000000000E0000000000F000000E000080000C000001

I would like the A, E, F, F, 8,E, F, E, 8,... to sequence simultaneous or is there a command to break down sequencing into 8 digit partitions, using all fields or characters other than zero to que into the sequence command. Is this even possible?

0A00E00F
00000F00
00080000
00000E00
00000000
F000000E
00008000
0C000001
ryanc
Member
**
Offline Offline

Activity: 105
Merit: 59


View Profile WWW
May 10, 2018, 06:43:05 PM
 #12


i am from 3rd world, so its not expensive once the box is built, its just cheap electricity that matters and it gives me hope.
edit: the main struggle is keeping electricity on 24x7 and keeping internet on. as the power outages are common.


Whatever money you're spending on electricity would be better spent on gambling.
ryanc
Member
**
Offline Offline

Activity: 105
Merit: 59


View Profile WWW
May 10, 2018, 06:46:02 PM
 #13

I am also interested in using the sequential hash function of brainflayer to sequence ALL inputs;  not just sequencing from left to right.

For example:
./brainflayer -v -I 0A00E00F00000F000008000000000E0000000000F000000E000080000C000001

I would like the A, E, F, F, 8,E, F, E, 8,... to sequence simultaneous or is there a command to break down sequencing into 8 digit partitions, using all fields or characters other than zero to que into the sequence command. Is this even possible?

0A00E00F
00000F00
00080000
00000E00
00000000
F000000E
00008000
0C000001

I'm not entirely sure what you're asking here. If you'd like to do a masked search iterating though only specified bits, I would consider adding that feature if you are willing to pay for it. However, my consulting fees are substantial.
Banxter
Jr. Member
*
Offline Offline

Activity: 88
Merit: 2


View Profile
September 25, 2018, 01:00:15 PM
Last edit: September 25, 2018, 04:11:21 PM by Banxter
 #14

how to run parallel on a multi-core computer, I know. The question is how to run on multi-core, where are 2 threads per core? Suppose on a 10-core computer where there are 20 threads? (-n 1/10/1 -n 1/10/2 ...) or each thread, regardless of whether it's a real kernel or a virtual one, is handled separately? ( from -n 1/20 to -n 20/20? )
On a 10-core computer with 20 threads, how many processes can be run simultaneously at the same time? 10 or 20 ?
nunucbka
Newbie
*
Offline Offline

Activity: 2
Merit: 0


View Profile
January 17, 2019, 03:42:37 PM
Last edit: January 17, 2019, 07:37:10 PM by nunucbka
 #15

Hi there!

how to run parallel on a multi-core computer, I know. The question is how to run on multi-core, where are 2 threads per core? Suppose on a 10-core computer where there are 20 threads? (-n 1/10/1 -n 1/10/2 ...) or each thread, regardless of whether it's a real kernel or a virtual one, is handled separately? ( from -n 1/20 to -n 20/20? )
On a 10-core computer with 20 threads, how many processes can be run simultaneously at the same time? 10 or 20 ?

Best speed is on threads_count=physical_cores_count
Following code generates random 64-char hex string and then starts bg processes and kills them after "$2" seconds.
Code:
#!/bin/bash
trap "exit" INT TERM ERR
trap "kill 0" EXIT
let "thr = $(lscpu | grep -E '^CPU\(s\)' | sed 's/CPU(s)://' | sed s/' '//g) / 2"
# if you want to get more parallel processes uncomment following (or set 'thr' value as much as you want)
# thr = $(lscpu | grep -E '^CPU\(s\)' | sed 's/CPU(s)://' | sed s/' '//g)
blfname=$1 #your_bloom_filter_filename
tosleep=$2 #time_to_sleep
while 2>1
do
hexval=$(openssl rand $[32] | xxd -p -c32 | grep -E -o '.{64}$')
for n in  $(seq 1 $thr)
do
./brainflayer -a -v -I $hexval -b $blfname -n $n/$thr -o out$n -m 1tab.tab &
done
sleep $tosleep
kill $(pgrep brainflayer | echo $(tr '\n' ' '))
done

Hope this helps  Wink
Banxter
Jr. Member
*
Offline Offline

Activity: 88
Merit: 2


View Profile
January 17, 2019, 04:45:30 PM
 #16

Best speed is on threads_count=physical_cores_count
Following code generates random 64-char hex string and then starts bg processes and kills them after "$2" seconds.
Code:
#!/bin/bash
trap "exit" INT TERM ERR
trap "kill 0" EXIT
let "thr = $(lscpu | grep -E '^CPU\(s\)' | sed 's/CPU(s)://' | sed s/' '//g) / 2"
# if you want to get more parallel processes uncomment following (or set 'thr' value as much as you want)
# thr = $(lscpu | grep -E '^CPU\(s\)' | sed 's/CPU(s)://' | sed s/' '//g)
blfname=$1 #your_bloom_filter_filename
tosleep=$2 #time_to_sleep
while 2>1
do
hexval=$(openssl rand $[32] | xxd -p -c32 | grep -E -o '.{64}$')
for n in  $(seq 1 $thr)
do
./brainflayer -a -v -I $hexval -b $blfname -n $n/$thr -o out$n -m 1tab.tab &
done
sleep $tosleep
done
sleep: missing operand

For what is here "sleep" ?
nunucbka
Newbie
*
Offline Offline

Activity: 2
Merit: 0


View Profile
January 17, 2019, 06:33:26 PM
Last edit: January 17, 2019, 07:36:31 PM by nunucbka
 #17


sleep: missing operand

For what is here "sleep" ?

run script in such a way:
Code:
./{script_name} N

Where 'N' is the number of seconds what processes will work for. If you want brainflayer to work with one start value only just remove following rows:
Code:
while 2>1
do
and also replace last 2 rows
Code:
sleep $tosleep
done
with
Code:
wait
kill $(pgrep brainflayer | echo $(tr '\n' ' '))
almightyruler
Legendary
*
Offline Offline

Activity: 2268
Merit: 1092


View Profile
February 13, 2019, 04:55:30 PM
 #18

Following code generates random 64-char hex string and then starts bg processes and kills them after "$2" seconds.

I have to ask. Why? As has been stated earlier in this thread, and numerous times in other cracking threads, brute forcing the 2^160 space is pointless. If your random hex string happens to be 0000000000000000000000000000000000000000000000000000000000000000 then you'll find a bunch of toy keys -- with no funds of course -- but otherwise, the chances of finding any matches are essentially zero. You're more likely to die of old age than find a truly random key.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!