Pages:
Author

Topic: OFF TOPIC - page 3. (Read 1625 times)

sr. member
Activity: 1428
Merit: 275
BitByte Crypto: https://link3.to/bitbytecrypto
May 03, 2020, 02:15:33 PM
#11
Wait a minute, so are you guys suggesting that you can actually calculate or deduce the private keys of someone by just looking at the public key? I'm lost maybe a bit of clarification would help. Or I am not getting that the OP is trying to say.
No that's not actually going to happen. Because this is just one integer public key, but in reality there are more integer in your private key. No scripts can deduce the private keys of someone. Even if anyone wants to do this, he/she needs a quantum computer with a minimum of 1000 qubits to expose any private key from any algorithm. In this current time, only IBM has 50 qubits of a quantum computer and Google (cooperating with NASA) has 53 qubits of quantum computer. Thought D-wave have 2000 qubits of quantum computer, but that's used only for optimization not for general purpose. So, it's will take more time to break bitcoin or other crypto-currencies private key. Also by the time passed, there will be a solution for it too.  Cheesy
sr. member
Activity: 1274
Merit: 260
1A6nybMUHYKS6E6Z3eJFm4KpVDdev8BAJL
May 03, 2020, 01:07:21 PM
#10
Wait a minute, so are you guys suggesting that you can actually calculate or deduce the private keys of someone by just looking at the public key? I'm lost maybe a bit of clarification would help. Or I am not getting that the OP is trying to say.
sr. member
Activity: 443
Merit: 350
May 03, 2020, 10:28:34 AM
#9
-snip-
I have a question.
If the private key is 3 ... do I need to change the formula this way?
R = P+P+P
c = 4*P.x*Px*invert(3*P.y) % modulo
R.x = (c*c - 3*P.x) % modulo

No, formula is ALWAYS the same. That was a formula for double the point:
c = 3*P.x*Px*invert(2*P.y) % modulo
R.x = (c*c - 2*P.x) % modulo
R.y = (c*(P.x - R.x) - P.y) % modulo

If you want to add 2 points P and Q (2 different non-zero Points) there is another formula for R = P + Q:
dx = (Q.x - P.x) % modulo
dy = (Q.y - P.y) % modulo
c = dy * invert(dx) % modulo
R.x = (c*c - P.x - Q.x) % modulo
R.y = (c*(P.x - R.x) - P.y) % modulo

For addition it does not matter if you make P + Q or Q + P, teh result will be the same.

Also, keep in mind that in elliptic curve scalar addition there are only scalar addition and scalar doubling are determined. No, direct multiplication, or no direct substraction, etc. For multiplication, the factor is splited in order to make only doublings and additions.

So, for private key = 3 you have: 3=2+1, and the public key will be 3G = 2G + 1G = doubled G + G, so first of all you should double G and receive 2G (1st formula), and then make the addition of 2 points 2G and G (2dn formula) and finally you will have 3G or pubblic key for pk = 3.

The same for every number. For example, if you want to find the public key for 13, you should present it in this form: 13 = 8 + 4 + 1 = 2^3 + 2^2 + 1, and now calculate public key for every part (for 2^2 it is doubling G, and then doubling te received result again; for 2^3 it is the dubling G 3 times, anf for 1 it is just G); as soon as you have all 3 public keys you should use addition formula 2 times: add 2^3 and 2^2 and then add the received result with G. Finally you will have the public key for pk = 13

Actully all the scripts do the same work: doubling points and adding them, nothing else. Only doubling and addition.

Good luck with manual calcualtions  Shocked

member
Activity: 109
Merit: 13
A positive attitude changes everything *_*
May 03, 2020, 09:58:48 AM
#8
You can read this book, Mastering Bitcoin, of Andreas M. Antonopoulos, and the chapter 4 is what you need

Chapter 4: https://github.com/bitcoinbook/bitcoinbook/blob/develop/ch04.asciidoc
I read. Very interesting! Thanks, but I still have questions
member
Activity: 109
Merit: 13
A positive attitude changes everything *_*
May 03, 2020, 09:53:33 AM
#7
-snip-
Thanks for the answer. I will correct my question.
I just wanted to understand the G + G2 point duplication part ... The public key of 2,
X =0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798.
But for me:
X = 02f37cccfdf3b97758ab40c52b9d0e160e0537f9b65b9c51b2b3e502b62df02f30

If you want to doule point P in order to receive R = P + P, you should make the following:

c = 3*P.x*Px*invert(2*P.y) % modulo
R.x = (c*c - 2*P.x) % modulo
R.y = (c*(P.x - R.x) - P.y) % modulo

modulo = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFC2F

For your case with P = G = Point (Gx, Gy) where:
Gx = 0x79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798
Gy = 0x483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8

We have the following:
invert(2*P.y) = 0xb7e31a064ed74d314de79011c5f0a46ac155602353dc3d340fbeaeec9767a6a6
c = 0xcb35b28428101a303eb9d1235992ac63f58857c2f631ee6936d3aebbeddcd1b1
R.x = (c*c - 2*Gx) % modulo = 0xc6047f9441ed7d6d3045406e95c07cd85c778e4b8cef3ca7abac09b95c709ee5
R.y = 0x1ae168fea63dc339a3c58419466ceaeef7f632653266d0e1236431a950cfe52a

So we have R.x and R.y of the public key 2G = G + G (public key for private key = 2), and it is written in compressed format like:
02c6047f9441ed7d6d3045406e95c07cd85c778e4b8cef3ca7abac09b95c709ee5
I have a question.
If the private key is 3 ... do I need to change the formula this way?
R = P+P+P
c = 4*P.x*Px*invert(3*P.y) % modulo
R.x = (c*c - 3*P.x) % modulo
hero member
Activity: 2366
Merit: 838
May 02, 2020, 10:10:40 PM
#6
You can read this book, Mastering Bitcoin, of Andreas M. Antonopoulos, and the chapter 4 is what you need

Chapter 4: https://github.com/bitcoinbook/bitcoinbook/blob/develop/ch04.asciidoc
member
Activity: 109
Merit: 13
A positive attitude changes everything *_*
May 02, 2020, 08:29:58 PM
#5
I thank you very much!
I'm trying here, I would like to do and understand without scripts or programs. I want to learn manually. I am open to further explanation. Thank MrFreeDragon
sr. member
Activity: 443
Merit: 350
May 02, 2020, 08:17:26 PM
#4
-snip-
Thanks for the answer. I will correct my question.
I just wanted to understand the G + G2 point duplication part ... The public key of 2,
X =0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798.
But for me:
X = 02f37cccfdf3b97758ab40c52b9d0e160e0537f9b65b9c51b2b3e502b62df02f30

If you want to doule point P in order to receive R = P + P, you should make the following:

c = 3*P.x*Px*invert(2*P.y) % modulo
R.x = (c*c - 2*P.x) % modulo
R.y = (c*(P.x - R.x) - P.y) % modulo

modulo = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFC2F

For your case with P = G = Point (Gx, Gy) where:
Gx = 0x79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798
Gy = 0x483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8

We have the following:
invert(2*P.y) = 0xb7e31a064ed74d314de79011c5f0a46ac155602353dc3d340fbeaeec9767a6a6
c = 0xcb35b28428101a303eb9d1235992ac63f58857c2f631ee6936d3aebbeddcd1b1
R.x = (c*c - 2*Gx) % modulo = 0xc6047f9441ed7d6d3045406e95c07cd85c778e4b8cef3ca7abac09b95c709ee5
R.y = 0x1ae168fea63dc339a3c58419466ceaeef7f632653266d0e1236431a950cfe52a

So we have R.x and R.y of the public key 2G = G + G (public key for private key = 2), and it is written in compressed format like:
02c6047f9441ed7d6d3045406e95c07cd85c778e4b8cef3ca7abac09b95c709ee5
member
Activity: 109
Merit: 13
A positive attitude changes everything *_*
May 02, 2020, 07:43:48 PM
#3
I'm doing this:

Private key 2:

G2 * 79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798

Public key compressed: X = 02F37CCCFDF3B97758AB40C52B9D0E160E0537F9B65B9C51B2B3E502B62DF02F30

I'm really sad ... I'm trying to learn and the moderator deleted my previous post ... Disappointed! Thanks MrFreeDragon for the explanation


sr. member
Activity: 443
Merit: 350
May 02, 2020, 07:29:46 PM
#2
It does not work in this way.

Keep in mind main thing: private key is a number (just integer), but public key is a point with x and y coordinates.
So you in your example public key was not correct for private key 1.

For private key 1 the public key is:
0479be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8

where 04 is a prefix for uncompressed key, green part is X-coordinate and blue part is Y-coordinate.

The compressed key contains only X coordinate with the prefix 02/03 (02 for Y even, and 03 for Y odd), because Y could be received from the formula y^2 = x^3 + 7, so no need to keep Y.
The compressed key so will be:
0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798

In your example you wrote only X coordinate for public key, it was not correct. Prefix 02 should also be there in order to know both coordinates.

Also, you should know that there is a basis point which was determined for elliptic curve selected for bitcoin. Basis point is usually written as G, and has coordinates:

Gx = 0x79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798
Gy = 0x483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8

Now the public key for every pk is pk*G, so for 1 public key 1*G - actually the G basis point itself.

For pk=2 the public key is 2*G = G + G, so you should perform scalar addition for basis point with itself (you should use point doubling).
For pk=3 you just add the publik key for pk=2 with basis point G
And so on

For more details have a look at parrt 4 of this reading:
https://pdfslide.net/documents/introduction-to-bitcoin-and-ecdsa.html
member
Activity: 109
Merit: 13
A positive attitude changes everything *_*
May 02, 2020, 06:37:49 PM
#1
HELLO PEOPLE!
I would like a good explanation of how public keys are generated.
EQUATION OR FORMULA

y^2 = x^3 + 7
P = k * G
X = c^2 – 2px
Y = c (px – rx) – py

Private key: 1
Public key compressed : X = 0279BE667EF9DCBBAC55A06295CE870B07029BFCDB2DCE28D959F2815B16F81798

So it should be ...

Private key: 2
Public key compressed: X =02F37CCCFDF3B97758AB40C52B9D0E160E0537F9B65B9C51B2B3E502B62DF02F30

Why public key compressed of 2 is: X = 02C6047F9441ED7D6D3045406E95C07CD85C778E4B8CEF3CA7ABAC09B95C709EE5?



Pages:
Jump to: