new PPGroup()
Product group of groups where all non-trivial elements
have identical odd prime orders.
- Source:
Extends
Methods
(static) fromByteTree(byteTree)
Recovers a PPGroup instance from its representation
as a byte tree.
Parameters:
Name | Type | Description |
---|---|---|
byteTree |
Byte tree representation of a PPGroup instance. |
- Source:
Returns:
Instance of PPGroup.
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.
- Inherited From:
- Source:
Returns:
Underlying prime order group.
getWidth()
Returns the width, i.e., the number of groups from
which this product group is formed.
- Source:
Returns:
Width of product.
prod(value)
Returns an element of this group formed from elements
of its factor groups.
Parameters:
Name | Type | Description |
---|---|---|
value |
Array of elements from the factor groups of this product group, or a single element, in which case it is assumed that this group is a power of a single group. |
- Source:
Returns:
-
Element of this group.
-
Factor of this product group.
project(i)
Returns ith factor of this product group.
Parameters:
Name | Type | Description |
---|---|---|
i |
Index of factor to return. |
- Source:
Returns:
Factor of this product 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.