pub struct BlsSignature(pub Signature);
Expand description
MultiSig signature, which is a wrapper over the BlstSig
type.
Tuple Fields§
§0: Signature
Implementations§
Source§impl BlsSignature
impl BlsSignature
Sourcepub fn verify(
&self,
msg: &[u8],
mvk: &BlsVerificationKey,
) -> Result<(), MultiSignatureError>
pub fn verify( &self, msg: &[u8], mvk: &BlsVerificationKey, ) -> Result<(), MultiSignatureError>
Verify a signature against a verification key.
Sourcepub fn from_bytes(bytes: &[u8]) -> Result<Self, MultiSignatureError>
pub fn from_bytes(bytes: &[u8]) -> Result<Self, MultiSignatureError>
Convert a string of bytes into a MspSig
.
§Error
Returns an error if the byte string does not represent a point in the curve.
Sourcepub fn aggregate(
vks: &[BlsVerificationKey],
sigs: &[BlsSignature],
) -> Result<(BlsVerificationKey, BlsSignature), MultiSignatureError>
pub fn aggregate( vks: &[BlsVerificationKey], sigs: &[BlsSignature], ) -> Result<(BlsVerificationKey, BlsSignature), MultiSignatureError>
Aggregate a slice of verification keys and Signatures by first hashing the
signatures into random scalars, and multiplying the signature and verification
key with the resulting value. This follows the steps defined in Figure 6,
Aggregate
step.
Sourcepub fn verify_aggregate(
msg: &[u8],
vks: &[BlsVerificationKey],
sigs: &[BlsSignature],
) -> Result<(), MultiSignatureError>
pub fn verify_aggregate( msg: &[u8], vks: &[BlsVerificationKey], sigs: &[BlsSignature], ) -> Result<(), MultiSignatureError>
Verify a set of signatures with their corresponding verification keys using the aggregation mechanism of Figure 6.
Sourcepub fn batch_verify_aggregates(
msgs: &[Vec<u8>],
vks: &[BlsVerificationKey],
sigs: &[BlsSignature],
) -> Result<(), MultiSignatureError>
pub fn batch_verify_aggregates( msgs: &[Vec<u8>], vks: &[BlsVerificationKey], sigs: &[BlsSignature], ) -> Result<(), MultiSignatureError>
Batch verify several sets of signatures with their corresponding verification keys.
Trait Implementations§
Source§impl Clone for BlsSignature
impl Clone for BlsSignature
Source§fn clone(&self) -> BlsSignature
fn clone(&self) -> BlsSignature
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 BlsSignature
impl Debug for BlsSignature
Source§impl<'de> Deserialize<'de> for BlsSignature
impl<'de> Deserialize<'de> for BlsSignature
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 Ord for BlsSignature
impl Ord for BlsSignature
Source§impl PartialEq for BlsSignature
impl PartialEq for BlsSignature
Source§impl PartialOrd for BlsSignature
impl PartialOrd for BlsSignature
Source§impl Serialize for BlsSignature
impl Serialize for BlsSignature
Source§impl<'a> Sum<&'a BlsSignature> for BlsSignature
impl<'a> Sum<&'a BlsSignature> for BlsSignature
impl Copy for BlsSignature
impl Eq for BlsSignature
impl StructuralPartialEq for BlsSignature
Auto Trait Implementations§
impl Freeze for BlsSignature
impl RefUnwindSafe for BlsSignature
impl Send for BlsSignature
impl Sync for BlsSignature
impl Unpin for BlsSignature
impl UnwindSafe for BlsSignature
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