{"id":17663599,"url":"https://github.com/simonmasson/efficient-glv-curves-generation","last_synced_at":"2025-06-11T14:11:05.373Z","repository":{"id":139648688,"uuid":"122967039","full_name":"simonmasson/efficient-GLV-curves-generation","owner":"simonmasson","description":"Generation of efficient four-dimensional GLV curves with high security (256-bit)","archived":false,"fork":false,"pushed_at":"2018-03-27T16:28:10.000Z","size":189,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-30T11:45:31.615Z","etag":null,"topics":["cryptography","curves","elliptic","glv","sage"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/simonmasson.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-02-26T12:30:43.000Z","updated_at":"2018-03-27T16:28:11.000Z","dependencies_parsed_at":"2023-07-23T08:15:23.229Z","dependency_job_id":null,"html_url":"https://github.com/simonmasson/efficient-GLV-curves-generation","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonmasson%2Fefficient-GLV-curves-generation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonmasson%2Fefficient-GLV-curves-generation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonmasson%2Fefficient-GLV-curves-generation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonmasson%2Fefficient-GLV-curves-generation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/simonmasson","download_url":"https://codeload.github.com/simonmasson/efficient-GLV-curves-generation/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonmasson%2Fefficient-GLV-curves-generation/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259280304,"owners_count":22833424,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cryptography","curves","elliptic","glv","sage"],"created_at":"2024-10-23T19:07:29.107Z","updated_at":"2025-06-11T14:11:05.315Z","avatar_url":"https://github.com/simonmasson.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Efficient GLV curves generation\nGeneration of efficient four-dimensional GLV curves with high security (256-bit)\n\n## How to use ?\n`sage : load('generating_curves.sage')`\u003cbr\u003e\nNB : if you want to use other primes, just change the line 84 of `generating_curves.sage` with `primes = [my, new, primes]`.\n\n## Files description\n - \u003cb\u003eauxiliary_functions.sage\u003c/b\u003e\u003cbr\u003e \n `separate_square_factors(r)` returns s and D such that r = s^2*D with s rational and D square-free.\u003cbr\u003e\n `roots_d2(P)` returns the roots of a degree 2 polynomial.\u003cbr\u003e\n `get_hasegawa_j_inv(d)` returns the j-invariant of a Hasegawa Q-curve of degree d.\u003cbr\u003e\n `get_hasegawa_reduction_coefficients(p, d, s, D)` returns A and B in GF(p^2) defining the Hasegawa\n curve y^2 = x^3 + A*x + B parametrized by s, d and Delta.\n\n - \u003cb\u003eCM_Q-curves.sage\u003c/b\u003e\u003cbr\u003e\n `contruct_Discs_D0_f` return the list of possible discriminants for a CM Q-curve with deg(H_D) = 1 or 2.\u003cbr\u003e\n `construct_CM_j_roots` returns the possible j-invariants for a CM Q-curve with deg(H_D) = 1 or 2.\n \n - \u003cb\u003eHase_CM_curves.sage\u003c/b\u003e\u003cbr\u003e\n  `get_Qfamily_equation_from_j(d, j0)` returns the equation satisfied by (s, Delta) to get j(d, s, Delta) = j0.\u003cbr\u003e\n  `compute_Hase_CM_curves.sage` returns the list of (d, s, Delta) for which a CM Q-curve of degree d arises.\n \n - \u003cb\u003egenerating_primes.sage\u003c/b\u003e\u003cbr\u003e \n Computes a list of 256-bit primes with efficient finite field arithmetic, and stores it in a file `primes.sage`.\n \n - \u003cb\u003egenerating_curves.sage\u003c/b\u003e\u003cbr\u003e\n `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 \u003cb\u003eQ\u003c/b\u003e(√Δ).\u003cbr\u003e\n `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.\u003cbr\u003e\n `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`. \n\n- \u003cb\u003eprimes.sage\u003c/b\u003e\u003cbr\u003e\nFile created by `generating_primes.sage`.\n\n- \u003cb\u003eGLV4_curves.sage\u003c/b\u003e\u003cbr\u003e\nFile 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.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimonmasson%2Fefficient-glv-curves-generation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsimonmasson%2Fefficient-glv-curves-generation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimonmasson%2Fefficient-glv-curves-generation/lists"}