Bitcoin Forum
May 05, 2024, 10:55:57 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: [1]
1  Bitcoin / Development & Technical Discussion / Weird ECC calculations on: January 18, 2018, 11:30:51 AM
Hello,

I'm learning about bitcoin and while i was testing addresses generation i ran into weird things.

Code:
If we generate a 256bits private key k and generate corresponding public key Q.
We could split k in k1 (first 128 bits) and k2 (last 128bits)
Then we generate a set with all 128bits private key and their corresponding public keys.
So, in theory, for each public key in the set:
    we multiply the public key by 2^128
    then, we substract Q to the result
    we test if we have the result in the set
    if yes, we have found k

But what is weird is i always found one approximation of k and not the true k.

Here is a link to the experience in python if i'm not clear enough : https://github.com/mvrcrypto/bitp0wn/blob/master/substract_optim.py

EDIT: Okay, i now have one and only one k and i can retrieve the good one. You can get the programm at the address below.
Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!