G2
Attributes
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
G2.type
Members list
Value members
Concrete methods
The compressed generator of the G2 group of the BLS12-381 curve.
The compressed generator of the G2 group of the BLS12-381 curve.
Attributes
- Note
-
This is a function, not a constant deliberately. Being a constant would make it always initialize in your Plutus script (which is not cheap) even if the BLS12-381 is not used in the evaluated code. Hence, to avoid multiple initializations, please create a local variable in the scope where you need it, like:
val genG2 = G2.generator
Hashes a ByteString to a point in the G2 group.
Hashes a ByteString to a point in the G2 group.
Value parameters
- bs
-
The byte string to hash.
- dst
-
The domain separation tag, which should be a short byte string (up to 255 bytes).
Attributes
- Returns
-
A point in the G2 group.
Uncompresses a point in the G2 group from its compressed form.
Uncompresses a point in the G2 group from its compressed form.
Attributes
BLS12 G2 zero element.
BLS12 G2 zero element.
This is the point at infinity in the BLS12-381 G2 group
Attributes
- Note
-
This is a function, not a constant deliberately. Being a constant would make it always initialize in your Plutus script (which is not cheap) even if the BLS12-381 is not used in the evaluated code. Hence, to avoid multiple initializations, please create a local variable in the scope where you need it, like:
val zeroG2 = G2.zero
Givens
Givens
Extensions
Extensions
Adds two points in the G2 group
Adds two points in the G2 group
Attributes
Compresses the point in the G2 group to its compressed form.
Compresses the point in the G2 group to its compressed form.
Attributes
- Returns
-
A ByteString representing the compressed point.
Checks if two points in the G2 group are equal
Checks if two points in the G2 group are equal
Attributes
Exponentiates a point in the G2 group with a scalar
. This operation is equivalent to the repeated addition of the point with itself e
times.
Exponentiates a point in the G2 group with a scalar
. This operation is equivalent to the repeated addition of the point with itself e
times.
Value parameters
- scalar
-
The scalar to multiply the point by.
Attributes
- Returns
-
A new point in the G2 group, which is the result of multiplying the original point by the scalar.
Negates the point in the G2 group
Negates the point in the G2 group