Extends
Methods
(static) fromByteTree(byteTree)
Recovers a ModPGroup instance from its representation
as a byte tree.
Parameters:
Name | Type | Description |
---|---|---|
byteTree |
Byte tree representation of a ModPGroup instance. |
- Source:
Returns:
Instance of ModPGroup.
(static) getPGroup()
Returns the group with the given name.
- Source:
Returns:
Named group.
(static) getPGroupNames()
Returns an array of all names of available
multiplicative groups.
- Source:
Returns:
Array of all names of available multiplicative groups.
(static) getPGroups()
Returns an array of all available multiplicative groups.
- Source:
Returns:
Array of all available multiplicative groups.
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.
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.
- Inherited From:
- 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.
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.