Author

Topic: Pollard's kangaroo ECDLP solver - page 132. (Read 59389 times)

sr. member
Activity: 661
Merit: 250
May 23, 2020, 12:56:02 PM
With prices I see here, 1MKs on 2080ti is 200% of 1MKs on 2070 !
sr. member
Activity: 661
Merit: 250
May 23, 2020, 12:48:35 PM
Thanks
sr. member
Activity: 642
Merit: 316
May 23, 2020, 12:43:10 PM
I'm testing with what I already have Smiley
Have some numbers on 2000 series ?
5x1066=1050mkeys
6x1070=1690mkeys
10x1080ti=4200mkeys
6x2070 = 4900mkeys
8x2080ti = 9000mkeys
4xV100 = 7200mkeys
that what i tested
sr. member
Activity: 661
Merit: 250
May 23, 2020, 12:40:13 PM
I'm testing with what I already have Smiley
Have some numbers on 2000 series ?
sr. member
Activity: 642
Merit: 316
May 23, 2020, 12:36:17 PM
Did some other tests :
1070 : 284MKs
1070ti : 291MKs
1080 : 306MKs
Why so less difference ?

All 3 cards are on 1x riser, but I tested 1070ti on 16x and there's no difference with 1x
6x1070 1697Mkey/s, but it is no good idea used 1000 series in calculations.
Huge amount of power and result little bit more as 1 rtx 2080ti, best card for calculation power/mkeys 2000 series
sr. member
Activity: 661
Merit: 250
May 23, 2020, 12:32:14 PM
Did some other tests :
1070 : 284MKs
1070ti : 291MKs
1080 : 306MKs
Why so less difference ?

All 3 cards are on 1x riser, but I tested 1070ti on 16x and there's no difference with 1x
full member
Activity: 1162
Merit: 237
Shooters Shoot...
May 23, 2020, 12:25:14 PM
Doing some tests with a 1070ti.
Why playing with OC does not affect hashrate ?


I'm not sure but I noticed the same thing...I normally adjust volts, etc. and it seemed to decrease the MKey rate a small percentage.
sr. member
Activity: 661
Merit: 250
May 23, 2020, 12:20:21 PM
Doing some tests with a 1070ti.
Why playing with OC does not affect hashrate ?
full member
Activity: 1162
Merit: 237
Shooters Shoot...
May 23, 2020, 09:30:05 AM
Server autorestart now works fine. You calmed me down, gentlemen. I must admit that I hope to find # 110 in the next few days ... I will remember you if I do it, and of course about the author of this tool, to which I already owe a lot :-)

Greetings !

Good luck! And I must admit, I hope I find it first  Grin
full member
Activity: 282
Merit: 114
May 23, 2020, 08:36:32 AM
Server autorestart now works fine. You calmed me down, gentlemen. I must admit that I hope to find # 110 in the next few days ... I will remember you if I do it, and of course about the author of this tool, to which I already owe a lot :-)

Greetings !
full member
Activity: 282
Merit: 114
May 23, 2020, 08:23:08 AM
My changes:

In Constans.h:
Code:
#define CLIENT_TIMEOUT 36000.0

In Kangaroo.cpp:
...added
Code:
bool Kangaroo::output(string msg) {
  
  FILE *f = stdout;
  f = fopen("Result.txt", "a");
    
  if (f == NULL) {
 printf("[error] Cannot open file Result.txt\n");
 f = stdout;
 return false;
  }
  else {
 fprintf(f, "%s\n", msg.c_str());
 fclose(f);
 printf("[i] Success saved to file Result.txt\n");
 return true;
  }
}

// ----------------------------------------------------------------------------

