pub struct VerificationKey(/* private fields */);
Expand description
MultiSig verification key, which is a wrapper over the BlstVk (element in G2) from the blst library.
Implementations§
source§impl VerificationKey
impl VerificationKey
sourcepub fn to_bytes(self) -> [u8; 96]
pub fn to_bytes(self) -> [u8; 96]
Convert an VerificationKey
to its compressed byte representation.
sourcepub fn from_bytes(bytes: &[u8]) -> Result<Self, MultiSignatureError>
pub fn from_bytes(bytes: &[u8]) -> Result<Self, MultiSignatureError>
Convert a compressed byte string into a VerificationKey
.
§Error
This function fails if the bytes do not represent a compressed point of the prime order subgroup of the curve Bls12-381.
Trait Implementations§
source§impl Clone for VerificationKey
impl Clone for VerificationKey
source§fn clone(&self) -> VerificationKey
fn clone(&self) -> VerificationKey
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for VerificationKey
impl Debug for VerificationKey
source§impl Default for VerificationKey
impl Default for VerificationKey
source§fn default() -> VerificationKey
fn default() -> VerificationKey
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for VerificationKey
impl<'de> Deserialize<'de> for VerificationKey
source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Display for VerificationKey
impl Display for VerificationKey
source§impl From<&SigningKey> for VerificationKey
impl From<&SigningKey> for VerificationKey
source§fn from(sk: &SigningKey) -> Self
fn from(sk: &SigningKey) -> Self
Convert a secret key into an MspMvk
. This is performed by computing
MspMvk = g2 * sk
, where g2
is the generator in G2. We can use the
blst built-in function sk_to_pk
.
source§impl Hash for VerificationKey
impl Hash for VerificationKey
source§impl Ord for VerificationKey
impl Ord for VerificationKey
source§impl PartialEq for VerificationKey
impl PartialEq for VerificationKey
source§impl PartialOrd for VerificationKey
impl PartialOrd for VerificationKey
source§impl Serialize for VerificationKey
impl Serialize for VerificationKey
source§impl<'a> Sum<&'a VerificationKey> for VerificationKey
impl<'a> Sum<&'a VerificationKey> for VerificationKey
impl Copy for VerificationKey
impl Eq for VerificationKey
Auto Trait Implementations§
impl Freeze for VerificationKey
impl RefUnwindSafe for VerificationKey
impl Send for VerificationKey
impl Sync for VerificationKey
impl Unpin for VerificationKey
impl UnwindSafe for VerificationKey
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)