pub struct QIndexedSignature {
pub proof: MerkleProof<WinternitzKey>,
pub one_time_signature: WinternitzSignature,
}Fields§
§proof: MerkleProof<WinternitzKey>Merkle proof used to verify that the used Winternitz public key is actually valid. Note that the used Winternitz public key itself is not included in the signature, but can be computed from the signature and the message. This saves a lot of bytes!
one_time_signature: WinternitzSignatureWinternitz signature of the data being signed
Trait Implementations§
Source§impl<'de> Deserialize<'de> for QIndexedSignature
impl<'de> Deserialize<'de> for QIndexedSignature
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 PartialEq for QIndexedSignature
impl PartialEq for QIndexedSignature
Source§impl Serialize for QIndexedSignature
impl Serialize for QIndexedSignature
Source§impl SignatureScheme<[u8; 32], (usize, [u8; 32]), QIndexedSignature> for QIndexedSignatureScheme
impl SignatureScheme<[u8; 32], (usize, [u8; 32]), QIndexedSignature> for QIndexedSignatureScheme
Source§fn sign(&mut self, message: (usize, HashType)) -> QIndexedSignature
fn sign(&mut self, message: (usize, HashType)) -> QIndexedSignature
Signs a message.
§Panics
Panics if the scheme is used more than once to sign different messages with the same index. Note that there could still be a different instance with the same secret key, which would not be detected.
Source§fn public_key(&self) -> HashType
fn public_key(&self) -> HashType
Returns a copy of the public key
Source§fn verify(
pk: HashType,
message: (usize, HashType),
signature: &QIndexedSignature,
) -> bool
fn verify( pk: HashType, message: (usize, HashType), signature: &QIndexedSignature, ) -> bool
Verifies a signature.
Note that this function does not require need
self, hence does not need
an instance of the signature scheme.
This is because an instance of a signature scheme contains the signing key
which is typically not available for the verifier.impl StructuralPartialEq for QIndexedSignature
Auto Trait Implementations§
impl Freeze for QIndexedSignature
impl RefUnwindSafe for QIndexedSignature
impl Send for QIndexedSignature
impl Sync for QIndexedSignature
impl Unpin for QIndexedSignature
impl UnwindSafe for QIndexedSignature
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more