pub struct Bls12_381OpsLowLevel;Expand description
Implementation of the bls12-381 operations, intended to be used directly.
Current impl is also used as a base impl for host-call based impl.
The methods impl are considered to be low-level. To actually execute
bls12-381 operations separate functions defined in the builtins_common::bls12_381
must be used.
Trait Implementations§
Source§impl Bls12_381Ops for Bls12_381OpsLowLevel
Basically, copies impl of bls12_381 operations from sp-crypto-ec-utils crate
impl Bls12_381Ops for Bls12_381OpsLowLevel
Basically, copies impl of bls12_381 operations from sp-crypto-ec-utils crate
Source§fn multi_miller_loop(
g1: Vec<u8>,
g2: Vec<u8>,
) -> Result<Vec<u8>, BuiltinActorError>
fn multi_miller_loop( g1: Vec<u8>, g2: Vec<u8>, ) -> Result<Vec<u8>, BuiltinActorError>
Performs the multi Miller loop operation on pairs of G1 and G2 points.
Source§fn final_exponentiation(f: Vec<u8>) -> Result<Vec<u8>, BuiltinActorError>
fn final_exponentiation(f: Vec<u8>) -> Result<Vec<u8>, BuiltinActorError>
Performs the final exponentiation operation.
Source§fn msm_g1(
bases: Vec<u8>,
scalars: Vec<u8>,
) -> Result<Vec<u8>, BuiltinActorError>
fn msm_g1( bases: Vec<u8>, scalars: Vec<u8>, ) -> Result<Vec<u8>, BuiltinActorError>
Performs the multi-scalar multiplication operation on G1 points.
Source§fn msm_g2(
bases: Vec<u8>,
scalars: Vec<u8>,
) -> Result<Vec<u8>, BuiltinActorError>
fn msm_g2( bases: Vec<u8>, scalars: Vec<u8>, ) -> Result<Vec<u8>, BuiltinActorError>
Performs the multi-scalar multiplication operation on G2 points.
Source§fn projective_mul_g1(
base: Vec<u8>,
scalar: Vec<u8>,
) -> Result<Vec<u8>, BuiltinActorError>
fn projective_mul_g1( base: Vec<u8>, scalar: Vec<u8>, ) -> Result<Vec<u8>, BuiltinActorError>
Performs the projective multiplication operation on G1 points.
Source§fn projective_mul_g2(
base: Vec<u8>,
scalar: Vec<u8>,
) -> Result<Vec<u8>, BuiltinActorError>
fn projective_mul_g2( base: Vec<u8>, scalar: Vec<u8>, ) -> Result<Vec<u8>, BuiltinActorError>
Performs the projective multiplication operation on G2 points.
Source§fn aggregate_g1(points: Vec<u8>) -> Result<Vec<u8>, BuiltinActorError>
fn aggregate_g1(points: Vec<u8>) -> Result<Vec<u8>, BuiltinActorError>
Performs the aggregation operation on G1 points.
Source§fn map_to_g2affine(message: Vec<u8>) -> Result<Vec<u8>, BuiltinActorError>
fn map_to_g2affine(message: Vec<u8>) -> Result<Vec<u8>, BuiltinActorError>
Maps a message to a G2Affine point.
Auto Trait Implementations§
impl Freeze for Bls12_381OpsLowLevel
impl RefUnwindSafe for Bls12_381OpsLowLevel
impl Send for Bls12_381OpsLowLevel
impl Sync for Bls12_381OpsLowLevel
impl Unpin for Bls12_381OpsLowLevel
impl UnwindSafe for Bls12_381OpsLowLevel
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more