[−][src]Module ergo_lib::sigma_protocol::dlog_group
This is the general interface for the discrete logarithm prime-order group.
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.
Another issue pertaining elliptic curves is the need to find a suitable mapping that will convert an arbitrary message (that is some binary string) to an element of the group and vice-versa.
Only a subset of the messages can be effectively mapped to a group element in such a way that there is a one-to-one injection that converts the string to a group element and vice-versa.
On the other hand, any group element can be mapped to some string.
Structs
EcPoint | Elliptic curve point |
Functions
exponentiate | Raises the base GroupElement to the exponent. The result is another GroupElement. |
generator | 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. |
identity | The identity(infinity) element |
inverse | Calculates the inverse of the given group element |
is_identity | Check if point is identity(infinity) element |
random_element | Creates a random member of this Dlog group |
random_scalar_in_group_range | Creates a random scalar, a big-endian integer in the range [0, n), where n is group order |