| Crates.io | corevpn-crypto |
| lib.rs | corevpn-crypto |
| version | 0.1.0 |
| created_at | 2026-01-02 17:02:12.748739+00 |
| updated_at | 2026-01-02 17:02:12.748739+00 |
| description | Cryptographic primitives for CoreVPN - secure key exchange, encryption, and certificate handling |
| homepage | https://pegasusheavy.github.io/corevpn/ |
| repository | https://github.com/pegasusheavy/corevpn |
| max_upload_size | |
| id | 2018883 |
| size | 114,341 |
Cryptographic primitives for CoreVPN - secure key exchange, encryption, and certificate handling.
use corevpn_crypto::{CipherSuite, KeyMaterial, CertificateAuthority};
// Generate a Certificate Authority
let ca = CertificateAuthority::generate("My VPN CA", 3650)?;
// Generate server certificate
let (server_cert, server_key) = ca.generate_server_cert("vpn.example.com", 365)?;
// Generate client certificate
let (client_cert, client_key) = ca.generate_client_cert("user@example.com", 90)?;
// Create cipher suite for data channel
let cipher = CipherSuite::new_chacha20_poly1305(&key_material)?;
let encrypted = cipher.encrypt(&plaintext)?;
This crate uses only audited, pure-Rust cryptographic implementations:
x25519-dalek / ed25519-dalek for Curve25519 operationschacha20poly1305 / aes-gcm for AEAD encryptionring for additional cryptographic primitiveszeroize for secure memory handlingLicensed under either of:
at your option.