Ask Your Question
0

How to find a element in elliptic curve ?(code added)

asked 2020-08-20 03:20:52 +0200

Duglas gravatar image

updated 2021-01-06 03:14:19 +0200

dan_fulea gravatar image

$Q=G*x$

$Q_2=G_2*y$

$G_2 = Q[n]=G[t]$

$Q=Q2$

$Q$, $G$, $G_2$ are points on elliptic curve.

$x$, $y$ are big integers.

$Q$, $Q_2$, $G$, $G_2$, $y$ are known.

How to find x ?

P.s. help me please. I'm very need help.


Pastebin code copy(more usefull) https://pastebin.com/C2vgKCJ0


CODE:

p = 2 * * 256 - 2 * * 32 - 2 * * 9 - 2^8 - 2^7 - 2^6 - 2^4 - 1

a = 0x0000000000000000000000000000000000000000000000000000000000000000

b = 0x0000000000000000000000000000000000000000000000000000000000000007

F = GF(p)
eccurve = EllipticCurve(F,[a, b])
curve = eccurve
ord = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141

Gx = 0x79BE667EF9DCBBAC55A06295CE870B07029BFCDB2DCE28D959F2815B16F81798

Gy = 0x483ADA7726A3C4655DA4FBFC0E1108A8FD17B448A68554199C47D08FFB10D4B8

G = curve(Gx,Gy,1)
# This is a setion with data about Q !!! 
# We are not calculating Q and we need find  x and calculate Qz=x*G=Q. 
# We are know Q,G but don't know x !!! 

Q = curve(0x8b05b0603abd75b0c57489e451f811e1afe54a8715045cdf4888333f3ebc6e8b,
        0x1d10f88145db40fb889e2ddce81bda7c27f5b615acd6179dbb30f4fe7f40fb39)

print(Q)

R = Zmod(ord)

####end of section
# this section calculated G2,y and Q = G2*y
x0 = R(0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF)
y = 1/x0

G2 = ZZ( y ) * Q

Q2 = ZZ(x0) * G2

# End of section

# This section after x was find. Find  x and paste to this code:

# x = ....

# Qresult=ZZ (x) * G
# print("Q==Qresult'", Q == Qresult)
# # end of section

print("Q==Q2'", Q2 == Q)

print("Q",Q)

print("Q2",Q2)

print("y",y)

print("G",G)

print("G2",G2)

edit retag flag offensive close merge delete

Comments

Could you please provide the code to construct Q, G, G_2, y ?

tmonteil gravatar imagetmonteil ( 2020-08-20 10:56:22 +0200 )edit

I will provide code for construct Q, G, G_2, y shortly. Thank you for your answer Tmonteil !!!Tmonteil I hope for your future help. Br !

Duglas gravatar imageDuglas ( 2020-08-20 14:19:19 +0200 )edit

HELP ME PLLEEEEASE FIND X ???? PLEEEASSSEE

Duglas gravatar imageDuglas ( 2020-08-21 00:08:01 +0200 )edit

HELP ME PLEASE ???

Duglas gravatar imageDuglas ( 2020-08-21 17:28:05 +0200 )edit

Please format sage / python code as code. For this, just indent all the code in some editor with 4 spaces or copy+paste it here, mark it, and while having it marked hit that button with the 101 and 010 on it. As it is, the question is not readable. It would be also a good idea to describe the objects you have first, then the "needed $x$" with given properties. Could you please edit the question to have a readable text?

dan_fulea gravatar imagedan_fulea ( 2020-08-25 01:00:38 +0200 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2021-01-06 06:16:58 +0200

tmonteil gravatar image

updated 2021-01-06 06:17:24 +0200

What you are looking for is the discrete logarithm:

sage: x = G.discrete_log(Q) ; x
1155

sage: Q == G * x
True
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2020-08-20 03:20:52 +0200

Seen: 471 times

Last updated: Jan 06 '21