Bitcoin Forum
June 17, 2024, 08:37:30 AM *
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 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 ... 142 »
  Print  
Author Topic: Pollard's kangaroo ECDLP solver  (Read 56571 times)
Jean_Luc (OP)
Sr. Member
****
Offline Offline

Activity: 462
Merit: 696


View Profile
May 11, 2020, 12:20:33 PM
 #141

Multiple search is possible but I won't work on it first.
I will work on a distributed client/server version.
The #110 will be likely solved soon.
With the distributed version, I'm almost sure the #115 will also be solved.
PietCoin97
Jr. Member
*
Offline Offline

Activity: 91
Merit: 3


View Profile
May 11, 2020, 12:49:40 PM
 #142

Hello Jean Luc can you please tell me how do edit code for dont get this error anymore ?

Code:
[1996.14 MK/s][GPU 1996.14 MK/s][Count 2^36.30][Dead 0][47s (Avg 03:24:08)][4.5/14.9MB]
SaveWork timweout !

something change in this area of Backup code ?

Code:
// Wait that all threads blocks before saving works
  saveRequest = true;
  int timeout = 1000;
  while(!isWaiting(threads) && timeout>0) {
    Timer::SleepMillis(50);
    timeout -= 50;

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

Activity: 462
Merit: 696


View Profile
May 11, 2020, 01:00:59 PM
 #143

Try to change the timeout to 3000.

Code:
int timeout = 3000;
PietCoin97
Jr. Member
*
Offline Offline

Activity: 91
Merit: 3


View Profile
May 11, 2020, 01:02:03 PM
 #144

i tryed with int = 10000 but also get this error
Jean_Luc (OP)
Sr. Member
****
Offline Offline

Activity: 462
Merit: 696


View Profile
May 11, 2020, 01:10:28 PM
 #145

Do you have this error always or only from time to time ?
PietCoin97
Jr. Member
*
Offline Offline

Activity: 91
Merit: 3


View Profile
May 11, 2020, 01:11:39 PM
 #146

3 times in a row error and then i am at 60 mkeys and then it works 1 time then i go up with the Mkey then error
Jean_Luc (OP)
Sr. Member
****
Offline Offline

Activity: 462
Merit: 696


View Profile
May 11, 2020, 01:13:19 PM
 #147

I presume you are using -ws and you have lots of kangaroos, may be multiple GPU ?
PietCoin97
Jr. Member
*
Offline Offline

Activity: 91
Merit: 3


View Profile
May 11, 2020, 01:15:10 PM
 #148

yes 6 GPUs and i use -ws
PietCoin97
Jr. Member
*
Offline Offline

Activity: 91
Merit: 3


View Profile
May 11, 2020, 01:17:40 PM
 #149

Code:
Number of kangaroos: 2^22.49
Suggested DP: 20
Expected operations: 2^44.47
Expected RAM: 901.5MB
DP size: 20 [0xFFFFF00000000000]
GPU: GPU #1 P104-100 (15x128 cores) Grid(30x256) (99.0 MB used)
SolveKeyGPU Thread GPU#1: creating kangaroos...
GPU: GPU #2 P104-100 (15x128 cores) Grid(30x256) (99.0 MB used)
SolveKeyGPU Thread GPU#2: creating kangaroos...
GPU: GPU #0 P104-100 (15x128 cores) Grid(30x256) (99.0 MB used)
SolveKeyGPU Thread GPU#0: creating kangaroos...
GPU: GPU #3 GeForce GTX 1070 (15x128 cores) Grid(30x256) (99.0 MB used)
SolveKeyGPU Thread GPU#3: creating kangaroos...
GPU: GPU #4 GeForce GTX 1070 (15x128 cores) Grid(30x256) (99.0 MB used)
SolveKeyGPU Thread GPU#4: creating kangaroos...
GPU: GPU #5 GeForce GTX 1070 (15x128 cores) Grid(30x256) (99.0 MB used)
SolveKeyGPU Thread GPU#5: creating kangaroos...
SolveKeyGPU Thread GPU#2: 2^19.91 kangaroos [11.5s]
SolveKeyGPU Thread GPU#1: 2^19.91 kangaroos [11.7s]
SolveKeyGPU Thread GPU#0: 2^19.91 kangaroos [13.9s]
SolveKeyGPU Thread GPU#3: 2^19.91 kangaroos [11.7s]
SolveKeyGPU Thread GPU#5: 2^19.91 kangaroos [11.2s]
SolveKeyGPU Thread GPU#4: 2^19.91 kangaroos [11.5s]
[1984.76 MK/s][GPU 1984.76 MK/s][Count 2^36.22][Dead 0][45s (Avg 03:25:19)][4.3/14.4MB]
SaveWork timweout !
[62.13 MK/s][GPU 62.13 MK/s][Count 2^36.28][Dead 0][01:47 (Avg 4.6d)][4.4/14.8MB]  5MB]
SaveWork timweout !
[59.95 MK/s][GPU 59.95 MK/s][Count 2^36.33][Dead 0][02:49 (Avg 4.7d)][4.5/15.2MB]
SaveWork: safe.work1..............................done [544.5 MB] [26s] Mon May 11 15:17:09 2020
[523.14 MK/s][GPU 523.14 MK/s][Count 2^36.54][Dead 0][03:22 (Avg 12:58:57)][4.9/16.6MB]

