pub struct G2;Available on crate feature
bls only.Expand description
G2 curve
Trait Implementations§
Source§impl BlsPublicKeyType for G2
impl BlsPublicKeyType for G2
Source§const JWK_CURVE_OKP: &'static str = "BLS12381_G2"
const JWK_CURVE_OKP: &'static str = "BLS12381_G2"
The associated JWK curve name (OKP variant)
Source§type BufferSize = UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B1>, B0>, B0>, B0>, B0>, B0>
type BufferSize = UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B1>, B0>, B0>, B0>, B0>, B0>
The size of the serialized compressed public key
Source§type BufferSizeWide = UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B1>, B0>, B0>, B0>, B0>, B0>, B0>
type BufferSizeWide = UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B1>, B0>, B0>, B0>, B0>, B0>, B0>
The size of the serialized uncompressed public key
Source§fn from_secret_scalar(secret: &Scalar) -> Self::Buffer
fn from_secret_scalar(secret: &Scalar) -> Self::Buffer
Initialize from the secret scalar
Source§fn from_public_bytes(key: &[u8]) -> Result<Self::Buffer, Error>
fn from_public_bytes(key: &[u8]) -> Result<Self::Buffer, Error>
Initialize from the compressed bytes
Source§fn with_bytes<O>(
buf: &Self::Buffer,
_alg: Option<KeyAlg>,
f: impl FnOnce(&[u8]) -> O,
) -> O
fn with_bytes<O>( buf: &Self::Buffer, _alg: Option<KeyAlg>, f: impl FnOnce(&[u8]) -> O, ) -> O
Access the bytes of the public key
Auto Trait Implementations§
impl Freeze for G2
impl RefUnwindSafe for G2
impl Send for G2
impl Sync for G2
impl Unpin for G2
impl UnwindSafe for G2
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