aranya-keygen

Crates.ioaranya-keygen
lib.rsaranya-keygen
version2.0.0
created_at2024-10-16 21:46:06.457471+00
updated_at2025-08-20 18:51:55.428883+00
descriptionUtilities for generating crypto keys
homepage
repositoryhttps://github.com/aranya-project/aranya
max_upload_size
id1412382
size39,271
(aranya-project-bot)

documentation

README

Aranya Keygen

Crates.io Docs.rs License

A utility crate for generating cryptographic key bundles for Aranya. This crate provides:

  • Generation of secure cryptographic key bundles
  • Management of identity, encryption, and signing keys
  • Utilities for loading key bundles from storage

Overview

The aranya-keygen crate simplifies the process of generating and managing cryptographic keys for Aranya applications. It provides a unified interface to create key bundles containing:

  • Identity keys (for uniquely identifying devices)
  • Encryption keys (for secure data encryption)
  • Signing keys (for message authentication)

Usage

use anyhow::Result;
use aranya_crypto::{Engine, KeyStore};
use aranya_keygen::KeyBundle;

fn generate_keys<E, S>(engine: &mut E, store: &mut S) -> Result<()>
where
    E: Engine,
    S: KeyStore,
{
    // Generate a new key bundle
    let key_bundle = KeyBundle::generate(engine, store)?;
    
    // Load the public keys from the bundle
    let public_keys = key_bundle.public_keys(engine, store)?;
    
    // Use the public keys as needed
    // ...
    
    Ok(())
}
Commit count: 175

cargo fmt