Tor 0.4.9.8
Loading...
Searching...
No Matches
x25519_sizes.h File Reference

Definitions for sizes of x25519 keys and elements. More...

Go to the source code of this file.

Macros

#define CURVE25519_PUBKEY_LEN   32
 
#define CURVE25519_SECKEY_LEN   32
 
#define CURVE25519_OUTPUT_LEN   32
 
#define ED25519_PUBKEY_LEN   32
 
#define ED25519_SECKEY_LEN   64
 
#define ED25519_SECKEY_SEED_LEN   32
 
#define ED25519_SIG_LEN   64
 
#define CURVE25519_BASE64_PADDED_LEN   44
 
#define CURVE25519_BASE64_LEN   43
 
#define ED25519_BASE64_LEN   43
 
#define ED25519_SIG_BASE64_LEN   86
 

Detailed Description

Definitions for sizes of x25519 keys and elements.

Tor uses these definitions throughout its codebase, even in parts that don't actually do any x25519 calculations.

Definition in file x25519_sizes.h.

Macro Definition Documentation

◆ CURVE25519_BASE64_LEN

#define CURVE25519_BASE64_LEN   43

Length of a Curve25519 key when encoded in base 64, without padding.

Definition at line 40 of file x25519_sizes.h.

Referenced by curve25519_public_from_base64(), and curve25519_public_to_base64().

◆ CURVE25519_BASE64_PADDED_LEN

#define CURVE25519_BASE64_PADDED_LEN   44

◆ CURVE25519_OUTPUT_LEN

◆ CURVE25519_PUBKEY_LEN

◆ CURVE25519_SECKEY_LEN

#define CURVE25519_SECKEY_LEN   32

Length of a curve25519 secret key when encoded.

Definition at line 22 of file x25519_sizes.h.

Referenced by curve25519_keypair_read_from_file(), curve25519_keypair_write_to_file(), curve25519_rand_seckey_bytes(), and parse_auth_file_content().

◆ ED25519_BASE64_LEN

◆ ED25519_PUBKEY_LEN

#define ED25519_PUBKEY_LEN   32

◆ ED25519_SECKEY_LEN

#define ED25519_SECKEY_LEN   64

Length of an Ed25519 secret key

Definition at line 29 of file x25519_sizes.h.

Referenced by ed25519_impl_spot_check(), hs_build_blinded_keypair(), and load_ed_keys().

◆ ED25519_SECKEY_SEED_LEN

#define ED25519_SECKEY_SEED_LEN   32

Length of the seed that is ordinarily expanded to an Ed25519 secret key.

Definition at line 32 of file x25519_sizes.h.

◆ ED25519_SIG_BASE64_LEN

#define ED25519_SIG_BASE64_LEN   86

Length of a Ed25519 signature when encoded in base 64, without padding.

Definition at line 45 of file x25519_sizes.h.

Referenced by desc_encode_v3(), desc_sig_is_valid(), ed25519_signature_from_base64(), ed25519_signature_to_base64(), extrainfo_dump_to_string_ed_sig_helper(), and router_dump_router_to_string().

◆ ED25519_SIG_LEN