Code:
[1984.76 MK/s][GPU 1984.76 MK/s][Count 2^36.22][Dead 0][45s (Avg 03:25:19)][4.3/14.4MB]
SaveWork timweout !
[62.13 MK/s][GPU 62.13 MK/s][Count 2^36.28][Dead 0][01:47 (Avg 4.6d)][4.4/14.8MB]  5MB]
SaveWork timweout !
[59.95 MK/s][GPU 59.95 MK/s][Count 2^36.33][Dead 0][02:49 (Avg 4.7d)][4.5/15.2MB]
SaveWork: safe.work1..............................done [544.5 MB] [26s] Mon May 11 15:17:09 2020
[2034.60 MK/s][GPU 2034.60 MK/s][Count 2^37.12][Dead 0][03:50 (Avg 03:20:17)][6.3/21.7MB]
SaveWork timweout !
[61.08 MK/s][GPU 61.08 MK/s][Count 2^37.15][Dead 0][04:52 (Avg 4.6d)][6.4/22.0MB]  8MB]
SaveWork timweout !
[57.19 MK/s][GPU 57.19 MK/s][Count 2^37.18][Dead 0][05:55 (Avg 4.9d)][6.5/22.3MB]
SaveWork timweout !
[63.30 MK/s][GPU 63.30 MK/s][Count 2^37.21][Dead 0][06:55 (Avg 4.5d)][6.6/22.6MB]
SaveWork timweout !
[62.27 MK/s][GPU 62.27 MK/s][Count 2^37.24][Dead 0][07:58 (Avg 4.5d)][6.7/22.9MB]
SaveWork timweout !
[60.29 MK/s][GPU 60.29 MK/s][Count 2^37.26][Dead 0][08:58 (Avg 4.7d)][6.8/23.2MB]
SaveWork: safe.work1..............................done [546.8 MB] [26s] Mon May 11 15:23:19 2020
[1999.43 MK/s][GPU 1999.43 MK/s][Count 2^37.71][Dead 0][09:59 (Avg 03:23:48)][8.5/28.4MB]
SaveWork timweout !
[1306.40 MK/s][GPU 1306.40 MK/s][Count 2^37.72][Dead 0][10:09 (Avg 05:11:55)][8.6/28.4MB]
Jean_Luc (OP)
Sr. Member
****
Offline Offline

Activity: 462
Merit: 696


View Profile
May 11, 2020, 01:28:55 PM
 #150

When you save kangaroo, the CPU has to get back all kangaroos from GPUs memory this might be long.
Could you reload a work and post the output ?
Jean_Luc (OP)
Sr. Member
****
Offline Offline

Activity: 462
Merit: 696


View Profile
May 11, 2020, 02:39:05 PM
 #151

I did a small patch to try to speed up kangaroo transfer and also changed the timeout to 3 sec. Could you try it and tell me if it improves something ?
PietCoin97
Jr. Member
*
Offline Offline

