[−][src]Struct solana_libra_nextgen_crypto::bls12381::BLS12381Signature
A BLS12-381 signature
Methods
impl BLS12381Signature
[src]
Methods from Deref<Target = Signature>
pub fn parity(&self) -> bool
[src]
Returns true
if the signature contains an odd number of ones.
pub fn to_bytes(&self) -> [u8; 96]
[src]
Returns a byte string representation of the signature.
Trait Implementations
impl Signature for BLS12381Signature
[src]
type VerifyingKeyMaterial = BLS12381PublicKey
The associated verifying key type for this signature.
type SigningKeyMaterial = BLS12381PrivateKey
The associated signing key type for this signature
fn verify(
&self,
message: &HashValue,
public_key: &BLS12381PublicKey
) -> Result<()>
[src]
&self,
message: &HashValue,
public_key: &BLS12381PublicKey
) -> Result<()>
Checks that signature
is valid for message
using public_key
.
fn verify_arbitrary_msg(
&self,
message: &[u8],
public_key: &BLS12381PublicKey
) -> Result<()>
[src]
&self,
message: &[u8],
public_key: &BLS12381PublicKey
) -> Result<()>
Checks that signature
is valid for an arbitrary &u8 message
using public_key
.
fn to_bytes(&self) -> Vec<u8>
[src]
fn batch_verify_signatures(
message: &HashValue,
keys_and_signatures: Vec<(Self::VerifyingKeyMaterial, Self)>
) -> Result<()>
[src]
message: &HashValue,
keys_and_signatures: Vec<(Self::VerifyingKeyMaterial, Self)>
) -> Result<()>
The implementer can override a batch verification implementation that by default iterates over each signature. More efficient implementations exist and should be implemented for many schemes. Read more
impl Clone for BLS12381Signature
[src]
fn clone(&self) -> BLS12381Signature
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl PartialEq<BLS12381Signature> for BLS12381Signature
[src]
fn eq(&self, other: &BLS12381Signature) -> bool
[src]
fn ne(&self, other: &BLS12381Signature) -> bool
[src]
impl Eq for BLS12381Signature
[src]
impl Debug for BLS12381Signature
[src]
impl Deref for BLS12381Signature
[src]
type Target = Signature
The resulting type after dereferencing.
fn deref(&self) -> &Self::Target
[src]
impl Hash for BLS12381Signature
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl<'_> TryFrom<&'_ [u8]> for BLS12381Signature
[src]
type Error = CryptoMaterialError
The type returned in the event of a conversion error.
fn try_from(bytes: &[u8]) -> Result<BLS12381Signature, CryptoMaterialError>
[src]
impl Serialize for BLS12381Signature
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl<'de> Deserialize<'de> for BLS12381Signature
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
Auto Trait Implementations
impl Sync for BLS12381Signature
impl Send for BLS12381Signature
impl Unpin for BLS12381Signature
impl RefUnwindSafe for BLS12381Signature
impl UnwindSafe for BLS12381Signature
Blanket Implementations
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,
impl<T> TestOnlyHash for T where
T: Serialize + ?Sized,
T: Serialize + ?Sized,
fn test_only_hash(&self) -> HashValue
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,