0

Private key x = pubkey B

(x (+ or -) 1) = pubkey A, C

I only know the public keys A and C

I am looking for a way to know if the public key sequence is A B C or C B A

B = 0xa5e42a634fa42f4f22c756429a06fd104a12a0c3a61ae4b738b1716913c82732

A = 0xb616c736dd3d768e2e7b30b6e71caa3cd58359127af62bc633716eb2e782cca4

C = 0xc357ffa5f463c7a2b0ba760ceef0c7a7ae77042cae93788ce39a797693e0cc64

I don't know the private key of x value.

The public key corresponding to x is B

Input: B

Output x (+1) = A or C

  • Is your question this: given three public keys A B C, which you know correspond to private keys (x-1), x, (x+1), but not in which order, can you figure out which is which? – Pieter Wuille Apr 20 '20 at 0:46
  • I don't understand your sentence. You do or do you not know the interval between them? And do you or do you not know that interval is fixed? For example, if I gave you (x - 377, x, x + 19) do you still need this to work? – Pieter Wuille Apr 20 '20 at 0:54
  • Yes you can test me. You can immediately know the public key value you are curious about.Please tell me the public key that only you know And from the public key value you know, I can tell you the +-public key value. – gpcam Apr 20 '20 at 1:00
  • I have no idea what you're asking. Please answer my question. – Pieter Wuille Apr 20 '20 at 1:00
  • i can see (x-377, x, x + 19) – gpcam Apr 20 '20 at 1:04
0

Yes, you can.

Public keys for a given private key correspond to elliptic curve multiplication with the generator G.

So we know that B = xG and either A=(x-1)g or A=(x+1)G. This can be written as A=xG-G=B-G or A=xG+G=B+G.

So it suffices to check whether A equals B-G or B+G respectively.

  • Thanks for the answer. I really spent a lot of time figuring this out in Python. Can I write in Python I will pay for it. – gpcam Apr 20 '20 at 1:28
  • I am referring to the case when the G value is unknown. – gpcam Apr 20 '20 at 1:36
  • G is a fixed constant. It has X coordinate 0x79BE667EF9DCBBAC55A06295CE870B07029BFCDB2DCE28D959F2815B16F81798 and even Y. – Pieter Wuille Apr 20 '20 at 1:44
  • I have difficulty. If (x, y) is substituted, it is A, B, C, but when it is (x, -y), the order of C, B, A is changed. I want to know the order when i don't know if y is -y. – gpcam Apr 20 '20 at 2:28
  • No that isn't the case. It doesn't matter what you substitute for B. Sorry, I don't have time to discuss this privately. – Pieter Wuille Apr 20 '20 at 2:34
0

The order of the public keys is known, but it exists symmetrically. Example) Private key 20 public key +1 = 21 20-1 = 19

Private key -20, public key +1 = -19 -1 = -18

P = 0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f a = generators.main(1) b = 0x352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5,P -0x321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c

c = lib1.sub(b,a) d = lib1.add(b,a) print(("0x%x,0x%x") % b,("\n0x%x,0x%x")% c,("\n0x%x,0x%x" % d)) if d == lib1.add(b,a) : print(("0x%x,0x%x" % b),"보다 ",("\n0x%x,0x%x" % d),"이 더 크다")

d1 = lib1.sub(d,b) print(("0x%x,0x%x" % d1)) print("====================================") print("")

output 0x421f5fc9a21065445c96fdb91c0c1e2f2431741c72713b4b99ddcb316f31e9fc,0xd46f0e92ee254249e9092481dda2e1eb8bcfcb4c84ddceea24df8e842e3294ae 0x4ce119c96e2fa357200b559b2f7dd5a5f02d5290aff74b03f3e471b273211c97,0xed45d9234ef13e9da259e05ef57bb3989e9d6b7d8e269698bafd77106dcc1ff5 0x352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5,0xcde14bf8acb70acb2a63e7da6225c1e0b5e4c4d18e4efc639842c273307e62a3 보다
0x4ce119c96e2fa357200b559b2f7dd5a5f02d5290aff74b03f3e471b273211c97,0xed45d9234ef13e9da259e05ef57bb3989e9d6b7d8e269698bafd77106dcc1ff5 이 더 크다 0x79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798,0x483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.