Bitcoin Forum
May 21, 2024, 07:36:57 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1] 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 »  All
  Print  
Author Topic: Keyhunt - development requests - bug reports  (Read 11751 times)
albert0bsd (OP)
Hero Member
*****
Offline Offline

Activity: 857
Merit: 662



View Profile WWW
March 06, 2021, 02:13:56 PM
Last edit: March 28, 2024, 05:50:05 PM by albert0bsd
Merited by ABCbits (10), NotATether (5), Welsh (4), hugeblack (4), DdmrDdmr (4), o_e_l_e_o (2), seoincorporation (1), JanEmil (1), Markzuberg64 (1)
 #1

I want to open this thread to talk about the tool that i develop Keyhunt available on github.

https://github.com/albertobsd/keyhunt

Keyhunt use the BSGS algorimth to find privatekeys with the publickey, the program runs on CPU and make several use of RAM to boost the speed.

Current Version 0.2.230430 Satoshi Quest
Lastest changes on development branch


How to use

Download and build
Run againts puzzle 66 (addres mode) 13zb1hQbWVsc2S7ZTZnP2G4undNNpdh5so 6.6 BTC

Code:
./keyhunt -m address -f tests/66.txt -b 66 -l compress -R -q -s 10

You need to add -t numberThreads to get better speed

Run againts Puzzle 130 (bsgs mode) 1Fo65aKq8s8iquMt6weF1rku1moWVEd5Ua 13 BTC

Code:
./keyhunt -m bsgs -f tests/130.txt -b 130 -q -s 10 -R

You need to add -t numberThreads and -k factor to get better speed


Best regards!

escobol
Member
**
Offline Offline

Activity: 154
Merit: 39


View Profile
March 06, 2021, 08:00:03 PM
 #2

Hi nice one !

How to use pfile?
albert0bsd (OP)
Hero Member
*****
Offline Offline

Activity: 857
Merit: 662



View Profile WWW
March 06, 2021, 08:23:30 PM
 #3

you can use the bPfile.c to generate your .bin file ( this is the baby step table)


Code:
./bPfile 1048576000 Pfile.bin
[+] precalculating 1048576000 bP elements in file Pfile.bin

This process can take some time, please be patient, maybe some hour depent of your speed.

Once that the file is already created, execute:

Code:
albertobsd $ ./keyhunt -m bsgs -f 120.txt -r 800000000000000000000000000000:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF -t 4 -k 250 -R -p ./bPfile.bin
[+] Version 0.1.20210306 K*BSGS
[+] Setting mode BSGS
[+] Setting 4 threads
[+] Setting k factor to 250
[+] Setting random mode.
[+] Opening file 120.txt
[+] Added 1 points from file
[+] Setting N up to 17593008128000.
[+] Init bloom filter for 1048576000 elements : 1797.00 MB
[+] Allocating 0.00 MB for aMP Points
[+] Precalculating 16778 aMP points
[+] Allocating 16000.00 MB for bP Points
[+] Reading 1048576000 bP points from file ./bPfile.bin

-k 250 is new factor of speed, 250 use some more of 17 GB of RAM.

But the speed will be huge:

Quote
Total 155574970875904000 keys in 180 seconds: 864305393755022 keys/s

864 Terakeys/s

Best regards!







WanderingPhilospher
Full Member
***
Offline Offline

Activity: 1064
Merit: 219

Shooters Shoot...


View Profile
March 06, 2021, 09:20:23 PM
Last edit: March 06, 2021, 09:37:20 PM by WanderingPhilospher
 #4

Work on windows?

Without running it, just from the speed you say, seems a little bit slower than what is already out there.

But I like to learn different programs in different languages.

And you say speed will be huge with higher RAM
Quote
maybe some hour depent of your speed.
so are you factoring that in to the total time?

I can run through 72,057,594,037,927,935 keys in less than 2 minutes, that is start to finish. And that is using only 1.8Gb of RAM.

I am most interested in how you will setup network/pool version as I have been wanting this for the version I use for some time now. When you start development, let me know and I can share some ideas.
albert0bsd (OP)
Hero Member
*****
Offline Offline

Activity: 857
Merit: 662



View Profile WWW
March 06, 2021, 09:37:21 PM
 #5

Work on windows?


Only with the Ubuntu shell for windows, or maybe some cgywin enviroment.

Yes speed is a little slow, but is CPU and RAM only, i can get the double of that speed wit the double of threads and RAM but my server is running some other things.

I can reach to some 2 Petaleys/s and some other friends with highend servers can reach more that 10 Petakeys/s.

I'm working in some other approach and trying to get a better performance but is still a work in development.

Best regards!

dextronomous
Full Member
***
Offline Offline

Activity: 429
Merit: 105


View Profile
March 07, 2021, 06:06:49 PM
Last edit: March 08, 2021, 12:31:22 AM by dextronomous
 #6

hi albert0bsd, great pieces you got, thanks for giving, but hey was wondering,

Work on windows?


I'm working in some other approach and trying to get a better performance but is still a work in development.

Best regards!

is it available as working to test sir.?
escobol
Member
**
Offline Offline

Activity: 154
Merit: 39


View Profile
March 09, 2021, 05:42:41 PM
 #7

Im testing.
Your first BSGS version (the one before bpfile) got few core dumps.
Actual version works great (tested with one pub and multi pub).
Waiting for new updates for tests Smiley
fxsniper
Member
**
Offline Offline

Activity: 406
Merit: 45


View Profile
March 10, 2021, 08:50:09 AM
 #8


just try BSGS  version

if anyone use keyhunt and compile mission gmp.h

try install  libgmp3-dev

Code:
apt-get install  libgmp3-dev


Recommend to put sample address.txt and 120.txt setting puzzle 120 to github for easy copy setting

because first time I found Invalid length
fxsniper
Member
**
Offline Offline

Activity: 406
Merit: 45


View Profile
March 10, 2021, 09:13:36 AM
 #9


  • Opening file addresses.txt
[E] There is no valid data in the file

Require sample file addresses.txt  (just for new user not yet to know)
Can possible I turn off this line message, if can possible have option for hide this display?

  • Thread 0: b52c0fa87df468ffd3fc456023767eb2c1ccbcff9a06285523d706fdd24ed0a6
  • Thread 0: b52c0fa87df468ffd3fc456023767eb2c1ccbcff9a06285523d716fdd24ed0a6
  • Thread 0: b52c0fa87df468ffd3fc456023767eb2c1ccbcff9a06285523d726fdd24ed0a6
  • Thread 0: b52c0fa87df468ffd3fc456023767eb2c1ccbcff9a06285523d736fdd24ed0a6
  • Thread 0: b52c0fa87df468ffd3fc456023767eb2c1ccbcff9a06285523d746fdd24ed0a6
  • Thread 0: b52c0fa87df468ffd3fc456023767eb2c1ccbcff9a06285523d756fdd24ed0a6
  • Thread 0: b52c0fa87df468ffd3fc456023767eb2c1ccbcff9a06285523d766fdd24ed0a6
  • Thread 0: b52c0fa87df468ffd3fc456023767eb2c1ccbcff9a06285523d776fdd24ed0a6
  • Thread 0: b52c0fa87df468ffd3fc456023767eb2c1ccbcff9a06285523d786fdd24ed0a6

this display over 10000 message
fxsniper
Member
**
Offline Offline

Activity: 406
Merit: 45


View Profile
March 10, 2021, 09:21:46 AM
 #10

Ok,
Sorry, I got how to turn off display message from help


  • Version 0.1.20210306 K*BSGS

Usage:
-h      show this help
-a file      file is a binary raw file with the aMP points precalculated. Just work with -m bsgs
-b bits      For some puzzles you only need some numbers of bits in the test keys.
      This option only is valid with the Random option -R
-c crypto   Search for specific crypo. < btc, eth, all > valid only w/ -m address
      eth option is under develop sorry Sad
-e      The file is already Sorted descendent. This skip the sorting process.
      Your file MUST be sordted if no you are going to lose collisions
-f file      Specify filename with addresses or xpoints or uncompressed public keys
-g count   Just for the stats, mark as counted every debugcount keys   
-k value   Use this with bsgs mode, k value is factor for M, more speed but more RAM use wisely
-m mode      mode of search for cryptos. < address, xpoint, bsgs >  default: address (more slow)
-n uptoN   Check for N secuential numbers before the random chossen this only work with -R option
      Use -n to set the N for the BSGS process. Bigger N more RAM needed
