Skip to main content

Crate tor_key_forge

Crate tor_key_forge 

Source
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-forge crate.
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_Curve25519Keypair
Implement set of helper functions around a type wrapping an ed25519::Keypair.
derive_deftly_template_Ed25519Keypair
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§

Ed25519Cert
Structure for an Ed25519-signed certificate as described in Tor’s cert-spec.txt.
EncodedEd25519Cert
An encoded ed25519 certificate, created using Ed25519CertBuilder::encode_and_sign.
KeyUnknownCert
A parsed Ed25519 certificate. Maybe it includes its signing key; maybe it doesn’t.

Type Aliases§

ErasedKey
A type-erased key. Used by the tor-keymgr.
Result
A Result type for this crate.