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
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.
- 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.
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 [
Ed25519CertConstructor::encode_and_sign
]. - KeyUnknown
Cert - A parsed Ed25519 certificate. Maybe it includes its signing key; maybe it doesn’t.
- Parsed
Ed25519 Cert - A parsed
EncodedEd25519Cert
. - SshKey
Data - A public key or a keypair.
- Validated
Ed25519 Cert - A well-signed and timely
EncodedEd25519Cert
.
Enums§
- Cert
Data - A key certificate.
- Cert
Type - A type of certificate stored in the keystore.
- Error
- An Error type for this crate.
- Invalid
Cert Error - The error type returned by
ToEncodableCert::validate
. - KeyType
- A type of key stored in the key store.
- Keystore
Item - A public key, keypair, or key certificate.
- Keystore
Item Type - A type of item stored in a keystore.
- SshKey
Algorithm - SSH key algorithms.
Traits§
- Encodable
Item - A key that can be serialized to, and deserialized from.
- Item
Type - A trait for getting the type of an item.
- Keygen
- A trait for generating fresh keys.
- Keygen
Rng - A random number generator for generating
EncodableItem
s. - ToEncodable
Cert - A trait representing an encodable certificate.
- ToEncodable
Key - A key that can be converted to an
EncodableItem
.