Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Substart startRange bug. #16

Open
hskun opened this issue Nov 5, 2021 · 1 comment
Open

Substart startRange bug. #16

hskun opened this issue Nov 5, 2021 · 1 comment

Comments

@hskun
Copy link

hskun commented Nov 5, 2021

JLP use a Substart startRange to the point to solve.

  Int km(&ph->startKey);
  km.Neg();
  km.Add(&secp->order);
  km.Sub((uint64_t)(CPU_GRP_SIZE/2)*bsSize);
  startP = secp->ComputePublicKey(&km);
  startP = secp->AddDirect(keyToSearch,startP);

This is the bug. startP is a neg point.
the sub result maybe 0.
however 0 key is secp256k1 is infinity(unaviable).
I have a test input file:

400
0
FFFFFFF
02A804C641D28CC0B53A4E3E1A2F56C86F6E0D880A454203B98CD3DB5A7940D33A #0x80000

According to the code.

Int km(&ph->startKey); #0
km.Neg(); #0
km.Add(&secp->order); #0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141
km.Sub((uint64_t)(CPU_GRP_SIZE/2)*bsSize); #0x80000
startP = secp->ComputePublicKey(&km); # (A804C641D28CC0B53A4E3E1A2F56C86F6E0D880A454203B98CD3DB5A7940D33A,6A417CDAD4D0592FC213D7BD3E9FB817E50E73576308C956BC316A0492B965B5)
startP = secp->AddDirect(keyToSearch,startP); #JLP show the result is 0xAFF6737C5AE67E958B6383CBA1526F2123E4EFEB757BF88CE65849490D7E51EA(wrong)
@albertobsd
Copy link

I solve this bug in my keyhunt tool adding a Point comparation if the original startKey (Computed as a public key or point ) is equals to the current searched point it show the key found , in other case it continue with the current algorithm.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants