Class: ECqPGroup

verificatum.arithm.ECqPGroup(modulus, a, b, gx, gy, n)

new ECqPGroup(modulus, a, b, gx, gy, n)

Elliptic curve group over prime order fields.

ASSUMES: 0 <= a, b, gx, gy < modulus, n > 0 and that x^3 + b * x + a (mod modulus) is a non-singular curve of order n.

Parameters:
Name Type Description
modulus Modulus for underlying field, or the name of a standard curve, in which case the remaining parameters must be empty.
a First coefficient for curve of Weierstrass normal form.
b Second coefficientfor curve of Weierstrass normal form.
gx x-coefficient of standard generator.
gy y-coefficient of standard generator.
n Order of elliptic curve.
Source:

Extends

Methods

(static) fromByteTree(byteTree)

Recovers a ECqPGroup instance from its representation as a byte tree.
Parameters:
Name Type Description
byteTree Byte tree representation of a ECqPGroup instance.
Source:
Returns:
Instance of ECqPGroup.

(static) getPGroup()

Returns the group with the given name.
Source:
Returns:
Named group.

(static) getPGroupNames()

Returns an array of all available curve names.
Source:
Returns:
Array of all available curve names.

(static) getPGroups()

Returns an array of all available curves.
Source:
Returns:
Array of all available curves.

benchExp(minSamples, exps, randomSource)

Executes a benchmark of exponentiation in this group, potentially with fixed-basis.
Parameters:
Name Type Description
minSamples Minimal number of samples.
exps Number of exponentiations to pre-compute for, or zero if no pre-computation is done.
randomSource Source of randomness.
Inherited From:
Source:
Returns:
Average number of milliseconds per exponentiation.

benchFixExp(minSamples, exps, randomSource)

Executes a benchmark of fixed-basis exponentiation in this group.
Parameters:
Name Type Description
minSamples Minimal number of samples.
exps Lists of number of exponentiations.
randomSource Source of randomness.
Inherited From:
Source:
Returns:
Average number of milliseconds per exponentiation.

encode(bytes, startIndex)

Encodes the input bytes as a group element.
Parameters:
Name Type Description
bytes Bytes of content.
startIndex Starting position of data to be encoded.
Overrides:
Source:
Returns:
Element constructed from the input byte array.

equals(other)

Compares this group and the input group.
Parameters:
Name Type Description
other Other instance of subclass of this class.
Overrides:
Source:
Returns:
true or false depending on if this group equals the other. This is based on deep comparison of content.

f(x)

Evaluates f(x) = x^3 + a * x + b.
Parameters:
Name Type Description
x x-coordinate of point on the curve.
Source:
Returns:
Value of f at x.

getElementOrder()

Order of every non-trivial element.
Overrides:
Source:
Returns:
Order of every non-trivial element.

getEncodeLength()

Determines the number of bytes that can be encoded into a group element.
Overrides:
Source:
Returns:
Number of bytes that can be encoded into a group element.

getg()

Standard generator of this group. This is a generator in the sense that every element in this group can be written on the form g^x for an element x of the ring of exponents of this group.
Overrides:
Source:
Returns:
Standard generator of this group.

getONE()

Unit element of this group.
Overrides:
Source:
Returns:
Unit element of this group.

getPrimeOrderPGroup()

Returns the prime order group on which this group is defined.
Overrides:
Source:
Returns:
Underlying prime order group.

isOnCurve(x, y)

Checks if an affine point (x, y) is a point on the curve.
Parameters:
Name Type Description
x x-coordinate of prospective point.
y y-coordinate of prospective point.
Source:
Returns:
True or false depending on if (x, y) is on the curve or not.

randomElement(randomSource, statDist)

Generates a random element in the group.
Parameters:
Name Type Description
randomSource Source of randomness.
statDist Statistical distance from the uniform distribution assuming a perfect random source.
Overrides:
Source:
Returns:
Randomly chosen element from the group.

toElement(byteTree)

Recovers an element from the input byte tree.
Parameters:
Name Type Description
byteTree Byte tree representation of an element.
Overrides:
Source:
Returns:
Element represented by the byte tree.