Skip to content

Instantly share code, notes, and snippets.

@MichelSeck
MichelSeck / encoding2hecurve.sage
Last active May 27, 2019 07:51
Sage Code for Generalization of Encodings into Hyperelliptic Curves
class EncodingValidationOfParameters():
def __init__(self, q, u, w, g = 2, s=None):
self.R = FiniteField(q,"a")
self.a = self.R.gen()
self.poly = PolynomialRing(self.R,"x")
self.x = self.poly.gen()
self.q = q
self.u = self.value2Fq(u)
self.w = self.value2Fq(w)
self.s = s