Activity: 91
Merit: 3


View Profile
May 11, 2020, 03:02:52 PM
 #152

Yeah I will test when I am back on PC
patatasfritas
Newbie
*
Offline Offline

Activity: 17
Merit: 0


View Profile
May 11, 2020, 03:37:28 PM
 #153

I did a small patch to try to speed up kangaroo transfer and also changed the timeout to 3 sec. Could you try it and tell me if it improves something ?

I had same problem. Also, when the save fails, the GPU downs from ~500M to ~20M.

The 3sec patch fixed it. Thanks


PietCoin97
Jr. Member
*
Offline Offline

Activity: 91
Merit: 3


View Profile
May 11, 2020, 03:56:59 PM
Last edit: May 11, 2020, 04:18:34 PM by PietCoin97
 #154

Here is loaded file with new code

Code:
Keys :1
LoadWork: [HashTalbe 8.5/28.1MB] [00s]
Number of CPU thread: 0
Range width: 2^86
Jump Avg distance: 2^42.96
Number of kangaroos: 2^22.49
Expected operations: 2^44.47
Expected RAM: 901.5MB
DP size: 20 [0xFFFFF00000000000]
Fetch kangaroos: 983040
Fetch kangaroos: 983040
Fetch kangaroos: 983040
Fetch kangaroos: 983040
Fetch kangaroos: 983040
Fetch kangaroos: 983040
LoadWork: [2^22.49 kangaroos loaded] [0 created] [01s]
GPU: GPU #2 P104-100 (15x128 cores) Grid(30x256) (99.0 MB used)
GPU: GPU #0 P104-100 (15x128 cores) Grid(30x256) (99.0 MB used)
GPU: GPU #1 P104-100 (15x128 cores) Grid(30x256) (99.0 MB used)
SolveKeyGPU Thread GPU#2: 2^19.91 kangaroos [0.8s]
SolveKeyGPU Thread GPU#0: 2^19.91 kangaroos [0.8s]
GPU: GPU #4 GeForce GTX 1070 (15x128 cores) Grid(30x256) (99.0 MB used)
GPU: GPU #5 GeForce GTX 1070 (15x128 cores) Grid(30x256) (99.0 MB used)
GPU: GPU #3 GeForce GTX 1070 (15x128 cores) Grid(30x256) (99.0 MB used)
SolveKeyGPU Thread GPU#1: 2^19.91 kangaroos [1.6s]
SolveKeyGPU Thread GPU#3: 2^19.91 kangaroos [1.0s]
SolveKeyGPU Thread GPU#5: 2^19.91 kangaroos [1.0s]
SolveKeyGPU Thread GPU#4: 2^19.91 kangaroos [1.1s]
[1999.63 MK/s][GPU 1999.63 MK/s][Count 2^38.23][Dead 0][13:26 (Avg 03:23:47)][11.4/35.5MB]
SaveWork timweout !
[62.04 MK/s][GPU 62.04 MK/s][Count 2^38.25][Dead 0][14:27 (Avg 4.6d)][11.5/35.7MB]  6MB]
SaveWork timweout !
[59.46 MK/s][GPU 59.46 MK/s][Count 2^38.26][Dead 0][15:28 (Avg 4.8d)][11.6/35.9MB]
SaveWork: safe.work1..............................done [551.6 MB] [25s] Mon May 11 18:03:44 2020
[1949.67 MK/s][GPU 1949.67 MK/s][Count 2^38.51][Dead 0][16:30 (Avg 03:29:00)][13.4/39.7MB]
SaveWork timweout !
[59.95 MK/s][GPU 59.95 MK/s][Count 2^38.52][Dead 0][17:32 (Avg 4.7d)][13.5/39.9MB]  7MB]
SaveWork timweout !
[59.30 MK/s][GPU 59.30 MK/s][Count 2^38.53][Dead 0][18:33 (Avg 4.8d)][13.6/40.1MB]
SaveWork: safe.work1..............................done [553.6 MB] [28s] Mon May 11 18:06:52 2020
[1966.21 MK/s][GPU 1966.21 MK/s][Count 2^38.72][Dead 0][19:33 (Avg 03:27:15)][15.2/43.0MB]
SaveWork timweout !
[60.46 MK/s][GPU 60.46 MK/s][Count 2^38.73][Dead 0][20:36 (Avg 4.7d)][15.3/43.2MB]  1MB]
SaveWork timweout !
[61.23 MK/s][GPU 61.23 MK/s][Count 2^38.74][Dead 0][21:38 (Avg 4.6d)][15.4/43.3MB]
SaveWork: safe.work1..............................done [555.4 MB] [26s] Mon May 11 18:09:56 2020
[2002.32 MK/s][GPU 2002.32 MK/s][Count 2^38.92][Dead 0][22:39 (Avg 03:23:31)][17.1/46.3MB]
SaveWork timweout !
[62.15 MK/s][GPU 62.15 MK/s][Count 2^38.93][Dead 0][23:41 (Avg 4.6d)][17.2/46.4MB]  3MB]
SaveWork timweout !
[60.69 MK/s][GPU 60.69 MK/s][Count 2^38.93][Dead 0][24:41 (Avg 4.7d)][17.3/46.6MB]
SaveWork timweout !
[62.82 MK/s][GPU 62.82 MK/s][Count 2^38.94][Dead 0][25:41 (Avg 4.5d)][17.4/46.7MB]
SaveWork timweout !
[58.73 MK/s][GPU 58.73 MK/s][Count 2^38.95][Dead 0][26:44 (Avg 4.8d)][17.5/46.9MB]
SaveWork timweout !
[59.46 MK/s][GPU 59.46 MK/s][Count 2^38.96][Dead 0][27:46 (Avg 4.8d)][17.6/47.0MB]
SaveWork: safe.work1..............................done [557.6 MB] [28s] Mon May 11 18:16:05 2020
[282.34 MK/s][GPU 282.34 MK/s][Count 2^38.98][Dead 0][28:19 (Avg 1.0d)][17.8/47.4MB]

and this is -winfo from Workfile

Code:
Version   : 0
DP bits   : 20
Start     : 2000000000000000000000000000
Stop      : 3FFFFFFFFFFFFFFFFFFFFFFFFFFF
Key       : 0309976BA5570966BF889196B7FDF5A0F9A1E9AB340556EC29F8BB60599616167D
Count     : 534868131840 2^38.960
Time      : 27:46
DP Size   : 17.6/47.0MB
DP Count  : 510335 2^18.961
HT Max    : 11 [@ 0090E4]
HT Min    : 0 [@ 000008]
HT Avg    : 1.95
HT SDev   : 1.40
Kangaroos : 5898240 2^22.492
Jean_Luc (OP)
Sr. Member
****
Offline Offline

Activity: 462
Merit: 696


View Profile
May 11, 2020, 05:32:18 PM
 #155

Here is loaded file with new code

So it takes now up to 6sec to transfer the kangaroos, try with a timeout of ~10sec. I don't know if cuda can do parallel transfer on multiple GPU...
I'll add a way to set the up the timeout in the next release and see if I can speed up more this data transfer...
brainless
Member
**
Offline Offline

Activity: 316
Merit: 34


View Profile
May 11, 2020, 06:14:40 PM
 #156

Multiple search is possible but I won't work on it first.
I will work on a distributed client/server version.
The #110 will be likely solved soon.
With the distributed version, I'm almost sure the #115 will also be solved.

110 solve depend on multiple pubkeys search at once, in others , you all will spend time in jumping here and there, mean you need lot of gpu powers, you need lot of ram, etc, and you can not manage all things togather, and no one have these all option available, only my last word, if you design multiple pubkeys search ver, that will be solution for just within 3 days Smiley
Enjoy your research!!!

13sXkWqtivcMtNGQpskD78iqsgVy9hcHLF
Elliptic23
Newbie
*
Offline Offline

Activity: 22
Merit: 3


View Profile
May 11, 2020, 06:50:28 PM
 #157

Who else other than you has that kind of GPU power?
Those of us lucky to have 4 2080 Ti's have no chance of solving anything in time.

A lot of miners do, but we do not have a server with the much RAM available to solve the (110-bit interval) problem as fast as possible. So we need to come up with the best time-memory trade-off parameters. Also, I by far are more interested in the intellectual challenge, although the prize (in BTC) can be a very good motivator for some.

Why don't you focus on the harder 115 and 120 bit problems and give the smaller people a chance? You have 20-30 times the GPUs of most people here.
Kpot87
Jr. Member
*
Offline Offline

Activity: 37
Merit: 1


View Profile
May 11, 2020, 08:00:42 PM
 #158

Yeah the multi pubkey search as for me more interesting and on github there was a first topic about this)
arulbero
Legendary
*
Offline Offline

Activity: 1915
Merit: 2074


View Profile
May 11, 2020, 08:13:56 PM
 #159

So, the cost for 128 devices will be 128/8 * 620 = 9.9 kUSD per week.. Current prize value of #110 is 1.1x8.8kUSD = 9.7 kUSD, so the prize is more o less the same like the investments need to find it. But there is no 100% guarantee to solve the key, it is only 50%.

To be precise, the current prize is 1.1 BTC + 1.1 BCH + 1.1 BSV = 1.1 * (9300 USD) = 10230 USD


Multiple search is possible but I won't work on it first.
I will work on a distributed client/server version.
The #110 will be likely solved soon.
With the distributed version, I'm almost sure the #115 will also be solved.

In that case it would be a record, 114 bit.

******************************************************************************

I rewrite my idea with more details:

we need 2.sqrt(N) steps to get a collision in a N-space,

we need 2.sqrt(2N) = sqrt(2).2.sqrt(N) steps to get a collision in a 2N-space


if we find a way to generate sqrt(2).2.sqrt(N) points faster than 2.sqrt(N), we get a collision in less time, even if we double our searching space.

If we use the endomorphism, we can double our interval, from

[1,2,3, ..., n-1,n]

to

[1,2,3,....., n-1,n] + [lambda, 2*lambda, 3*lambda, ....., n*lambda]

We have 2 types of jumps (always positive): 16 small steps (in first interval) + 16 big steps (in second interval)


For example:
(1G, 2G, 4G, 8G, 24G, 37G,....., 512G)  + (lambda*18G, lambda*72G, ..., lambda*816G)

+ 1 jump from range1 to range2  or  from range1 to range2:     P -> lambda*P  or lambda*P -> lambda^2*(lambda*P)

You have to know at each step in which interval the kangaroo is.

We set the probability to perform a jump between 2 different ranges = 50%, the other 50% is for normal jumps.


When a kangaroo is in the point P(x,y):

if x-coordinate > 2^255 then:
 change interval
else:
 do a normal jumps (x-coordinate % 16, small or big steps depends on the interval in which P is)


If  x-coordinate > 2^255 then:
 you compute a single multiplication:   beta*x (or beta^2*x, it depends on the interval in which P is)
else:
  you compute the normal jump P+k*G (or P+s*lambda*G, it depends on the interval in which P is)

 (3 multiplications for the inverse + 1M + 1S for the x-coordinate + 1M for the y-coordinate = about 6M + some additions)


You cannot have loops, you have only to avoid 2 consecutive jumps between 2 ranges like: P -> lambda*P -> lambda^2*(lambda*P) = P, in this case you do a normal step P+kG instead of computing lambda*P:

