Module tor_crypto

Source
Expand description

Tor-specific cryptographic primitives, operations, and conversion functions.

Structs§

Ed25519PrivateKey
An ed25519 private key.
Ed25519PublicKey
An ed25519 public key.
Ed25519Signature
An ed25519 cryptographic signature
V3OnionServiceId
A v3 onion-service id
X25519PrivateKey
An x25519 private key
X25519PublicKey
An x25519 public key

Enums§

Error
Represents various errors that can occur in the tor_crypto module.
SignBit
An enum representing a single bit

Constants§

ED25519_PRIVATE_KEYBLOB_BASE64_LENGTH
The number of bytes needed to store base64 encoded ed25519 private key as an ASCII c-string (not including null-terminator)
ED25519_PRIVATE_KEY_KEYBLOB_HEADER_LENGTH
The number of bytes needed to store the keyblob header
ED25519_PRIVATE_KEY_KEYBLOB_LENGTH
The number of bytes needed to store ed25519 private keyblob as an ASCII c-string (not including a null terminator)
ED25519_PRIVATE_KEY_KEYBLOB_SIZE
The number of bytes needed to store ed25519 private keyblob as an ASCII c-string (including a null terminator)
ED25519_PRIVATE_KEY_SIZE
The number of bytes in an ed25519 secret key cbindgen:ignore
ED25519_PUBLIC_KEY_SIZE
The number of bytes in an ed25519 public key cbindgen:ignore
ED25519_SIGNATURE_SIZE
The number of bytes in an ed25519 signature cbindgen:ignore
V3_ONION_SERVICE_ID_STRING_LENGTH
The number of bytes needed to store onion service id as an ASCII c-string (not including null-terminator)
V3_ONION_SERVICE_ID_STRING_SIZE
The number of bytes needed to store onion service id as an ASCII c-string (including null-terminator)
X25519_PRIVATE_KEY_BASE64_LENGTH
The number of bytes needed to store base64 encoded x25519 private key as an ASCII c-string (not including null-terminator)
X25519_PRIVATE_KEY_BASE64_SIZE
The number of bytes needed to store base64 encoded x25519 private key as an ASCII c-string (including a null terminator)
X25519_PRIVATE_KEY_SIZE
The number of bytes in an x25519 private key cbindgen:ignore
X25519_PUBLIC_KEY_BASE32_LENGTH
The number of bytes needed to store base32 encoded x25519 public key as an ASCII c-string (not including null-terminator)
X25519_PUBLIC_KEY_BASE32_SIZE
The number of bytes needed to store base32 encoded x25519 public key as an ASCII c-string (including a null terminator)
X25519_PUBLIC_KEY_SIZE
The number of bytes in an x25519 publickey cbindgen:ignore