-p file      file is a binary raw file with the bP points precalculated. Just work with -m bsgs
-q      set quiet the thread output
-r SR:EN   StarRange:EndRange, the end range can be omited for search from start range to N-1 ECC value
-R      Random/Secuential this is the default behaivor, can't use this with range option -r
-s ns      Number of seconds for the stats output, 0 to omit output.
-t tn      Threads number, must be positive integer
-v va      Search for vanity Address, only with -m address
-w      Mark the input file as RAW data xpoint fixed 32 byte each point. Valid only with -m xpoint
      Use the hexcharstoraw tool to create a raw file from your current hexadecimal file

Example

keyhunt -t 16 -r 00000001:FFFFFFFF -s 0

This line run the program with 16 threads from the range 00000001 to FFFFFFFF without stats output

Developed by AlbertoBSD   Tips BTC: 1ABSD1rMTmNZHJrJP8AJhDNG1XbQjWcRz7
Thanks to Iceland always helping and sharing his ideas, Tips to Iceland: bc1q39meky2mn5qjq704zz0nnkl0v7kj4uz6r529at


albert0bsd (OP)
Hero Member
*****
Offline Offline

Activity: 857
Merit: 662



View Profile WWW
March 10, 2021, 02:16:59 PM
Last edit: March 10, 2021, 03:06:17 PM by albert0bsd
 #11

is it available as working to test sir.?

Most of those test version doesn't work (those are crazy ideas), The only version available is the the github version.

Ok,
Sorry, I got how to turn off display message from help

Code:
-q      set quiet the thread output

add -q to your command line.

Best regards!

fxsniper
Member
**
Offline Offline

Activity: 406
Merit: 45


View Profile
March 11, 2021, 04:39:23 AM
 #12

Thanks now ok quiet option already

turn off display make program work fast that show it display
other program is same turn off is make it work faster


and What mean keys, it is mean 1 private key or 1 key character

Total 2163563847226549600256 keys in 69000 seconds: 31355997785892023 keys/s
Total 2164516112257133838336 keys in 69030 seconds: 31356165612880397 keys/s
Total 2165465615314509103104 keys in 69060 seconds: 31356293300239054 keys/s
Total 2166412549912721883136 keys in 69090 seconds: 31356383701153884 keys/s
Total 2167356300325260623872 keys in 69120 seconds: 31356427956094627 keys/s
Total 2168303551582822203392 keys in 69150 seconds: 31356522799462360 keys/s
Total 2169249254728011874304 keys in 69180 seconds: 31356595182538477 keys/s
Total 2170192670889015771136 keys in 69210 seconds: 31356634458734514 keys/s

fxsniper
Member
**
Offline Offline

Activity: 406
Merit: 45


View Profile
March 11, 2021, 04:44:19 AM
 #13


it is normal.
I think it is too fast.

1086000828893888512 keys in 30 seconds


  • Added 0 points from file
  • Setting N up to 17592186044416.
  • Init bloom filter for 4194304 elements : 11.00 MB
  • Allocating 128.00 MB for aMP Points
  • Precalculating 4194304 aMP points
  • Allocating 64.00 MB for bP Points
  • precalculating 4194304 bP points
  • Sorting 4194304 elements
Total 1086000828893888512 keys in 30 seconds: 36200027629796283 keys/s
Total 2176681179275591680 keys in 60 seconds: 36278019654593194 keys/s
Total 3263473656541478912 keys in 90 seconds: 36260818406016432 keys/s
Total 4346941210644971520 keys in 120 seconds: 36224510088708096 keys/s
albert0bsd (OP)
Hero Member
*****
Offline Offline

Activity: 857
Merit: 662



View Profile WWW
March 11, 2021, 05:53:17 AM
Last edit: March 11, 2021, 06:21:43 AM by albert0bsd
 #14

and What mean keys, it is mean 1 private key or 1 key character

That is the keys checked in a range from A to B

by example some range from/to in the 120 bit space:

Code:
from: 0x800000000000000000000000000000
to: 0x800000000000000000100000000000

Difference: 0x100000000000
Decimal: 17,592,186,044,416

That is the number of keys in that range, the BSGS algorimth can check that range in a few Operations, then that number of keys are already checked, and added to the total counter

  • Added 0 points from file
Something is wrong with your input file, it doesn't have any valid data, yes is one bug, i need to solve it.

Edit Already Solved: Commit a0a60ede57890c5f46e711628f52de2d7becd270
 
Best regards!

Markzuberg64
Jr. Member
*
Offline Offline

Activity: 35
Merit: 2


