pub struct Issuer;
Expand description
This struct represents an Issuer of signatures or Signer. Provided are methods for signing regularly where all messages are known and 2PC where some are only known to the holder and a blind signature is created.
Implementations§
Source§impl Issuer
impl Issuer
Sourcepub fn new_keys(
message_count: usize,
) -> Result<(PublicKey, SecretKey), BBSError>
pub fn new_keys( message_count: usize, ) -> Result<(PublicKey, SecretKey), BBSError>
Create a keypair capable of signing message_count
messages
Sourcepub fn new_short_keys(
option: Option<KeyGenOption>,
) -> Result<(DeterministicPublicKey, SecretKey), BBSError>
pub fn new_short_keys( option: Option<KeyGenOption>, ) -> Result<(DeterministicPublicKey, SecretKey), BBSError>
Create a keypair that uses the short public key
Sourcepub fn sign(
messages: &[SignatureMessage],
signkey: &SecretKey,
verkey: &PublicKey,
) -> Result<Signature, BBSError>
pub fn sign( messages: &[SignatureMessage], signkey: &SecretKey, verkey: &PublicKey, ) -> Result<Signature, BBSError>
Create a signature with no hidden messages
Sourcepub fn blind_sign(
ctx: &BlindSignatureContext,
messages: &BTreeMap<usize, SignatureMessage>,
signkey: &SecretKey,
verkey: &PublicKey,
nonce: &ProofNonce,
) -> Result<BlindSignature, BBSError>
pub fn blind_sign( ctx: &BlindSignatureContext, messages: &BTreeMap<usize, SignatureMessage>, signkey: &SecretKey, verkey: &PublicKey, nonce: &ProofNonce, ) -> Result<BlindSignature, BBSError>
Verify a proof of committed messages and generate a blind signature
Sourcepub fn generate_signing_nonce() -> ProofNonce
pub fn generate_signing_nonce() -> ProofNonce
Create a nonce used for the blind signing context
Auto Trait Implementations§
impl Freeze for Issuer
impl RefUnwindSafe for Issuer
impl Send for Issuer
impl Sync for Issuer
impl Unpin for Issuer
impl UnwindSafe for Issuer
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