Function keypair

Source
pub fn keypair() -> (PrivateKeys, PublicKeys)
Expand description

Generates a key pair using the default signature and encapsulation schemes.

This function creates a new key pair containing both signing and encapsulation (encryption) keys using the default cryptographic schemes:

  • Default signature scheme: Currently SignatureScheme::Schnorr
  • Default encapsulation scheme: Currently EncapsulationScheme::X25519

§Returns

A tuple containing:

  • PrivateKeys: The private keys for signing and encapsulation
  • PublicKeys: The corresponding public keys

§Example

use bc_components::keypair;

// Generate a key pair with default cryptographic schemes
let (private_keys, public_keys) = keypair();

// The private_keys can be used for signing and decryption
// The public_keys can be shared and used for verification and encryption