Expand description
§tor-keys
Crate for the cryptographic keys in the Tor landscape.
§Overview
The tor-keys crate manages all high level wrappers around lower-level
cryptographic primitives found in tor-llcrypto.
More specifically, wrappers are used in order to bring semantic on top of lower-level crypto keys which helps avoid mixing keys in the code base.
For example, defining a long term identity relay signing keypair around a lower level ed25519 keypair makes it so that we can’t use that key to be used for another purpose.
This crate is part of Arti, a project to implement Tor in Rust.
License: MIT OR Apache-2.0
Re-exports§
pub use certs::CertData;pub use certs::ParsedEd25519Cert;pub use certs::ValidatedEd25519Cert;pub use err::Error;pub use key_type::CertType;pub use key_type::KeyType;pub use key_type::KeystoreItemType;pub use ssh::SshKeyAlgorithm;pub use ssh::SshKeyData;pub use traits::EncodableItem;pub use traits::InvalidCertError;pub use traits::ItemType;pub use traits::Keygen;pub use traits::KeygenRng;pub use traits::KeystoreItem;pub use traits::ToEncodableCert;pub use traits::ToEncodableKey;
Modules§
- certs 🔒
- Helpers for encoding certificate material.
- err 🔒
- An error type for the
tor-key-forgecrate. - key_
type 🔒 - This module defines the key types that can be written to a
Keystore. - macros 🔒
- Macros that can be used to improve your life with regards to crypto.
- ssh 🔒
- Shared OpenSSH helpers.
- traits 🔒
- All the traits of this crate.
Macros§
- define_
curve25519_ keypair - Create a curve25519 keypair wrapper given a visibility and a struct name.
- define_
ed25519_ keypair - Create an ed25519 keypair wrapper given a visibility and a struct name.
- define_
rsa_ keypair - Create an RSA keypair wrapper given a visibility and a struct name.
- derive_
deftly_ template_ Curve25519 Keypair - Implement set of helper functions around a type wrapping an ed25519::Keypair.
- derive_
deftly_ template_ Ed25519 Keypair - Implement set of helper functions around a type wrapping an ed25519::Keypair.
- derive_
deftly_ template_ RsaKeypair - Implement set of helper functions around a type wrapping a rsa::KeyPair.
Structs§
- Ed25519
Cert - Structure for an Ed25519-signed certificate as described in Tor’s cert-spec.txt.
- Encoded
Ed25519 Cert - An encoded ed25519 certificate,
created using
Ed25519CertBuilder::encode_and_sign. - KeyUnknown
Cert - A parsed Ed25519 certificate. Maybe it includes its signing key; maybe it doesn’t.