Class: PPRing

verificatum.arithm.PPRing()

new PPRing()

Product ring over prime order fields.
Source:

Extends

Methods

equals(other)

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

getByteLength()

Fixed number of bytes needed to represent a ring element.
Overrides:
Source:
Returns:
Fixed number of bytes used to represent ring elements.

getEncodeLength()

Fixed number of bytes that can be encoded into a ring element.
Overrides:
Source:
Returns:
Fixed number of bytes that can be encoded into a ring element.

getONE()

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

getPField()

Returns the underlying prime order field.
Overrides:
Source:
Returns:
Underlying prime order field.

getWidth()

Product width of this ring.
Source:
Returns:
Product width of this ring.

getZERO()

Zero of the this ring.
Overrides:
Source:
Returns:
Zero of this ring.

prod()

Forms a product element formed from the given list of elements which are required to belong to the corresponding components of this ring, or from a single element from the underlying ring (in which case it is simply repeated). The latter case requires that the product ring is formed from identical components.
Source:
Returns:
Product element formed from the inputs.

project()

ith component of this product ring.
Source:
Returns:
ith component of this product ring.

randomElement(randomSource, statDist)

Generates a random element in the ring.
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 ring.

randomElementByteLength(statDist)

Number of random bytes needed to derive a random element with the given statistical distance to uniform.
Parameters:
Name Type Description
statDist Statistical distance from the uniform distribution assuming a perfect random source.
Overrides:
Source:
Returns:
Number of random bytes needed to derive a random element.

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.

toString()

Compiles a human readable representation of this field.
Overrides:
Source:
Returns:
Human readable representation of this field.