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

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.
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.

Structs§

Ed25519Cert
Structure for an Ed25519-signed certificate as described in Tor’s cert-spec.txt.
EncodedEd25519Cert
An encoded ed25519 certificate, created using [Ed25519CertConstructor::encode_and_sign].
KeyUnknownCert
A parsed Ed25519 certificate. Maybe it includes its signing key; maybe it doesn’t.
ParsedEd25519Cert
A parsed EncodedEd25519Cert.
SshKeyData
A public key or a keypair.
ValidatedEd25519Cert
A well-signed and timely EncodedEd25519Cert.

Enums§

CertData
A key certificate.
CertType
A type of certificate stored in the keystore.
Error
An Error type for this crate.
InvalidCertError
The error type returned by ToEncodableCert::validate.
KeyType
A type of key stored in the key store.
KeystoreItem
A public key, keypair, or key certificate.
KeystoreItemType
A type of item stored in a keystore.
SshKeyAlgorithm
SSH key algorithms.

Traits§

EncodableItem
A key that can be serialized to, and deserialized from.
ItemType
A trait for getting the type of an item.
Keygen
A trait for generating fresh keys.
KeygenRng
A random number generator for generating EncodableItems.
ToEncodableCert
A trait representing an encodable certificate.
ToEncodableKey
A key that can be converted to an EncodableItem.

Type Aliases§

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