bool  Kangaroo::CheckKey(Int d1,Int d2,uint8_t type) {

  // Resolve equivalence collision

  if(type & 0x1)
    d1.ModNegK1order();
  if(type & 0x2)
    d2.ModNegK1order();

  Int pk(&d1);
  pk.ModAddK1order(&d2);

  Point P = secp->ComputePublicKey(&pk);

  if(P.equals(keyToSearch)) {
    // Key solved    
#ifdef USE_SYMMETRY
    pk.ModAddK1order(&rangeWidthDiv2);
#endif
    pk.ModAddK1order(&rangeStart);    
    Point PR = secp->ComputePublicKey(&pk);
    ::printf("\nKey#%2d [%dN]Pub:  0x%s \n",keyIdx,type,secp->GetPublicKeyHex(true,keysToSearch[keyIdx]).c_str());
    // Save Priv
    std::string prvkey = pk.GetBase16().c_str();
    bool save_pk = output(prvkey + string(":") + string("04") + PR.x.GetBase16().c_str() + PR.y.GetBase16().c_str() );
    if( PR.equals(keysToSearch[keyIdx]) ) {
      ::printf("       Priv: 0x%s \n",pk.GetBase16().c_str());
    } else {
      ::printf("       Failed !\n");
      ::printf("       Priv: 0x%s \n",pk.GetBase16().c_str());
      return false;
    }
    return true;
  }

  if(P.equals(keyToSearchNeg)) {
    // Key solved
    pk.ModNegK1order();
#ifdef USE_SYMMETRY
    pk.ModAddK1order(&rangeWidthDiv2);
#endif
    pk.ModAddK1order(&rangeStart);
    Point PR = secp->ComputePublicKey(&pk);
    ::printf("\nKey#%2d [%dS]Pub:  0x%s \n",keyIdx,type,secp->GetPublicKeyHex(true,keysToSearch[keyIdx]).c_str());
    // Save Priv
    std::string prvkeyNeg = pk.GetBase16().c_str();
    bool save_pk = output(prvkeyNeg + string(":") + string("04") + PR.x.GetBase16().c_str() + PR.y.GetBase16().c_str() );
    if(PR.equals(keysToSearch[keyIdx]) ) {
      ::printf("       Priv: 0x%s \n",pk.GetBase16().c_str());
    } else {
      ::printf("       Failed !\n");
      ::printf("       Priv: 0x%s \n",pk.GetBase16().c_str());
      return false;
    }
    return true;
  }

  return false;

}


afer
Code:
bool Kangaroo::ParseConfigFile(std::string &fileName) {

  // In client mode, config come from the server
  if(clientMode)
    return true;

  // Check file
  FILE *fp = fopen(fileName.c_str(),"rb");
  if(fp == NULL) {
    ::printf("Error: Cannot open %s %s\n",fileName.c_str(),strerror(errno));
    return false;
  }
  fclose(fp);

  // Get lines
  vector lines;
  int nbLine = 0;
  string line;
  ifstream inFile(fileName);
  while(getline(inFile,line)) {

    // Remove ending \r\n
    int l = (int)line.length() - 1;
    while(l >= 0 && isspace(line.at(l))) {
      line.pop_back();
      l--;
    }

    if(line.length() > 0) {
      lines.push_back(line);
      nbLine++;
    }

  }

  if(lines.size()<3) {
    ::printf("Error: %s not enough arguments\n",fileName.c_str());
    return false;
  }

  rangeStart.SetBase16((char *)lines[0].c_str());
  rangeEnd.SetBase16((char *)lines[1].c_str());
  for(int i=2;i<(int)lines.size();i++) {
    
    Point p;
    bool isCompressed;
    if( !secp->ParsePublicKeyHex(lines[i],p,isCompressed) ) {
      ::printf("%s, error line %d: %s\n",fileName.c_str(),i,lines[i].c_str());
      return false;
    }
    keysToSearch.push_back(p);

  }

  ::printf("Start:%s\n",rangeStart.GetBase16().c_str());
  ::printf("Stop :%s\n",rangeEnd.GetBase16().c_str());
  ::printf("Keys :%d\n",(int)keysToSearch.size());

  return true;

}

// ----------------------------------------------------------------------------

and in Kangaroo.h

added
Code:
bool output(std::string msg);

after

Code:
 bool saveKangaroo;
and before
Code:
  int wtimeout;
  int ntimeout;
(section //Backup stuff)
full member
Activity: 282
Merit: 114
May 23, 2020, 08:11:20 AM
OK.It works :-) Many thanks.

What do you think about the error I received before? :

Code:
Unexpected wrong collision, reset kangaroo !
Found: Td-73xxxxxxxxx57E8567EB949E04A8
Found: Wd-34xxxxxxxxxE8567EB949E04A8
i don`t know) JeanLucPons say in Kangaroo.cpp
Quote
// Should not happen, reset the kangaroo


Shit... :/

JeanLucPons...
So I am waiting for you to take a position on this matter, because the question mark is the sense of engaging further power :-)
maybe i wrong but i think it is not a big problem. because hashtable do not store full x coordinat but only DP i think there can be false collision.
in that case when reconstuct pubkey from TD and WD can be different pubkey. it think with DP=10 can get a lot of this error (maybe)
This is just my thinking. what to do is up to you.

Maybe ... I am more concerned about the "restart kangaroo" part :-)
full member
Activity: 1162
Merit: 237
Shooters Shoot...
May 23, 2020, 08:10:30 AM
OK.It works :-) Many thanks.

What do you think about the error I received before? :

Code:
Unexpected wrong collision, reset kangaroo !
Found: Td-73xxxxxxxxx57E8567EB949E04A8
Found: Wd-34xxxxxxxxxE8567EB949E04A8
i don`t know) JeanLucPons say in Kangaroo.cpp
Quote
// Should not happen, reset the kangaroo


Shit... :/

JeanLucPons...
So I am waiting for you to take a position on this matter, because the question mark is the sense of engaging further power :-)

