bakd247 / ecdsaKeyFinder

A Python based ECDSA secp256k1 private key recovery tool
https://hashadder.com/
28 stars 6 forks source link

question #9

Closed sssergy closed 10 months ago

sssergy commented 10 months ago

privKey = (int((((urandom(32))[2:])).hex(), 16))%N This string generates a decimal number that converts to a hexadecimal value that is 60 characters long, but the private key is 64 characters long. Is this intended or is it a bug?

bakd247 commented 10 months ago

no it does not...it generates a 256 bit integer in the format of a byte array(32 bytes = 256 bits) it generates a 256 bit integer....thats why it says "int" as the first command

sssergy commented 10 months ago

python3 test.py Creating Collision List...Please Wait... Collision List Created... Creating Lookup Table... Rows: 100%|####################################################| 16/16 [01:20<00:00, 5.03s/Columns] Lookup table Created...Searching for Your Key...Please Wait.... Total Key Comparisons per Round: 19998 Decimal representation: 519461365442158794802523203488793720383258504440764975167049974645098589 Hexadecimal representation: 0x4b43e4963c84320cac4cf4a6bec8be004d6ec17a6726ae9a65b001d1885d Average Key Strings Compared Per Second 2932.0 Average Seconds per Round 6.818847861999998 Decimal representation: 463176009855381756428090442110832345719044906253039144296457954450312179 Hexadecimal representation: 0x431c272e06e15e08603a6aed27072d0e1ba392e31eff3a10217199798bf3 Average Key Strings Compared Per Second 2954.0 Average Seconds per Round 6.769780071999989 Decimal representation: 833797828775114606806740598450599457673752718504742069886088303583694161 Hexadecimal representation: 0x78cf47c4f77fa7675514843bff3c88c4a0fe7c05846b8df623ab18700d51 Average Key Strings Compared Per Second 3096.0 Average Seconds per Round 6.457908307000011 Decimal representation: 335867535793656339193123359093727325523272579548197628416470251881181511 Hexadecimal representation: 0x30aa04f0922654742f4bbfc0c05db792d36f82325b2aee1fc9071d553147

The generated value always consists of 60 characters in hex format

    privKey = int(urandom(32).hex(), 16)%N      #(int((((urandom(32))[2:])).hex(), 16))%N
    print("Decimal representation:", privKey)
    print("Hexadecimal representation:", hex(privKey))

Shouldn't it be like this?