This function calculates k, the maximum length in bytes of a string to be converted to a Group Element of this group.
This function calculates k, the maximum length in bytes of a string to be converted to a Group Element of this group.
k
Checks if the given x and y represent a valid point on the given curve, i.e.
Checks if the given x and y represent a valid point on the given curve, i.e. if the point (x, y) is a solution of the curves equation.
coefficient of the point
coefficient of the point
true if the given x and y represented a valid point on the given curve
Creates a random member of this Dlog group
Creates a random member of this Dlog group
the random element
Creates a random generator of this Dlog group
Creates a random generator of this Dlog group
the random generator
This function cleans up any resources used by exponentiateWithPreComputedValues for the requested base.
This function cleans up any resources used by exponentiateWithPreComputedValues for the requested base. It is recommended to call it whenever an application does not need to continue calculating exponentiations for this specific base.
Raises the base GroupElement to the exponent.
Raises the base GroupElement to the exponent. The result is another GroupElement.
the result of the exponentiation
Computes the product of several exponentiations of the same base and distinct exponents.
Computes the product of several exponentiations of the same base and distinct exponents. An optimization is used to compute it more quickly by keeping in memory the result of h1, h2, h4,h8,... and using it in the calculation.
Note that if we want a one-time exponentiation of h it is preferable to use the basic exponentiation function since there is no point to keep anything in memory if we have no intention to use it.
the exponentiation result
The generator g of the group is an element of the group such that, when written multiplicatively, every element of the group is a power of g.
The generator g of the group is an element of the group such that, when written multiplicatively, every element of the group is a power of g.
the generator of this Dlog group
the identity of this Dlog group
Calculates the inverse of the given GroupElement.
Calculates the inverse of the given GroupElement.
to invert
the inverse element of the given GroupElement
This function returns the value <I>k</I> which is the maximum length of a string to be encoded to a Group Element of this group.
This function returns the value <I>k</I> which is the maximum length of a string to be encoded to a Group Element of this group.
Any string of length <I>k</I> has a numeric value that is less than (p-1)/2 - 1. <I>k</I> is the maximum length a binary string is allowed to be in order to encode the said binary string to a group element and vice-versa.
If a string exceeds the <I>k</I> length it cannot be encoded.
k the maximum length of a string to be encoded to a Group Element of this group. k can be zero if there is no maximum.
Multiplies two GroupElements
Multiplies two GroupElements
the multiplication result
the order of this Dlog group
Checks if the order of this group is greater than 2^numBits
Checks if the order of this group is greater than 2^numBits
true
if the order is greater than 2^numBits
;
false
otherwise.
Computes the product of several exponentiations with distinct bases and distinct exponents.
Computes the product of several exponentiations with distinct bases and distinct exponents. Instead of computing each part separately, an optimization is used to compute it simultaneously.
the exponentiation result