Runar Keys
Standards-compliant key and certificate management for the Runar network.
Highlights
- X.509 certificates with proper CA hierarchy (user/mobile CA → node certs)
- Single cryptographic suite: ECDSA P-256 for signing; AES-GCM for symmetric
- CSR-based issuance and full signature/validity verification
- Envelope encryption helpers for network and profile keys
Install
[]
= "0.1"
Quick start
use ;
use ;
use Arc;
let logger = new;
let mut mobile = new?;
// Initialize mobile user identity and derive agreement pubkey
let _user_agreement_pub = mobile.initialize_user_identity?;
// Node side: generate key pair and CSR subject
let subject = "CN=node-123,O=Runar,C=US";
let node_key = new?;
let csr_der = create?;
// Simulated setup token
let setup = SetupToken ;
// Mobile issues the certificate
let msg = mobile.process_setup_token?;
mobile.validate_certificate?;
Envelope encryption
// Generate a network data key and encrypt data for the network and profile
let network_id = mobile.generate_network_data_key?;
let profile_pub = mobile.derive_user_profile_key?;
let env = mobile.encrypt_with_envelope?;
let pt = mobile.decrypt_with_network?;
assert_eq!;
MSRV
Minimum supported Rust version: 1.70.0
License
MIT license. See LICENSE.