Help to modify kangaroo.exe code
I am not expert with c++ (sorry it is very hard to learn normal user I am not programmer)
I think I would like to add command to call function Save to function output
I am not sure it correct or not
Kangaroo::SaveWork
bool Kangaroo::Output
I see at Kangaroo::Output function works two thing one open file output and write private key to output file and then print out treport on display show message found private key
So, if I add function SaveWork to work before write output file (or after write output file but before print out on scree to show private key message) may be help to save work file include collision point
may be function SaveWork , process only on schedule time
and more one collision point to show when fprint show hex private key (when found) how I can fprint this value when found it
Total I want to modify 2 thing 1. write save file again when write output file 2. print out collision point
I think insert code may be simple, anyone can help?
Thank you for help
|
|
|
Do you have source code how to calculate? however I calculate difference with you from script python(kangaroo) puzzle #50 (python 1 hour solve) collision point c52d3e18cf60567ff0ec3ada36b35b214281c2d0a0fa24e1bd1844f982400000 383497870405204 c52d3e18cf60567ff0ec3ada36b35b214281c2d0a0fa24e1bd1844f982400000 994638366572968 994638366572968-383497870405204 = 611140496167764 = 22BD43C2E9354 >>> math.log2(994638366572968) 49.82116541027459 >>> math.log2(383497870405204) 48.44621189477088 c52d3e18cf60567ff0ec3ada36b35b214281c2d0a0fa24e1bd1844f982400000 convert to Dec 89185567865970002315484466436073764171950415667507660205264806658442243604480 is not publickkey key but it is Elliptic curve Elliptic curve last calculate (from private key = 611140496167764 = 22BD43C2E9354) Elliptic curve double x = 89185567865970002315484466436073764171950415667507660205264806658442243604480 Elliptic curve double y = 87127837977108995721802776410311454708031756638369374626443936686222994129249 public key x = c52d3e18cf60567ff0ec3ada36b35b214281c2d0a0fa24e1bd1844f982400000 public key y = c0a09bd53538cb2e3dabfdfb7a3385b62ce3e69963ea073967d9151c5edd4161 public key uncompressed: 04c52d3e18cf60567ff0ec3ada36b35b214281c2d0a0fa24e1bd1844f982400000c0a09bd53538c b2e3dabfdfb7a3385b62ce3e69963ea073967d9151c5edd4161 public key 03c52d3e18cf60567ff0ec3ada36b35b214281c2d0a0fa24e1bd1844f982400000 kangaroo found collision point on Elliptic curve calculate (process between convert private key to public key)
|
|
|
I would like to measure kangaroo DP for puzzle #120
I always wondered what the relation was between DPsize and runtime. Maybe somebody should draw a few graphs. They will be parabolic because setting the size too low or high exponentially increases runtime, and if we could even make a 3D graph lining up the DP curves from all range sizes (powers in this case). The idea would be to find the smallest points on the graph to see if there's a way to improve the automatically calculated dpsize value. (I once experimented with setting an arbitrary dpmask, but that had very bad effects for runtime.) kangaroo still power full for now (not yet have other algorithm best for now) Can you help to explain for kangaroo.exe data from save.work file? save.work file from kangaroo.exe both solve a 120 bit and 256 bit data is same format (solve by using generate private key and publick key) I convert hex to dec from 120 bit solve (test pubkey) 262143,48357306424295921700769579380444332534 1562842135080204172 262143,236688263920794955386261906309794027722 967375894582543310 262143,209421810490797557957190854895683512892 441962270191571849 262143,225641934287901095819832523508370738498 1316787007398506857 262143,291551157822226898627726358187674170442 -493837653657333763 from 265 bit solve (test pubkey) 0,59459776387358570849530339812195619039 30449515388215305633 0,168557432531209639563818391489784546103 27117058245582788305 0,187703705753502279679574421533681592130 23895961494359236057 0,211282612041149045737248359108783970698 28316598789817799604 262143,303498835120544398690280772659518904948 15298374911161789743 262143,330471970880799703221136385694942800905 24405259179491741594 262143,333088154919942412776046848521499169913 29643794240743107223 bot still same format, I don't know what is number from?
|
|
|
I don't think there is such a feature in kangaroos yet. I don't think there is yet an application that can calculate this, so I made an application that calculates this.
you want program
I am sorry that I have not reached the level where I can upload pictures. I think it's the program you want. Is it correct?
upload image easy by https://imgbb.com/and copy BB code to post
|
|
|
puzzle #44
collision be3a794f0da8faf2802e0fef0eefae7cd271f073f241a5f4489aff8bf9f00000 17579062999607 be3a794f0da8faf2802e0fef0eefae7cd271f073f241a5f4489aff8bf9f00000 2174301242536
>>> math.log2(17579062999607) 43.99892340743872 >>> math.log2(2174301242536) 40.98368897368013
17579062999607-2174301242536 = 15404761757071 (hex = E02B35A358F )
I just would like to get data like this from kangaroo.exe
|
|
|
I would like to measure kangaroo DP for puzzle #120 Now have only kangaroo.exe can solve sample pubkey I generate on range 2^120 for puzzle #120 Can anybody help to get collision point from save.work file for collision point from tame.txt and wild.txt I can get is only python script but python script can solve up to 2^40 upper is very slow python script not helpful if can get collision point from save.work file by kangaroo.exe may be help to easy to set DP to match with example puzzle #40 ec9d5049bd4509aa41e1f5c312de1900d3eac4adba0692a41286b2497e520000 1110317004752 ec9d5049bd4509aa41e1f5c312de1900d3eac4adba0692a41286b2497e520000 106665591802 1110317004752-106665591802 = 1003651412950 1003651412950 hex = E9AE4933D6 https://privatekeys.pw/key/000000000000000000000000000000000000000000000000000000e9ae4933d6see >>> math.log2(1110317004752) 40.014108775485056 >>> math.log2(106665591802) 36.63430391024868 >>> range 40 (39-40) tame.txt on range over 40-41 and wild.txt under 36-37 just testing looking for some data may be helpful (if)
|
|
|
I created python code for gpu but as numpy can't allow to compute more then 9223372036854775808 so it's useless for puzzle 64..
Ok, python with GPU have limited I not sure python with GPU have many method but need to create new one coding PyCUDA, PyOpenCL, CuPy and Numba Numba is same numpy this way have problem can not use it other method I think may be stuck can not use same numpy limited
|
|
|
There is no limit to number of cores, but minimal compute capability 3.0 is required. Gt 720m has only 2.1 ccap, therefore it doesn't work
Ok Thank https://developer.nvidia.com/cuda-gpus#computeGeForce GT 720M 2.1 Can works is require 3.0 up right.
|
|
|
How to use this program? Did developer have video show hot to use?
|
|
|
if anyone use python code for brute force recommend to use bitCrack version have RANDOM options (use -r )
bitCrack random version it is very fast more than python code
I try python is very slow, I looking for python for GPU use (numba or other python use GPU but not found never have anyone code bitcoin generate address on GPU)
|
|
|
I got another question, so what type of gpu's work with kangaroo?
Is Geforce and Nvidia the same thing?
Nvidia, along with other manufacturers, sell the Geforce cards; EVGA, Zotac, Gigabyte, ASUS, etc. The GTX and RTX cards work with Kangaroo, those are Geforce cards. There are other, older cards, that if they are Geforce cards, will work as well. How many number of cuda core require for use cuda gpu? my dell nvidia gpu GT 720M have only 96 CUDA core (very old) it is can not using cuda function can not use CuBitcrack, can use only OpenCL version but GTX 1050 have 640 CUDA core can work with cuda function normal no problem look like it require to have cuda core over 500 cuda core or some require of cuda core, then nvidia gt, gtx old version that have very low cuda core can not using with cuda function I not sure may be can use with old version like cuda 8.0
|
|
|
This line is print out result when found key right How can I modify this line to show collision point data if(!needToClose) ::printf("\n");
Point PR = secp->ComputePublicKey(pk);
::fprintf(f,"Key#%2d [%d%c]Pub: 0x%s \n",keyIdx,sType,sInfo,secp->GetPublicKeyHex(true,keysToSearch[keyIdx]).c_str()); if(PR.equals(keysToSearch[keyIdx])) { ::fprintf(f," Priv: 0x%s \n",pk->GetBase16().c_str()); } else { ::fprintf(f," Failed !\n"); if(needToClose) fclose(f); return false; }
if(needToClose) fclose(f);
|
|
|
He almost certainly used some env with good entropy, he obviously knew what he was doing. Zero chance that these random numbers have a weakness on PRNG side.
Can entropy formula use for calculate position zone of puzzle SI unit: joules per kelvin (J⋅K−1) In SI base units: kg⋅m2⋅s−2⋅K−1 https://en.wikipedia.org/wiki/Entropymay be not find directly to key , just want to know zone or area nearly key for using bitcrack or kangaroo to fine again
|
|
|
Yes, Kangaroo.exe saves in hex format. The difference is Kangaroo.exe subtracts start range at beginning and then adds back once collision is found. Run -ws option, if you want to see it. I've told you how to do it, the rest is up to you.
Also, not sure what you are trying to learn how it works. Many articles and this thread alone tell you how it works. And since you've looked at python script you should know as well. Tames find private keys, wilds find offset of private key, both with user defined dp setting. People have answered you, what don't you believe or understand? No magic tricks, no speed ups, just the programs and how they were designed.
Thanks I think I wan to know about elliptic-curves, ecdsa secp256k1 , how kangaroo attack on Elliptic Curve now, just read more about secp256k1 calculate (very difficult for me) look over view is ok, but I want to understand on math Feel lag knowledge from may people expert on crypto very long time sine bitcoin invented , need to know more a lot Who next make record name on Wikipedia with use kangaroo or any challenge puzzle ? interesting to have a name on record challenge Who found Kangaroo can attack Elliptic Curve? However kangaroo is just smart random method. best on low range (115 still on low not yet middle) Did bitcoin have some vulnerability that use pubkey on calculate?
|
|
|
It is always checking for collision so doubt it will save what you are wanting it to. However, you can do a -wsplit option and then extract each work file, that's how I did it when wanting to find the exact lines that created the collision point.
in python script it is save tame.txt and wild.txt when success to find key include collision data but look like kangaroo.exe save only last save before collision but not save all data when collision may be kangaroo.exe function save it save each time setting for save for backup and can continue from save but not save when collision , look like when collision program do report immediately with out save that ok, I know from python already just want to check on kangaroo.exe to learn how it work I think both save same data on kangaroo.exe save as hex format to all
|
|
|
How can I save complete work file from kangaroo
I try to save work file and extract tame and wild, extract from python script is work success but some data have problem
Problem is data on save file not complete , it is not have duplicate line from both (collision point)
Kangaroo.exe -ws -w save.work -wi 5 in.txt
Do I wrong use command? What command I should use?
I think may be Kangaroo save only last save before success found key. How can make Kangaroo save finish data inside too?
|
|
|
I need to know and understand how eclambda works it is good for puzzle #120 or not server still loop when found key and I terminate run client program already , that still loop again again file save result still loop same job104_solution.txt Y: CA2D26338EA0E5FA9FABFDBFC4176CAB2F6A016612C7287EA3C85B86949C655F K: 00000000000000000000000000000000000000000000000000000E02B35A358F X: 0820EFE848370AFB08F6BE236ADDD39DC31AE584D687D852D8AE98642F6AE73E Y: CA2D26338EA0E5FA9FABFDBFC4176CAB2F6A016612C7287EA3C85B86949C655F K: 00000000000000000000000000000000000000000000000000000E02B35A358F X: 0820EFE848370AFB08F6BE236ADDD39DC31AE584D687D852D8AE98642F6AE73E Y: CA2D26338EA0E5FA9FABFDBFC4176CAB2F6A016612C7287EA3C85B86949C655F K: 00000000000000000000000000000000000000000000000000000E02B35A358F X: 0820EFE848370AFB08F6BE236ADDD39DC31AE584D687D852D8AE98642F6AE73E Y: CA2D26338EA0E5FA9FABFDBFC4176CAB2F6A016612C7287EA3C85B86949C655F K: 00000000000000000000000000000000000000000000000000000E02B35A358F X: 0820EFE848370AFB08F6BE236ADDD39DC31AE584D687D852D8AE98642F6AE73E Y: CA2D26338EA0E5FA9FABFDBFC4176CAB2F6A016612C7287EA3C85B86949C655F K: 00000000000000000000000000000000000000000000000000000E02B35A358F X: 0820EFE848370AFB08F6BE236ADDD39DC31AE584D687D852D8AE98642F6AE73E Y: CA2D26338EA0E5FA9FABFDBFC4176CAB2F6A016612C7287EA3C85B86949C655F K: 00000000000000000000000000000000000000000000000000000E02B35A358F X: 0820EFE848370AFB08F6BE236ADDD39DC31AE584D687D852D8AE98642F6AE73E Y: CA2D26338EA0E5FA9FABFDBFC4176CAB2F6A016612C7287EA3C85B86949C655F K: 00000000000000000000000000000000000000000000000000000E02B35A358F X: 0820EFE848370AFB08F6BE236ADDD39DC31AE584D687D852D8AE98642F6AE73E Y: CA2D26338EA0E5FA9FABFDBFC4176CAB2F6A016612C7287EA3C85B86949C655F K: 00000000000000000000000000000000000000000000000000000E02B35A358F X: 0820EFE848370AFB08F6BE236ADDD39DC31AE584D687D852D8AE98642F6AE73E Y: CA2D26338EA0E5FA9FABFDBFC4176CAB2F6A016612C7287EA3C85B86949C655F K: 00000000000000000000000000000000000000000000000000000E02B35A358F X: 0820EFE848370AFB08F6BE236ADDD39DC31AE584D687D852D8AE98642F6AE73E Y: CA2D26338EA0E5FA9FABFDBFC4176CAB2F6A016612C7287EA3C85B86949C655F K: 00000000000000000000000000000000000000000000000000000E02B35A358F
|
|
|
That looks right. But I do not see a dp setting in your command so I am not sure what the default dp is. Kangaroo is using a dp of 7 with 4 CPU threads...note: CPU in smaller ranges are much faster than GPU (less spin up time and kangaroos jump faster, probably 4 to 1 faster) I say that so you do not compare Kangaroo with CPU versus ECL with GPU. Kangaroo with GPU only will take a little more than a second, due to spin up time. For fair comparison I would make sure you are searching with GPUs only and with same dp settings. I would also try a larger range, at least 65 bits.
Thank I use low bit because not use long time test just want 5 minute solve done look like eclambda have a bug when found key then loop again infinity loop puzzle #44 kangaroo = 01 second eclambda = 11:02:08 to 11:22:33 = 20 minute may be high bits very large range eclambda can solve fast thatn kangaroo it is need to testing [2021-04-19.11:02:08] [Info] Job name: job104 [2021-04-19.11:02:08] [Info] Public key: 025E466E97ED0E7910D3D90CEB0332DF48DDF67D456B9E7303B50A3D89DE357336 [2021-04-19.11:02:08] [Info] Key length: 44 bits [2021-04-19.11:02:08] [Info] Distinguished bits: 18 [2021-04-19.11:12:29] [Info] Verifying 111831 points [2021-04-19.11:12:29] [Info] Done [2021-04-19.11:12:30] [Info] Processing C:\bitcoin\eclambda_windows_x86_64\results\job104_74194500.dat [2021-04-19.11:12:30] [Info] Checking database for collisions [2021-04-19.11:12:30] [Info] Checked 111831 points in 32ms(3.49472e+06 points per second) [2021-04-19.11:12:30] [Info] Inserting [2021-04-19.11:12:31] [Info] Inserted 111831 points in 484ms(231056 points per second) [2021-04-19.11:22:32] [Info] Verifying 122014 points [2021-04-19.11:22:32] [Info] Done [2021-04-19.11:22:33] [Info] Processing C:\bitcoin\eclambda_windows_x86_64\results\job104_74797546.dat [2021-04-19.11:22:33] [Info] Checking database for collisions [2021-04-19.11:22:33] [Info] Found matching points! [2021-04-19.11:22:33] [Info] Finding solution... [2021-04-19.11:22:33] [Info] Colliding point: 040017203645BAD827E3961275340C21E4BA315799ED15D8FE421C00002217644F3153DC9730AC448061A6009AE2C13F9BD9E6C525EF54218B35B0A5C20BB184DC [2021-04-19.11:22:33] [Info] Performing walk 1 [2021-04-19.11:22:33] [Info] Performing walk 2 [2021-04-19.11:22:34] [Info] k1: 00000000000000000000000000000000000000000000000000000A2B1F0E1645 [2021-04-19.11:22:34] [Info] k2: 000000000000000000000000000000000000000000000000000004286BB3E0B5 [2021-04-19.11:22:34] [Info] k1 - k2 [2021-04-19.11:22:34] [Info] 00000000000000000000000000000000000000000000000000000602B35A3590 [2021-04-19.11:22:34] [Info] Found valid solution! [2021-04-19.11:22:34] [Info] Found key for 'job104' [2021-04-19.11:22:34] [Info] Writing solution to C:\bitcoin\eclambda_windows_x86_64/job104_solution.txt [2021-04-19.11:22:34] [Info] Solution to job104: 00000000000000000000000000000000000000000000000000000E02B35A358F [2021-04-19.11:22:34] [Info] Found matching points! [2021-04-19.11:22:34] [Info] Finding solution... [2021-04-19.11:22:34] [Info] Colliding point: 040017203645BAD827E3961275340C21E4BA315799ED15D8FE421C00002217644F3153DC9730AC448061A6009AE2C13F9BD9E6C525EF54218B35B0A5C20BB184DC [2021-04-19.11:22:34] [Info] Performing walk 1 [2021-04-19.11:22:34] [Info] Performing walk 2 [2021-04-19.11:22:34] [Info] k1: 00000000000000000000000000000000000000000000000000000A2B1F0E1645 [2021-04-19.11:22:34] [Info] k2: 000000000000000000000000000000000000000000000000000004286BB3E0B5 [2021-04-19.11:22:34] [Info] k1 - k2 [2021-04-19.11:22:34] [Info] 00000000000000000000000000000000000000000000000000000602B35A3590 [2021-04-19.11:22:34] [Info] Found valid solution! [2021-04-19.11:22:34] [Info] Found key for 'job104' [2021-04-19.11:22:34] [Info] Writing solution to C:\bitcoin\eclambda_windows_x86_64/job104_solution.txt [2021-04-19.11:22:34] [Info] Solution to job104: 00000000000000000000000000000000000000000000000000000E02B35A358F [2021-04-19.11:22:34] [Info] Found matching points! [2021-04-19.11:22:34] [Info] Finding solution... [2021-04-19.11:22:34] [Info] Colliding point: 040017203645BAD827E3961275340C21E4BA315799ED15D8FE421C00002217644F3153DC9730AC448061A6009AE2C13F9BD9E6C525EF54218B35B0A5C20BB184DC [2021-04-19.11:22:34] [Info] Performing walk 1 [2021-04-19.11:22:34] [Info] Performing walk 2 [2021-04-19.11:22:34] [Info] k1: 00000000000000000000000000000000000000000000000000000A2B1F0E1645 [2021-04-19.11:22:34] [Info] k2: 000000000000000000000000000000000000000000000000000004286BB3E0B5 [2021-04-19.11:22:34] [Info] k1 - k2 [2021-04-19.11:22:34] [Info] 00000000000000000000000000000000000000000000000000000602B35A3590 [2021-04-19.11:22:34] [Info] Found valid solution! [2021-04-19.11:22:34] [Info] Found key for 'job104' [2021-04-19.11:22:34] [Info] Writing solution to C:\bitcoin\eclambda_windows_x86_64/job104_solution.txt [2021-04-19.11:22:34] [Info] Solution to job104: 00000000000000000000000000000000000000000000000000000E02B35A358F [2021-04-19.11:22:34] [Info] Found matching points! [2021-04-19.11:22:34] [Info] Finding solution... [2021-04-19.11:22:34] [Info] Colliding point: 040017203645BAD827E3961275340C21E4BA315799ED15D8FE421C00002217644F3153DC9730AC448061A6009AE2C13F9BD9E6C525EF54218B35B0A5C20BB184DC [2021-04-19.11:22:34] [Info] Performing walk 1 [2021-04-19.11:22:35] [Info] Performing walk 2 [2021-04-19.11:22:35] [Info] k1: 00000000000000000000000000000000000000000000000000000A2B1F0E1645 [2021-04-19.11:22:35] [Info] k2: 000000000000000000000000000000000000000000000000000004286BB3E0B5 [2021-04-19.11:22:35] [Info] k1 - k2 [2021-04-19.11:22:35] [Info] 00000000000000000000000000000000000000000000000000000602B35A3590 [2021-04-19.11:22:35] [Info] Found valid solution! [2021-04-19.11:22:35] [Info] Found key for 'job104' [2021-04-19.11:22:35] [Info] Writing solution to C:\bitcoin\eclambda_windows_x86_64/job104_solution.txt [2021-04-19.11:22:35] [Info] Solution to job104: 00000000000000000000000000000000000000000000000000000E02B35A358F
|
|
|
You say puzzle 40, do you mean you are searching for a pubkey that is in a 40 bit range? Your screen shows you are searching 65 bits with a large 20 bit dp.
Thanks I use wrong command , I copy command from sample What command I should use with eclambda? jobsubmit.exe --name job104 --start 7FFFFFFFFFF --pubkey 025e466e97ed0e7910d3d90ceb0332df48ddf67d456b9e7303b50a3d89de357336 --keylen 44 --host 192.168.0.103 eclambda.exe --name job104 --device 0 --host 192.168.0.103 puzzle #44 compare with kangaroo Kangaroo.exe in.txt in.txt 7FFFFFFFFFF FFFFFFFFFFF 025e466e97ed0e7910d3d90ceb0332df48ddf67d456b9e7303b50a3d89de357336 Kangaroo.exe in44.txt Kangaroo v2.2 Start:7FFFFFFFFFF Stop :FFFFFFFFFFF Keys :1 Number of CPU thread: 4 Range width: 2^44 Jump Avg distance: 2^22.02 Number of kangaroos: 2^12.00 Suggested DP: 7 Expected operations: 2^23.11 Expected RAM: 14.7MB DP size: 7 [0xFE00000000000000] SolveKeyCPU Thread 1: 1024 kangaroos SolveKeyCPU Thread 0: 1024 kangaroos SolveKeyCPU Thread 3: 1024 kangaroos SolveKeyCPU Thread 2: 1024 kangaroos
Key# 0 [1S]Pub: 0x025E466E97ED0E7910D3D90CEB0332DF48DDF67D456B9E7303B50A3D89DE357336 Priv: 0xE02B35A358F
Done: Total time 01s
|
|
|
I try eclambda Pollard's lambda algorithm slow than Pollard's kangaroo algorithm test with puzzle 40 still not solve use GPU 1050 but kangaroo solve with CPU only 4 core in 1 second (very old laptop) may be I using wrong option for run lambda
|
|
|
|