P -> lambda*P -> lambda^2*(lambda*P) = P  instead of doing lambda^2*(lambda*P) you do P+k*G  (this jump depends on the x-coordinate of P; note you don't have to compute lambda^2*(lambda*P), you mantain in the memory the last point P)

if another kangaroo falls in the same (lambda*P) from another point you will have a collision:

Q -> Q + lambda*7*G = lambda*P -> lambda^2*(lambda*P) = P -> lambda*P  instead of doing again lambda*P, you do P+k*G as before


If we look at a couple of consecutive jumps, we will have:

                                            probability
normal jump + normal jump = (1/2)^2
normal jump + lambda jump = (1/2)^2
lambda jump + normal jump =  (1/2)^2
lambda jump + lambda jump= (1/2)^2 but -> loop, it is forbidden
-> it becomes: lambda jump  + lambda jump + normal jump


On average for each 2 points we need to perform (1/2)^2*12M + (1/2)^2*2*7M + (1/2)^2*7M = 8.25M,    4,125 M for each point.


If you double the interval:

[1,2,3,....., n-1,n] + [lambda, 2*lambda, 3*lambda, ....., n*lambda]

then you perform sqrt(2).2.sqrt(N) steps in the same time you are performing now sqrt(2).2.(4,125/6).sqrt(N)= 1.945*sqrt(N)


But

we have a collision not only when 2 kangaroos (a wild and a tame) meet in a single range (first o second); even when they fall in 2 points P and lambda*P (with the same y-coordinate), there is a 75% that they will continue on the same path:
                                
P -> lambda*P -> P    there is a collision (same path)
P -> lambda*P -> lambda*P + lambda*7*G  there is a collision (same path)
P -> P+12*G        and  lambda*P -> P     there is a collision (same path)
P -> P+12*G   and  lambda*P ->   lambda*P + lambda*7*G  there is no collision
 there is no a collision, one kangaroo jumps from P to P+12*G and the other one jumps from  lambda*P to lambda*P + lambda*7*G

In a N-space, we need 2 lists of sqrt(N) points to form sqrt(N)*sqrt(N) = N couples. N couples over N^2 possible couples, on average we should generate N couples to get one with the same elements (a collision)

In our 2N-space we have 2N couples with the same 2 points + 2N couples with 2 related points (P,lambda*P). On average 3/4 of (P,lambda*P) will produce (if xP > 2^255 or if x(lambda*P)>2^255) a collision,
then we have (2N + 3/4*2N) couples of collisions over (2N*2N) possible couple.
The probability to find a collision for each couple is:

   (7/4 * 2N) / (4N^2) = 14/16 * 1/N = 7/8 * 1/N  instead of 1/2N, this means 7/4 bigger.

We need than 8N/7 couples to have a collision, 2 lists of sqrt(8N/7) points -> 2,14.sqrt(N)  'cheap' points ->
2,14.(4,125/6).sqrt(N) = 1,47.sqrt(N) normal points
COBRAS
Member
**
Offline Offline

Activity: 883
Merit: 22


View Profile
May 11, 2020, 10:55:55 PM
 #160

Hello  Smiley

Quote

Expected RAM: 228.1MB
DP size: 23 [0xFFFFFE0000000000]
GPU: GPU #0 Tesla T4 (40x64 cores) Grid(80x128) (129.0 MB used)
SolveKeyGPU Thread GPU#0: creating kangaroos...
SolveKeyGPU Thread GPU#0: 2^20.32 kangaroos [6.4s]
[511.32 MK/s][GPU 511.32 MK/s][Count 2^33.64][Dead 0][30s (Avg 1.1d)][2.0/4.2MB]  ^C
C:\Chromidrol2020>chromatom2020 -t 0  -gpu in.txt
Kangaroo v1.4
Start:0
Stop :FFFFFFFFFFFFFFFFFFFFF
Keys :2
Number of CPU thread: 0
Range width: 2^84
Jump Avg distance: 2^42.03
Number of kangaroos: 2^20.32
Suggested DP: 21
Expected operations: 2^43.43
Expected RAM: 228.1MB
DP size: 21 [0xFFFFF80000000000]
GPU: GPU #0 Tesla T4 (40x64 cores) Grid(80x128) (129.0 MB used)
SolveKeyGPU Thread GPU#0: creating kangaroos...
SolveKeyGPU Thread GPU#0: 2^20.32 kangaroos [6.5s]
[511.17 MK/s][GPU 511.17 MK/s][Count 2^43.02][Dead 0][05:32:59 (Avg 06:27:23)][132.1/172.6MB]  ^C
C:\Chromidrol2020>


Code working fine I think.

p.s. Im not go away from there.   Grin




[
Pages: « 1 2 3 4 5 6 7 [8] 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 ... 142 »
  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!