View Profile
March 21, 2021, 01:01:22 PM
Merited by LoyceV (2)
 #15

Hi ,

Glad to see this project here on bitcointalk . I am using it from last many days and its quite impressive . I found it via iceland2k14 comments on his bsgs repo. Anyways i have some questions for you.

1. What exactly are BP points and AMP points in your code. How are they calculated. Any specific formulae.
2. Where can i find BP file and Amp file after it gets calculated in your program. I am not able to locate any 1920 MB BP file generated for -k 30 im the directory.
3. -a how to make this file of precalculated amp points.
4. A question not related to this tool , i am supposing that this tool is calculating different key pairs at different spaces in a range. And matches the pubkey generated with the input pubkey - keyspace*G ,  my question is that since its comparing one single key from a keyspace of trillion keys then the output that its showing like 30 trillion keys scanned means that it actually matched 30 precalculated results from 30 trillion private keys. Right ? Or it is 30 trillions keys are converted to 30 trillion pub keys and matched in 30 second.
And what are K factor related to M , what is M here.

Thanks in advance.
Markzuberg64
Jr. Member
*
Offline Offline

Activity: 35
Merit: 2


View Profile
March 21, 2021, 07:57:26 PM
 #16


it is normal.
I think it is too fast.

1086000828893888512 keys in 30 seconds


  • Added 0 points from file
  • Setting N up to 17592186044416.
  • Init bloom filter for 4194304 elements : 11.00 MB
  • Allocating 128.00 MB for aMP Points
  • Precalculating 4194304 aMP points
  • Allocating 64.00 MB for bP Points
  • precalculating 4194304 bP points
  • Sorting 4194304 elements
Total 1086000828893888512 keys in 30 seconds: 36200027629796283 keys/s
Total 2176681179275591680 keys in 60 seconds: 36278019654593194 keys/s
Total 3263473656541478912 keys in 90 seconds: 36260818406016432 keys/s
Total 4346941210644971520 keys in 120 seconds: 36224510088708096 keys/s


Not just fast. With my system i get 14 trillion per sec , that on -t 8 -k 30 , with 8 GB ram , BP point allocation took around 2 GB .

What are your specs , BP point allocation seem to be on default with 1 thread only.
albert0bsd (OP)
Hero Member
*****
Offline Offline

Activity: 857
Merit: 662



View Profile WWW
March 22, 2021, 02:13:59 PM
 #17

Hi everyone, i will update the code today with a new version, this new version is a little more faster and use less RAM, using less RAM meaning tha you can load a bigger bP Table with a bigger K value.

Glad to see this project here on bitcointalk . I am using it from last many days and its quite impressive . I found it via iceland2k14 comments on his bsgs repo. Anyways i have some questions for you.

Thanks
1. What exactly are BP points and AMP points in your code. How are they calculated. Any specific formulae.

bP points are G values, G, 2G, 3G, etc...

aMP points vary with the the values -n value or -k value

check this link to see a good explanation of the BSGS algo: https://andrea.corbellini.name/2015/06/08/elliptic-curve-cryptography-breaking-security-and-a-comparison-with-rsa/

2. Where can i find BP file and Amp file after it gets calculated in your program. I am not able to locate any 1920 MB BP file generated for -k 30 im the directory.

My program dont generate that file by default, i really dont want to sature the HDD of the users of my program.

If you want to generate the bPfile by your own use the bPfile program is already compilied in the last version of keyhunt.

https://github.com/albertobsd/keyhunt/blob/main/bPfile.c

Code:
./bPfile <bP items> <output filename>


3. -a how to make this file of precalculated amp points.

aMP Points change if you change your -n value or -k value. I can publish the tool to generate that file, but i need to add some "self-test" in the main program just to avoid that some user load a different or wrong files.

4. A question not related to this tool , i am supposing that this tool is calculating different key pairs at different spaces in a range. And matches the pubkey generated with the input pubkey - keyspace*G ,  my question is that since its comparing one single key from a keyspace of trillion keys then the output that its showing like 30 trillion keys scanned means that it actually matched 30 precalculated results from 30 trillion private keys. Right ? Or it is 30 trillions keys are converted to 30 trillion pub keys and matched in 30 second.
And what are K factor related to M , what is M here.

The program only do one math operation to check if one publickey is in a especific Range

https://andrea.corbellini.name/2015/06/08/elliptic-curve-cryptography-breaking-security-and-a-comparison-with-rsa/

