Ghostkey Library (ghostkey_lib)
A Rust library for creating and managing ghost keys and certificates in the Freenet ecosystem.
Features
- Creation and verification of delegate certificates
- Creation and verification of ghost key certificates
- RSA and Ed25519 cryptographic operations
- Serialization and deserialization of certificates
Main Components
DelegateCertificateV1
: Represents a delegate certificate signed by a master keyGhostkeyCertificateV1
: Represents a ghost key certificate signed by a delegate keyArmorable
: Trait for serializing and deserializing objects to/from bytes and armored strings
Usage
Add this to your Cargo.toml
:
[]
= "0.1.2" # Replace with the latest version
Example usage:
use ;
use OsRng;
// Create a master key pair
let = create_keypair.unwrap;
// Create a delegate certificate
let info = "Test Delegate".to_string;
let =
new.unwrap;
// Create a ghost key certificate
let =
new;
// Verify the ghost key certificate
let verified_info = ghost_key_certificate
.verify
.unwrap;
assert_eq!;
License
ghostkey_lib
is released under the
GNU Lesser General Public License v3.0.