Class: PGroup

(abstract) verificatum.arithm.PGroup()

(abstract) new PGroup()

Abstract group where every non-trivial element has the order determined by the input PRing. We stress that this is not necessarily a prime order group. Each group has an associated ring of exponents, i.e., an instance of verificatum.arithm.PRing.
Source:

Methods

(static) benchExp(minSamples, randomSource)

Executes a benchmark of exponentiation in all named groups.
Parameters:
Name Type Description
minSamples Minimal number of samples.
randomSource Source of randomness.
Source:
Returns:
Average number of milliseconds per exponentiation.

(static) benchFixExp(pGroups, minSamples, exps, randomSource)

Executes a benchmark of exponentiation in all named groups.
Parameters:
Name Type Description
pGroups Benchmarked groups.
minSamples Minimal number of samples.
exps Lists of number of exponentiations.
randomSource Source of randomness.
Source:
Returns:
Average number of milliseconds per exponentiation.

(static) getPGroup()

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

(static) getWideGroup(pGroup, keyWidth)

Returns a product group or the input group if the given width equals one.
Parameters:
Name Type Description
pGroup Basic group.
keyWidth Width of product group.
Source:
Returns:
Input group or product group.

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.
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.
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.
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.
Source:
Returns:
true or false depending on if this group equals the other. This is based on deep comparison of content.

getElementOrder()

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

getEncodeLength()

Determines the number of bytes that can be encoded into a group element.
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.
Source:
Returns:
Standard generator of this group.

getONE()

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

getPrimeOrderPGroup()

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

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.
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.
Source:
Returns:
Element represented by the byte tree.