Documentation ¶
Overview ¶
Package mlsbset provides a constant-time exponentiation method with precomputation.
References: "Efficient and secure algorithms for GLV-based scalar multiplication and their implementation on GLV–GLS curves" by (Faz-Hernandez et al.)
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Encoder ¶
type Encoder struct {
// contains filtered or unexported fields
}
Encoder allows to convert integers into valid powers.
func (Encoder) IsExtended ¶
IsExtended returns true if the element x^(2^(wd)) must be calculated.
type Group ¶
type Group interface { Identity() EltG // Returns the identity of the group. Sqr(x EltG) // Calculates x = x^2. Mul(x EltG, y EltP) // Calculates x = x*y. NewEltP() EltP // Returns an arbitrary precomputed element. ExtendedEltP() EltP // Returns the precomputed element x^(2^(w*d)). Lookup(a EltP, v uint, s, u int32) // Sets a = s*T[v][u]. }
Group defines the operations required by MLSBSet exponentiation method.
type Params ¶
type Params struct { T uint // T is the maximum size (in bits) of exponents. V uint // V is the number of tables. W uint // W is the window size. E uint // E is the number of digits per table. D uint // D is the number of digits in total. L uint // L is the length of the code. }
Params contains the parameters of the encoding.
type Power ¶
type Power struct {
// contains filtered or unexported fields
}
Power is a valid exponent produced by the MLSBSet encoding algorithm.
Click to show internal directories.
Click to hide internal directories.