pub struct BlsVerificationKeyProofOfPossession {
pub vk: BlsVerificationKey,
pub pop: BlsProofOfPossession,
}
Expand description
MultiSig public key, contains the verification key and the proof of possession.
Fields§
§vk: BlsVerificationKey
The verification key.
pop: BlsProofOfPossession
Proof of Possession.
Implementations§
Source§impl BlsVerificationKeyProofOfPossession
impl BlsVerificationKeyProofOfPossession
Sourcepub fn check(&self) -> Result<(), MultiSignatureError>
pub fn check(&self) -> Result<(), MultiSignatureError>
if e(k1,g2) = e(H_G1("PoP" || mvk),mvk)
and e(g1,mvk) = e(k2,g2)
are both true, return 1. The first part is a signature verification
of message “PoP”, while the second we need to compute the pairing
manually.
Sourcepub fn to_bytes(self) -> [u8; 192]
pub fn to_bytes(self) -> [u8; 192]
Convert to a 144 byte string.
§Layout
The layout of a PublicKeyPoP
encoding is
- Public key
- Proof of Possession
Sourcepub fn from_bytes(bytes: &[u8]) -> Result<Self, MultiSignatureError>
pub fn from_bytes(bytes: &[u8]) -> Result<Self, MultiSignatureError>
Deserialize a byte string to a BlsVerificationKeyProofOfPossession
.
Trait Implementations§
Source§impl Clone for BlsVerificationKeyProofOfPossession
impl Clone for BlsVerificationKeyProofOfPossession
Source§fn clone(&self) -> BlsVerificationKeyProofOfPossession
fn clone(&self) -> BlsVerificationKeyProofOfPossession
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<'de> Deserialize<'de> for BlsVerificationKeyProofOfPossession
impl<'de> Deserialize<'de> for BlsVerificationKeyProofOfPossession
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 From<&BlsSigningKey> for BlsVerificationKeyProofOfPossession
impl From<&BlsSigningKey> for BlsVerificationKeyProofOfPossession
Source§fn from(sk: &BlsSigningKey) -> Self
fn from(sk: &BlsSigningKey) -> Self
Convert a secret key into a BlsVerificationKeyProofOfPossession
by simply converting to a
MspMvk
and MspPoP
.
Source§impl PartialEq for BlsVerificationKeyProofOfPossession
impl PartialEq for BlsVerificationKeyProofOfPossession
Source§fn eq(&self, other: &BlsVerificationKeyProofOfPossession) -> bool
fn eq(&self, other: &BlsVerificationKeyProofOfPossession) -> bool
Tests for
self
and other
values to be equal, and is used by ==
.impl Copy for BlsVerificationKeyProofOfPossession
impl Eq for BlsVerificationKeyProofOfPossession
impl StructuralPartialEq for BlsVerificationKeyProofOfPossession
Auto Trait Implementations§
impl Freeze for BlsVerificationKeyProofOfPossession
impl RefUnwindSafe for BlsVerificationKeyProofOfPossession
impl Send for BlsVerificationKeyProofOfPossession
impl Sync for BlsVerificationKeyProofOfPossession
impl Unpin for BlsVerificationKeyProofOfPossession
impl UnwindSafe for BlsVerificationKeyProofOfPossession
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