[−][src]Struct ps_sig::signature::Signature
Created by the signer when no blinded messages. Also the receiver of a blind signature can get this by unblinding the blind signature.
Fields
sigma_1: SignatureGroup
sigma_2: SignatureGroup
Methods
impl Signature
[src]
pub fn new(
messages: &[FieldElement],
sigkey: &Sigkey,
params: &Params
) -> Result<Self, PSError>
[src]
messages: &[FieldElement],
sigkey: &Sigkey,
params: &Params
) -> Result<Self, PSError>
Create a new signature. The signature generation involves generating a random value for sigma_1
so different
calls to this method with same messages, signing key and params will give different value
pub fn new_deterministic(
messages: &[FieldElement],
sigkey: &Sigkey
) -> Result<Self, PSError>
[src]
messages: &[FieldElement],
sigkey: &Sigkey
) -> Result<Self, PSError>
Create a new signature. The signature generation doesn't involve generating a random value but
the messages are hashed to get a pseudorandom value for sigma_1
. Hence different calls to this method
with same messages and signing key will give same value
pub fn sign_with_sigma_1_generated_from_given_exp(
messages: &[FieldElement],
sigkey: &Sigkey,
u: &FieldElement,
offset: usize,
g: &SignatureGroup
) -> Result<(SignatureGroup, SignatureGroup), PSError>
[src]
messages: &[FieldElement],
sigkey: &Sigkey,
u: &FieldElement,
offset: usize,
g: &SignatureGroup
) -> Result<(SignatureGroup, SignatureGroup), PSError>
Generate signature when first element of signature tuple is generated using given exponent Does only 1 scalar multiplication
pub fn sign_with_given_sigma_1(
messages: &[FieldElement],
sigkey: &Sigkey,
offset: usize,
h: &SignatureGroup
) -> Result<SignatureGroup, PSError>
[src]
messages: &[FieldElement],
sigkey: &Sigkey,
offset: usize,
h: &SignatureGroup
) -> Result<SignatureGroup, PSError>
Generate signature when first element of signature tuple is given
pub fn verify(
&self,
messages: Vec<FieldElement>,
vk: &Verkey,
params: &Params
) -> Result<bool, PSError>
[src]
&self,
messages: Vec<FieldElement>,
vk: &Verkey,
params: &Params
) -> Result<bool, PSError>
Verify a signature. Can verify unblinded sig received from a signer and the aggregate sig as well.
pub fn to_bytes(&self) -> Vec<u8>
[src]
Byte representation of the signature
pub fn check_verkey_and_messages_compat(
messages: &[FieldElement],
verkey: &Verkey
) -> Result<(), PSError>
[src]
messages: &[FieldElement],
verkey: &Verkey
) -> Result<(), PSError>
pub fn check_sigkey_and_messages_compat(
messages: &[FieldElement],
sigkey: &Sigkey
) -> Result<(), PSError>
[src]
messages: &[FieldElement],
sigkey: &Sigkey
) -> Result<(), PSError>
pub fn is_identity(&self) -> bool
[src]
Checks if a signature has identity elements. A valid signature should not have identity elements.
Trait Implementations
impl Clone for Signature
[src]
impl Debug for Signature
[src]
impl<'de> Deserialize<'de> for Signature
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Serialize for Signature
[src]
Auto Trait Implementations
impl RefUnwindSafe for Signature
impl Send for Signature
impl Sync for Signature
impl Unpin for Signature
impl UnwindSafe for Signature
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
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, 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<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,