https://github.com/simonmasson/efficient-glv-curves-generation
Generation of efficient four-dimensional GLV curves with high security (256-bit)
https://github.com/simonmasson/efficient-glv-curves-generation
cryptography curves elliptic glv sage
Last synced: about 1 year ago
JSON representation
Generation of efficient four-dimensional GLV curves with high security (256-bit)
- Host: GitHub
- URL: https://github.com/simonmasson/efficient-glv-curves-generation
- Owner: simonmasson
- License: mit
- Created: 2018-02-26T12:30:43.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-03-27T16:28:10.000Z (over 8 years ago)
- Last Synced: 2025-03-30T11:45:31.615Z (over 1 year ago)
- Topics: cryptography, curves, elliptic, glv, sage
- Language: Python
- Size: 185 KB
- Stars: 0
- Watchers: 0
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Efficient GLV curves generation
Generation of efficient four-dimensional GLV curves with high security (256-bit)
## How to use ?
`sage : load('generating_curves.sage')`
NB : if you want to use other primes, just change the line 84 of `generating_curves.sage` with `primes = [my, new, primes]`.
## Files description
- auxiliary_functions.sage
`separate_square_factors(r)` returns s and D such that r = s^2*D with s rational and D square-free.
`roots_d2(P)` returns the roots of a degree 2 polynomial.
`get_hasegawa_j_inv(d)` returns the j-invariant of a Hasegawa Q-curve of degree d.
`get_hasegawa_reduction_coefficients(p, d, s, D)` returns A and B in GF(p^2) defining the Hasegawa
curve y^2 = x^3 + A*x + B parametrized by s, d and Delta.
- CM_Q-curves.sage
`contruct_Discs_D0_f` return the list of possible discriminants for a CM Q-curve with deg(H_D) = 1 or 2.
`construct_CM_j_roots` returns the possible j-invariants for a CM Q-curve with deg(H_D) = 1 or 2.
- Hase_CM_curves.sage
`get_Qfamily_equation_from_j(d, j0)` returns the equation satisfied by (s, Delta) to get j(d, s, Delta) = j0.
`compute_Hase_CM_curves.sage` returns the list of (d, s, Delta) for which a CM Q-curve of degree d arises.
- generating_primes.sage
Computes a list of 256-bit primes with efficient finite field arithmetic, and stores it in a file `primes.sage`.
- generating_curves.sage
`get_possible_traces(p, Delta)` returns the list of the twisted curves traces for a given quadratic finite field F_{p^2} and a given endomorphisms algebra Q(√Δ).
`get_curve_order_and_twist_orders(P, Q1, traces)` (Q1 = [p]P) return [a, L] where a is the order of the curve, and L is the list of the twisted curves orders.
`write_curve(cpt, file, p, A, B, order, N, twist_orders, E, d, s, D)` write a new curve in file, for which there is an efficient arithmetic, and for which we can apply the four-dimensional GLV method. The list is stored in `GLV4_curves.sage`.
- primes.sage
File created by `generating_primes.sage`.
- GLV4_curves.sage
File created by `generating_curves.sage`. Each element of the list represents a curve, given in the form : `[p, A, B, order, N, [twists], Delta, d, s, D]` where the curve is given by E_{d, s, D} : y^2 = x^3 + A*x + B with A,B in F_{p^2} = F_p(sqrt(Delta)), #E = order, N|#E is prime, and [twists] are the orders of the twists.