Module schnorr

Module schnorr 

Source
Expand description

Schnorr signatures for simplicity and provable security.

Schnorr signatures provide:

  • Simpler construction than EdDSA with cleaner security proofs
  • Provable security under the discrete logarithm assumption
  • Native support for threshold signatures
  • Batch verification support
  • Linear signature aggregation

§Example

use chie_crypto::schnorr::{SchnorrKeypair, batch_verify};

// Generate a keypair
let keypair = SchnorrKeypair::generate();
let message = b"Hello, Schnorr!";

// Sign a message
let signature = keypair.sign(message);

// Verify the signature
assert!(keypair.verify(message, &signature).is_ok());

// Batch verification
let items = vec![
    (keypair.public_key(), message.as_slice(), signature),
];
assert!(batch_verify(&items).is_ok());

Structs§

SchnorrKeypair
Schnorr keypair (secret key + public key)
SchnorrPublicKey
Schnorr public key (point in the Ristretto group)
SchnorrSecretKey
Schnorr secret key (scalar in the Ristretto group)
SchnorrSignature
Schnorr signature (challenge + response)

Enums§

SchnorrError
Schnorr signature error types

Functions§

aggregate_signatures
Aggregate multiple Schnorr signatures for the same message
batch_verify
Batch verify multiple Schnorr signatures
verify
Verify a Schnorr signature against a public key and message

Type Aliases§

SchnorrResult