trait DlogGroup[ElemType <: ECPoint] extends AnyRef
This is the general interface for the discrete logarithm prime-order group. Every class in the DlogGroup family implements this interface.
The discrete logarithm problem is as follows: given a generator g of a finite
group G and a random element h in G, find the (unique) integer x such that
g^x = h
.
In cryptography, we are interested in groups for which the discrete logarithm problem (Dlog for short) is assumed to be hard. The most known groups of that kind are some Elliptic curve groups.
- ElemType
is concrete type
- Alphabetic
- By Inheritance
- DlogGroup
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Abstract Value Members
-
abstract
def
createRandomElement(): ElemType
Creates a random member of this Dlog group
Creates a random member of this Dlog group
- returns
the random element
-
abstract
def
endExponentiateWithPreComputedValues(base: ElemType): Unit
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.
-
abstract
def
exponentiate(base: ElemType, exponent: BigInteger): ElemType
Raises the base GroupElement to the exponent.
Raises the base GroupElement to the exponent. The result is another GroupElement.
- returns
the result of the exponentiation
- Exceptions thrown
-
abstract
def
exponentiateWithPreComputedValues(base: ElemType, exponent: BigInteger): ElemType
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.
- returns
the exponentiation result
-
abstract
def
generator: ElemType
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.
- returns
the generator of this Dlog group
-
abstract
def
identity: ElemType
- returns
the identity element of this Dlog group
-
abstract
def
inverseOf(groupElement: ElemType): ElemType
Calculates the inverse of the given GroupElement.
Calculates the inverse of the given GroupElement.
- groupElement
to invert
- returns
the inverse element of the given GroupElement
- Exceptions thrown
-
abstract
def
maxLengthOfByteArrayForEncoding: Int
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.
- returns
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.
-
abstract
def
multiplyGroupElements(groupElement1: ElemType, groupElement2: ElemType): ElemType
Multiplies two GroupElements
Multiplies two GroupElements
- returns
the multiplication result
- Exceptions thrown
-
abstract
def
order: BigInteger
- returns
the order of this Dlog group
-
abstract
def
orderGreaterThan(numBits: Int): Boolean
Checks if the order of this group is greater than
2^numBits
Checks if the order of this group is greater than
2^numBits
- returns
true
if the order is greater than2^numBits
;
false
otherwise.
-
abstract
def
simultaneousMultipleExponentiations(groupElements: Array[ElemType], exponentiations: Array[BigInteger]): ElemType
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.
- returns
the exponentiation result
Concrete Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
def
createRandomGenerator(): ElemType
Creates a random generator of this Dlog group
Creates a random generator of this Dlog group
- returns
the random generator
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- val secureRandom: SecureRandom
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()