So only one publickey is generated from sustractions and additions and that is compared agains all the bloom filter (bPTable)

If you read the link you will see that if we have a Range N we get an M value getting the squaredroot of N, the K factor was an Iceland recomendation, we can load in the bloom filter kM elements from G to kM, and we only are going to need M/k operaions instead of the orginal M operations sugested in the link.



Markzuberg64
Jr. Member
*
Offline Offline

Activity: 35
Merit: 2


View Profile
March 22, 2021, 06:12:25 PM
 #18

Hi everyone, i will update the code today with a new version, this new version is a little more faster and use less RAM, using less RAM meaning tha you can load a bigger bP Table with a bigger K value.

Glad to see this project here on bitcointalk . I am using it from last many days and its quite impressive . I found it via iceland2k14 comments on his bsgs repo. Anyways i have some questions for you.

Thanks
1. What exactly are BP points and AMP points in your code. How are they calculated. Any specific formulae.

bP points are G values, G, 2G, 3G, etc...

aMP points vary with the the values -n value or -k value

check this link to see a good explanation of the BSGS algo: https://andrea.corbellini.name/2015/06/08/elliptic-curve-cryptography-breaking-security-and-a-comparison-with-rsa/

2. Where can i find BP file and Amp file after it gets calculated in your program. I am not able to locate any 1920 MB BP file generated for -k 30 im the directory.

My program dont generate that file by default, i really dont want to sature the HDD of the users of my program.

If you want to generate the bPfile by your own use the bPfile program is already compilied in the last version of keyhunt.

https://github.com/albertobsd/keyhunt/blob/main/bPfile.c

Code:
./bPfile <bP items> <output filename>


3. -a how to make this file of precalculated amp points.

aMP Points change if you change your -n value or -k value. I can publish the tool to generate that file, but i need to add some "self-test" in the main program just to avoid that some user load a different or wrong files.

4. A question not related to this tool , i am supposing that this tool is calculating different key pairs at different spaces in a range. And matches the pubkey generated with the input pubkey - keyspace*G ,  my question is that since its comparing one single key from a keyspace of trillion keys then the output that its showing like 30 trillion keys scanned means that it actually matched 30 precalculated results from 30 trillion private keys. Right ? Or it is 30 trillions keys are converted to 30 trillion pub keys and matched in 30 second.
And what are K factor related to M , what is M here.

The program only do one math operation to check if one publickey is in a especific Range

https://andrea.corbellini.name/2015/06/08/elliptic-curve-cryptography-breaking-security-and-a-comparison-with-rsa/

So only one publickey is generated from sustractions and additions and that is compared agains all the bloom filter (bPTable)

If you read the link you will see that if we have a Range N we get an M value getting the squaredroot of N, the K factor was an Iceland recomendation, we can load in the bloom filter kM elements from G to kM, and we only are going to need M/k operaions instead of the orginal M operations sugested in the link.




Thanks for the link to article and explanation. It helped a lot in understanding the algo. It would be better if you can provide tool to generate amp points as well to better understand the algo and if option to choose BP file and Amp file can be provided in program itself for testing purpose. I think -amp option is already available.
Markzuberg64
Jr. Member
*
Offline Offline

Activity: 35
Merit: 2


View Profile
March 22, 2021, 07:28:51 PM
 #19

Hi again ,

If i need to find key in a single range say -b 65 and for fix value -k 250 , then wouldn't it be beneficial to  save sorted amp points to one file and later on use same file for multi pubkey search. Like for searching 1 million key it seems easy and productive to search  in 1000 keys chunks. In that case it will take too much time to again calculate bp points , Amp points and sorting them. if Amp points so generated will work fine on different pub keys ? I see that it generates same number of amp points regardless of inserting 1 pub key or 5 pubkey.  
albert0bsd (OP)
Hero Member
*****
Offline Offline

Activity: 857
Merit: 662



View Profile WWW
March 22, 2021, 08:24:34 PM
 #20

if Amp points so generated will work fine on different pub keys ? I see that it generates same number of amp points regardless of inserting 1 pub key or 5 pubkey. 

Yes those point will work well with another publickey, Yes if you dont change the values of -k and -n then those points are always the same number and have the same value.

aMP points are not a problem to calculate it those values are less with biggers k values. The problem are the bP values, those values can be calcualted with the bPfile, already in the keyhunt directory.

Best regards!

Pages: [1] 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 »  All
  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!