pub struct BlindSignature { /* private fields */ }
Expand description
A BBS+ blind signature
structurally identical to Signature
but is used to help
with misuse and confusion.
Implementations§
Source§impl BlindSignature
impl BlindSignature
Sourcepub fn new(
commitment: &Commitment,
messages: &BTreeMap<usize, SignatureMessage>,
signkey: &SecretKey,
verkey: &PublicKey,
) -> Result<Self, BBSError>
pub fn new( commitment: &Commitment, messages: &BTreeMap<usize, SignatureMessage>, signkey: &SecretKey, verkey: &PublicKey, ) -> Result<Self, BBSError>
1 or more messages have been hidden by the signature recipient. The remaining
known messages are in messages
. The generator to which they correspond is in message_indices
.
commitment
: h0s * h[i]mi
messages
: Messages to be signed where each value is 0 < m ≤ r and the key is the index in the public.h to which is used as base
signkey
: The secret key for signing
verkey
: The corresponding public key to secret key
Sourcepub fn to_unblinded(&self, blinding: &SignatureBlinding) -> Signature
pub fn to_unblinded(&self, blinding: &SignatureBlinding) -> Signature
Once signature on committed attributes (blind signature) is received, the signature needs to be unblinded. Takes the blinding factor used in the commitment.
Sourcepub fn to_bytes_compressed_form(&self) -> [u8; 112]
pub fn to_bytes_compressed_form(&self) -> [u8; 112]
Convert to raw bytes form
Sourcepub fn to_bytes_uncompressed_form(&self) -> [u8; 160]
pub fn to_bytes_uncompressed_form(&self) -> [u8; 160]
Convert to raw bytes form
Trait Implementations§
Source§impl Clone for BlindSignature
impl Clone for BlindSignature
Source§fn clone(&self) -> BlindSignature
fn clone(&self) -> BlindSignature
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 BlindSignature
impl Debug for BlindSignature
Source§impl Default for BlindSignature
impl Default for BlindSignature
Source§impl<'a> Deserialize<'a> for BlindSignature
impl<'a> Deserialize<'a> for BlindSignature
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'a>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'a>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for BlindSignature
impl Display for BlindSignature
Source§impl PartialEq for BlindSignature
impl PartialEq for BlindSignature
Source§impl Serialize for BlindSignature
impl Serialize for BlindSignature
Source§impl TryFrom<&[u8]> for BlindSignature
impl TryFrom<&[u8]> for BlindSignature
impl Copy for BlindSignature
impl Eq for BlindSignature
impl StructuralPartialEq for BlindSignature
Auto Trait Implementations§
impl Freeze for BlindSignature
impl RefUnwindSafe for BlindSignature
impl Send for BlindSignature
impl Sync for BlindSignature
impl Unpin for BlindSignature
impl UnwindSafe for BlindSignature
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§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