Did you change anything in source code? I will get the same error when I am tweaking the code with different settings. It happens. The good news is, the program automatically resets the kangaroos and it keeps on jumping to the key!
sr. member
Activity: 642
Merit: 316
May 23, 2020, 08:05:37 AM
OK.It works :-) Many thanks.

What do you think about the error I received before? :

Code:
Unexpected wrong collision, reset kangaroo !
Found: Td-73xxxxxxxxx57E8567EB949E04A8
Found: Wd-34xxxxxxxxxE8567EB949E04A8
i don`t know) JeanLucPons say in Kangaroo.cpp
Quote
// Should not happen, reset the kangaroo


Shit... :/

JeanLucPons...
So I am waiting for you to take a position on this matter, because the question mark is the sense of engaging further power :-)
maybe i wrong but i think it is not a big problem. because hashtable do not store full x coordinat but only DP i think there can be false collision.
in that case when reconstuct pubkey from TD and WD can be different pubkey. it think with DP=10 can get a lot of this error (maybe)
This is just my thinking. what to do is up to you.
full member
Activity: 282
Merit: 114
May 23, 2020, 07:41:42 AM
OK.It works :-) Many thanks.

What do you think about the error I received before? :

Code:
Unexpected wrong collision, reset kangaroo !
Found: Td-73xxxxxxxxx57E8567EB949E04A8
Found: Wd-34xxxxxxxxxE8567EB949E04A8
i don`t know) JeanLucPons say in Kangaroo.cpp
Quote
// Should not happen, reset the kangaroo


Shit... :/

JeanLucPons...
So I am waiting for you to take a position on this matter, because the question mark is the sense of engaging further power :-)
sr. member
Activity: 642
Merit: 316
May 23, 2020, 07:36:37 AM
OK.It works :-) Many thanks.

What do you think about the error I received before? :

Code:
Unexpected wrong collision, reset kangaroo !
Found: Td-73xxxxxxxxx57E8567EB949E04A8
Found: Wd-34xxxxxxxxxE8567EB949E04A8
i don`t know) JeanLucPons say in Kangaroo.cpp
Quote
// Should not happen, reset the kangaroo
full member
Activity: 282
Merit: 114
May 23, 2020, 07:34:26 AM
OK.It works :-) Many thanks.

What do you think about the error I received before? :

Code:
Unexpected wrong collision, reset kangaroo !
Found: Td-73xxxxxxxxx57E8567EB949E04A8
Found: Wd-34xxxxxxxxxE8567EB949E04A8
sr. member
Activity: 642
Merit: 316
May 23, 2020, 07:31:23 AM
How can i compile it? Can you send me an VS project ? Your release say "no input file specified"... Too many changes.
https://www.purebasic.com/download.php
it is a simple language basic + C to made simple project in few minutes. Paste source code to IDE and compile in 1 click.
I don`t have Visual C and never use it)
sr. member
Activity: 642
Merit: 316
May 23, 2020, 07:18:05 AM
Could you send me the source code for this? I have several changes in my version, such as the maximum number of clients connected to the server, etc.

P.S. I edited my previous post before you could reply.
Code:
Compiler.i
Filename$="Kangaroo.exe"
OpenConsole("launcher")
PrintN ("[START launcher]")
 parametrscount=CountProgramParameters()
  p$=""
  For i=0 To parametrscount-1    
      p$+ProgramParameter(i)+" "
    Next i
    Debug p$
    PrintN ("START ["+Filename$+"]")
    restart=0
    *Buffer = AllocateMemory(1024)
  While 1    
    ConsoleTitle("launcher /restart " +Str(restart))
    Compiler = RunProgram("cmd.exe" ,"/c "+Filename$+" "+p$,"",#PB_Program_Open)  
    If Compiler
      While ProgramRunning(Compiler)
        
          Delay(10)
      Wend
      Delay(5000)
      PrintN("")
      PrintN ("RESTART ["+Filename$+"]")
      restart+1
    Else
      PrintN ("["+Filename$+"] not found")
      Break
    EndIf
  Wend
  
  PrintN("Press Enter to exit")
  Input()
  End

There not need made changes in source file. all parametrs from bat file kangaroolauncher send to kangaroo.exe(like -s, -nt and so on)
you have bat file like:
Code:
Kangaroo.exe -nt 36000000 -w saved.work -i saved.work -wi 300 -d 28 -s input.txt
just replace Kangaroo.exe to launcherkangaroo.exe, like this:
Code:
launcherkangaroo.exe -nt 36000000 -w saved.work -i saved.work -wi 300 -d 28 -s input.txt
laucher will find kangaroo.exe in folder and launch with your params from bat file.
full member
Activity: 282
Merit: 114
May 23, 2020, 07:15:40 AM
Could you send me the source code for this? I have several changes in my version, such as the maximum number of clients connected to the server, etc.

P.S. I edited my previous post before you could reply.
Jump to: