Pages:
Author

Topic: Keyhunt - development requests - bug reports - page 27. (Read 14735 times)

member
Activity: 119
Merit: 36
Hello Thank you for making this code public. I really like it. Smiley

In BSGS mode, if you do not specify a range, will the program default to the entire key range or some default range?

Thank you
hero member
Activity: 862
Merit: 662
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!
jr. member
Activity: 35
Merit: 2
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.  
jr. member
Activity: 35
Merit: 2
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  


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.
hero member
Activity: 862
Merit: 662
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  


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.


jr. member
Activity: 35
Merit: 2

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.
jr. member
Activity: 35
Merit: 2
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.
hero member
Activity: 862
Merit: 662
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!
member
Activity: 406
Merit: 47

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
member
Activity: 406
Merit: 47
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

hero member
Activity: 862
Merit: 662
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!
member
Activity: 406
Merit: 47
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


member
Activity: 406
Merit: 47

  • 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
member
Activity: 406
Merit: 47

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
member
Activity: 158
Merit: 39
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
full member
Activity: 431
Merit: 105
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.?
hero member
Activity: 862
Merit: 662
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!
full member
Activity: 1162
Merit: 237
Shooters Shoot...
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.
hero member
Activity: 862
Merit: 662
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!






member
Activity: 158
Merit: 39
Hi nice one !

How to use pfile?
Pages:
Jump to: