logoalt Hacker News

zapkyeskrill • yesterday at 2:41 PM • 2 replies • view on HN

Pardon my ignorance but, how do I reduce (your unknown private key) if I don't know what (your private unknown key) is?


Replies

cowlevel • yesterday at 6:25 PM

It's actually increase. The cryptography works because make_publickey(privatekey1+privatekey2) == make_publickey(privatekey1)+make_publickey(privatekey2) (for a weird definition of +) (make_publickey henceforth abbreviated to mpk)

ECC math is pretty much just numbers, but the numbers are jumbled up so all you can do is add (and subtract, I think), you can't multiply or divide. (You can multiply a jumbled number by an actual number like 10, because that's just adding 10 times, but you can't multiply two jumbled numbers) The private keys are actual numbers so you can do whatever you want, the public keys are the equivalent jumbled numbers.

You work out mpk(1000),mpk(2000),mpk(3000),... in advance. You start with someones public key and add mpk(1) repeatedly 1000 times and if it ever matches any of the ones you just computed, then you know the private key. For example if their_publickey+mpk(234) == mpk(2000) then their_publickey == mpk(1766) and since their_publickey==make_publickey(their_privatekey), obviously their_privatekey==1766.

pas • yesterday at 5:09 PM

that means you can do the attempts by an an increment of 10. (reduce applies to the number of "attempts before you get in")

phrased in a different way: you can do the steps by [10] instead of one by one (if you keep a list of what the key could be for 0 to 9)

the algorithm works by decomposing the [unknown private key] that we want to find into a "remainder" (which you get after dividing by the "giant step" number, in the example 10, but it can be 100, or square root of the number of elements in the cyclic group used for a given key exchange) and a multiplier of how many times the "giant step" number divides the key.

https://en.wikipedia.org/wiki/Baby-step_giant-step

➕ show 1 reply