ECSearch is a procedure that searches for a point on a given elliptic curve with first coordinate between "lowerbound" and "upperbound". The lowerbound and the upperbound are positive random numbers.
EXAMPLE: Find a point on the elliptic curve such that the first coordinate of the point is between (234,789).
[236, 1131]
[346, 749]
ECAdd is a procedure that computes the sum of two points on a given elliptic curve using the elliptic curve operation.
EXAMPLE: Find the sum of the points (236, 1131) and (346, 749) on the elliptic curve .
Error in lines 1-1
Traceback (most recent call last):
File "/cocalc/lib/python3.10/site-packages/smc_sagews/sage_server.py", line 1244, in execute
exec(
File "", line 1, in <module>
NameError: name 'ECAdd' is not defined
ECDouble is a procedure that computes the sum of a point to itself on a given elliptic curve using the elliptic curve operation.
EXAMPLE: Find the sum of the point (6,9) to itself i.e. on the curve .
[2, 8]
ECInverse is a procedure that finds the inverse of a point on a given elliptic curve using the elliptic curve operation.
EXAMPLE:
Find an inverse of the point (6,9) on the curve .
Error in lines 1-1
Traceback (most recent call last):
File "/cocalc/lib/python3.10/site-packages/smc_sagews/sage_server.py", line 1244, in execute
exec(
File "", line 1, in <module>
NameError: name 'ECInverse' is not defined
ECTimes is a procedure that adds a point k-times (scalar) to itself for a given elliptic curve using the elliptic curve operation.
EXAMPLE:
Add the point (6,9) to itself 1234 times on the curve .
[2, 5]
The procedure findptOrder computes order of an elliptic curve point P. The command for computing order of an elliptic curve group E in SageMath is E.order( ) or E.cardinality( ).
Hellman - Pohlig - Silver Attack for Solving DLP in Elliptic Curves
Strategy For Generating a Key Resistant Against Hellman Pohlig Silver Attack
STEP 1.
Use deconstruct43 or dconstruct32 to generate a prime number p with p mod 4= 3 or p mod 3=2.
Prime number p= 867829725928160785585279509401890821012630043702216201959234949801482799016139202987548976052812063
p + 1= 2^5 * 7 * 3874239847893574935648569238401298308092098409384893758746584597328048209893478584765843643092911
STEP 2.
Generate an elliptic curve over the field of prime order defined in STEP 1.
The eliptic curve group is [387468734627, 0, 867829725928160785585279509401890821012630043702216201959234949801482799016139202987548976052812063]
The factorization of the elliptic curve order is
2^5 * 7 * 3874239847893574935648569238401298308092098409384893758746584597328048209893478584765843643092911
STEP 3.
Generate a point on the elliptic curve group such that the factorization of the point order contains the largest prime factor of the elliptic group order generated in STEP 2.
The elliptic curve point is [2, 135152431609326694924981469320792005678635933446762766073401432337425622094946893492512392099836798]
The factorization of the point order is 2^4 * 3874239847893574935648569238401298308092098409384893758746584597328048209893478584765843643092911
STEP 3.
Use the Chinese Remainder Theorem (CRT) to generate the private key. The number of coefficients chosen for the CRT is the same as the number of factors of the point order.
The private key x= 58113597718403624034728538576019474621381476140773406381198768959920723148402178771487654646393664
REMARK.
Note that modulo the largest prime factor of point order is a large number. This implies that the private key generated in STEP 3 is resistant again Hellman Pohlig Silver attack.
Error in lines 1-1
Traceback (most recent call last):
File "sage/symbolic/expression.pyx", line 1513, in sage.symbolic.expression.Expression._integer_
n = self.pyobject()
File "sage/symbolic/expression.pyx", line 774, in sage.symbolic.expression.Expression.pyobject
raise TypeError("self must be a numeric expression")
TypeError: self must be a numeric expression
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "sage/rings/finite_rings/integer_mod.pyx", line 380, in sage.rings.finite_rings.integer_mod.IntegerMod_abstract.__init__
z = integer_ring.Z(value)
File "sage/structure/parent.pyx", line 897, in sage.structure.parent.Parent.__call__
return mor._call_(x)
File "sage/structure/coerce_maps.pyx", line 287, in sage.structure.coerce_maps.NamedConvertMap._call_
cdef Element e = method(C)
File "sage/symbolic/expression.pyx", line 1515, in sage.symbolic.expression.Expression._integer_
raise TypeError("unable to convert %r to an integer" % self)
TypeError: unable to convert x to an integer
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/cocalc/lib/python3.10/site-packages/smc_sagews/sage_server.py", line 1244, in execute
exec(
File "", line 1, in <module>
File "sage/rings/finite_rings/integer_mod.pyx", line 156, in sage.rings.finite_rings.integer_mod.Mod
return IntegerMod(parent, n)
File "sage/rings/finite_rings/integer_mod.pyx", line 201, in sage.rings.finite_rings.integer_mod.IntegerMod
return t(parent, value)
File "sage/rings/finite_rings/integer_mod.pyx", line 384, in sage.rings.finite_rings.integer_mod.IntegerMod_abstract.__init__
value = value.pyobject()
File "sage/symbolic/expression.pyx", line 715, in sage.symbolic.expression.Expression.pyobject
cpdef object pyobject(self):
File "sage/symbolic/expression.pyx", line 774, in sage.symbolic.expression.Expression.pyobject
raise TypeError("self must be a numeric expression")
TypeError: self must be a numeric expression