Author

Topic: Multiplication number to get half public key "Magic Number" (Read 138 times)

copper member
Activity: 1330
Merit: 899
🖤😏
Dividing public keys is not the same as subtracting, actually if you don't know what you are doing, you'd end up in 2**255 + ranges, for instance if you divide the public key of 11 or 0xb by 2, you'd end up with n/2+5. Or 5.5 and that would be half of 1(n) +5. Whatever number you are dividing, if it's odd and if you are dividing by 2, 3, 4 up to 9, you can get the correct result, here is how:

13/3 = 4.33
1/3 = 0.33
0.33 - 4.33 = 4

What you are asking is simple math really, in order to reach 1 from 22, you will have to subtract 1, 21 times from 22.

The thing is, what are you trying to do exactly? If we know what the goal is, it'd be easier to assist. 😉
jr. member
Activity: 53
Merit: 11
OK seems like i still don´t understand, how you change the range with only have a pubkey.
I read and read but don´t understand it, if i have a a pubkey and wanna reduce the range, it will come to a point where the dez value is odd and the whole thing go in a "never ending" story.

But i know there is a way, because you all talk about it in different posts. Maybe somebody explain it, in one easy to understand way.
jr. member
Activity: 53
Merit: 11
Quote
Multiply by this to have your public key divided by 2, 4, 8:
Code:
Target/2 = 7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a1
Target/4 =
3fffffffffffffffffffffffffffffffaeabb739abd2280eeff497a3340d9051
Target/8 =
1fffffffffffffffffffffffffffffffd755db9cd5e9140777fa4bd19a06c828



Here is a script made by @mc,

Code:
import bitcoin



target= "03774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb"



Start_Range= 2

end_Range= 33

for i in range(Start_Range, end_Range):

    Div = bitcoin.divide(target, i)
    print(f"{i}- {(str(Div))}")


The script above will divide the target by 2, 3, 4, 5, ..., 32. You can set any range you want.

Ok great but lets say i take the public key of 11 = 03774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb

i get on 11 the pubkey of 1 and on 22 the "i call it ground" but what are the pubkeys between ?

It´s like i take it and do my public key and subtract 1 ! till i get a target pubkey lets say 0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798,

whould be way faster with secp256k1 as ice, or do i miss something.
hero member
Activity: 667
Merit: 1529
Quote
This may work if the number is even, but not if the number is odd. Or am i wrong?!
It works for every number, because it is "modulo n-value".
Code:
+---+------------------------------------------------------------------+
| a | a/2                                                              |
+---+------------------------------------------------------------------+
| 1 | 7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a1 |
| 2 |                                                                1 |
| 3 | 7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a2 |
| 4 |                                                                2 |
| 5 | 7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a3 |
| 6 |                                                                3 |
| 7 | 7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a4 |
| 8 |                                                                4 |
| 9 | 7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a5 |
+---+------------------------------------------------------------------+
See? There is always a match. And you can check, that it works, because if you take 7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a1, and multiply it by two, then you will get fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364142, which modulo fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141 gives you one. And the same is true in other cases.
jr. member
Activity: 53
Merit: 11
This may work if the number is even, but not if the number is odd. Or am i wrong?!
jr. member
Activity: 53
Merit: 11
Thx but another member send me a dm with the number it´s 57896044618658097711785492504343953926418782139537452191302581570759080747169
jr. member
Activity: 53
Merit: 11
Hi i have read long ago, there is a number that can be used for multiply a pubkey, to get the half of it.

Maybe somebody can help me, or know the number.
Jump to: