Trait snarkvm_algorithms::traits::signature::SignatureScheme [−][src]
Associated Types
type Parameters: Clone + Debug + ToBytes + FromBytes + Eq + Send + Sync
[src]
type PublicKey: Clone + Debug + Default + ToBytes + FromBytes + Hash + Eq + Send + Sync + CanonicalSerialize + CanonicalDeserialize
[src]
type PrivateKey: Clone + Debug + Default + ToBytes + FromBytes + PartialEq + Eq
[src]
type Output: Clone + Debug + Default + ToBytes + FromBytes + Send + Sync
[src]
Required methods
fn setup<R: Rng>(rng: &mut R) -> Result<Self, SignatureError>
[src]
fn parameters(&self) -> &Self::Parameters
[src]
fn generate_private_key<R: Rng>(
&self,
rng: &mut R
) -> Result<Self::PrivateKey, SignatureError>
[src]
&self,
rng: &mut R
) -> Result<Self::PrivateKey, SignatureError>
fn generate_public_key(
&self,
private_key: &Self::PrivateKey
) -> Result<Self::PublicKey, SignatureError>
[src]
&self,
private_key: &Self::PrivateKey
) -> Result<Self::PublicKey, SignatureError>
fn sign<R: Rng>(
&self,
private_key: &Self::PrivateKey,
message: &[u8],
rng: &mut R
) -> Result<Self::Output, SignatureError>
[src]
&self,
private_key: &Self::PrivateKey,
message: &[u8],
rng: &mut R
) -> Result<Self::Output, SignatureError>
fn verify(
&self,
public_key: &Self::PublicKey,
message: &[u8],
signature: &Self::Output
) -> Result<bool, SignatureError>
[src]
&self,
public_key: &Self::PublicKey,
message: &[u8],
signature: &Self::Output
) -> Result<bool, SignatureError>
fn randomize_public_key(
&self,
public_key: &Self::PublicKey,
randomness: &[u8]
) -> Result<Self::PublicKey, SignatureError>
[src]
&self,
public_key: &Self::PublicKey,
randomness: &[u8]
) -> Result<Self::PublicKey, SignatureError>
fn randomize_signature(
&self,
signature: &Self::Output,
randomness: &[u8]
) -> Result<Self::Output, SignatureError>
[src]
&self,
signature: &Self::Output,
randomness: &[u8]
) -> Result<Self::Output, SignatureError>
Implementors
impl<G: Group + Hash + CanonicalSerialize + CanonicalDeserialize, D: Digest + Send + Sync> SignatureScheme for SchnorrSignature<G, D> where
<G as Group>::ScalarField: PrimeField,
[src]
<G as Group>::ScalarField: PrimeField,
type Output = SchnorrOutput<G>
type Parameters = SchnorrParameters<G, D>
type PrivateKey = <G as Group>::ScalarField
type PublicKey = SchnorrPublicKey<G>
fn setup<R: Rng>(rng: &mut R) -> Result<Self, SignatureError>
[src]
fn parameters(&self) -> &Self::Parameters
[src]
fn generate_private_key<R: Rng>(
&self,
rng: &mut R
) -> Result<Self::PrivateKey, SignatureError>
[src]
&self,
rng: &mut R
) -> Result<Self::PrivateKey, SignatureError>
fn generate_public_key(
&self,
private_key: &Self::PrivateKey
) -> Result<Self::PublicKey, SignatureError>
[src]
&self,
private_key: &Self::PrivateKey
) -> Result<Self::PublicKey, SignatureError>
fn sign<R: Rng>(
&self,
private_key: &Self::PrivateKey,
message: &[u8],
rng: &mut R
) -> Result<Self::Output, SignatureError>
[src]
&self,
private_key: &Self::PrivateKey,
message: &[u8],
rng: &mut R
) -> Result<Self::Output, SignatureError>
fn verify(
&self,
public_key: &Self::PublicKey,
message: &[u8],
signature: &Self::Output
) -> Result<bool, SignatureError>
[src]
&self,
public_key: &Self::PublicKey,
message: &[u8],
signature: &Self::Output
) -> Result<bool, SignatureError>
fn randomize_public_key(
&self,
public_key: &Self::PublicKey,
randomness: &[u8]
) -> Result<Self::PublicKey, SignatureError>
[src]
&self,
public_key: &Self::PublicKey,
randomness: &[u8]
) -> Result<Self::PublicKey, SignatureError>
fn randomize_signature(
&self,
signature: &Self::Output,
randomness: &[u8]
) -> Result<Self::Output, SignatureError>
[src]
&self,
signature: &Self::Output,
randomness: &[u8]
) -> Result<Self::Output, SignatureError>
impl<G: Group + ProjectiveCurve, SG: Group + Hash + CanonicalSerialize + CanonicalDeserialize, D: Digest + Send + Sync> SignatureScheme for GroupEncryption<G, SG, D> where
<G as Group>::ScalarField: PrimeField,
[src]
<G as Group>::ScalarField: PrimeField,
type Output = SchnorrOutput<SG>
type Parameters = GroupEncryptionParameters<G>
type PrivateKey = <G as Group>::ScalarField
type PublicKey = GroupEncryptionPublicKey<G>
fn setup<R: Rng>(rng: &mut R) -> Result<Self, SignatureError>
[src]
fn parameters(&self) -> &Self::Parameters
[src]
fn generate_private_key<R: Rng>(
&self,
rng: &mut R
) -> Result<Self::PrivateKey, SignatureError>
[src]
&self,
rng: &mut R
) -> Result<Self::PrivateKey, SignatureError>
fn generate_public_key(
&self,
private_key: &Self::PrivateKey
) -> Result<Self::PublicKey, SignatureError>
[src]
&self,
private_key: &Self::PrivateKey
) -> Result<Self::PublicKey, SignatureError>
fn sign<R: Rng>(
&self,
private_key: &Self::PrivateKey,
message: &[u8],
rng: &mut R
) -> Result<Self::Output, SignatureError>
[src]
&self,
private_key: &Self::PrivateKey,
message: &[u8],
rng: &mut R
) -> Result<Self::Output, SignatureError>
fn verify(
&self,
public_key: &Self::PublicKey,
message: &[u8],
signature: &Self::Output
) -> Result<bool, SignatureError>
[src]
&self,
public_key: &Self::PublicKey,
message: &[u8],
signature: &Self::Output
) -> Result<bool, SignatureError>
fn randomize_public_key(
&self,
_public_key: &Self::PublicKey,
_randomness: &[u8]
) -> Result<Self::PublicKey, SignatureError>
[src]
&self,
_public_key: &Self::PublicKey,
_randomness: &[u8]
) -> Result<Self::PublicKey, SignatureError>
fn randomize_signature(
&self,
_signature: &Self::Output,
_randomness: &[u8]
) -> Result<Self::Output, SignatureError>
[src]
&self,
_signature: &Self::Output,
_randomness: &[u8]
) -> Result<Self::Output, SignatureError>