Skip to main content

Module sui::ristretto255

Group operations of BLS12-381.
Only available in devnet.

Struct Scalar

public struct Scalar has store

Struct G

public struct G has store

Constants

const SCALAR_ZERO_BYTES: vector<u8> = vector[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
const SCALAR_ONE_BYTES: vector<u8> = vector[1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
const IDENTITY_BYTES: vector<u8> = vector[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
const GENERATOR_BYTES: vector<u8> = vector[226, 242, 174, 10, 106, 188, 78, 113, 168, 132, 169, 97, 197, 0, 81, 95, 88, 227, 11, 106, 165, 130, 221, 141, 182, 166, 89, 69, 224, 141, 45, 118];
const SCALAR_TYPE: u8 = 5;
const G_TYPE: u8 = 6;

Function scalar_from_bytes

Function scalar_from_u64

Function scalar_zero

Function scalar_one

Function scalar_add

Function scalar_sub

Function scalar_mul

Function scalar_div

Returns e2/e1, fails if a is zero.

Function scalar_neg

Function scalar_inv

Function g_from_bytes

Function g_identity

Function g_generator

Function g_add

Function g_sub

Function g_mul

Function g_div

Returns e2 / e1, fails if scalar is zero.

Function g_neg