Files
arrayref
arrayvec
bamboo_rs_core
blake2b_simd
block_buffer
byteorder
cfg_if
constant_time_eq
cpufeatures
crossbeam_channel
crossbeam_deque
crossbeam_epoch
crossbeam_utils
curve25519_dalek
digest
doc_comment
ed25519
ed25519_dalek
either
generic_array
getrandom
hex
keccak
lazy_static
libc
lipmaa_link
memoffset
merlin
num_cpus
opaque_debug
ppv_lite86
proc_macro2
quote
rand
rand_chacha
rand_core
rayon
rayon_core
scopeguard
serde
serde_bytes
serde_derive
sha2
signature
snafu
snafu_derive
static_assertions
subtle
syn
synstructure
typenum
unicode_xid
varu64
yamf_hash
zeroize
zeroize_derive
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// -*- mode: rust; -*-
//
// This file is part of ed25519-dalek.
// Copyright (c) 2017-2019 isis lovecruft
// See LICENSE for licensing information.
//
// Authors:
// - isis agora lovecruft <isis@patternsinthevoid.net>

//! Common constants such as buffer sizes for keypairs and signatures.

/// The length of a ed25519 `Signature`, in bytes.
pub const SIGNATURE_LENGTH: usize = 64;

/// The length of a ed25519 `SecretKey`, in bytes.
pub const SECRET_KEY_LENGTH: usize = 32;

/// The length of an ed25519 `PublicKey`, in bytes.
pub const PUBLIC_KEY_LENGTH: usize = 32;

/// The length of an ed25519 `Keypair`, in bytes.
pub const KEYPAIR_LENGTH: usize = SECRET_KEY_LENGTH + PUBLIC_KEY_LENGTH;

/// The length of the "key" portion of an "expanded" ed25519 secret key, in bytes.
const EXPANDED_SECRET_KEY_KEY_LENGTH: usize = 32;

/// The length of the "nonce" portion of an "expanded" ed25519 secret key, in bytes.
const EXPANDED_SECRET_KEY_NONCE_LENGTH: usize = 32;

/// The length of an "expanded" ed25519 key, `ExpandedSecretKey`, in bytes.
pub const EXPANDED_SECRET_KEY_LENGTH: usize = EXPANDED_SECRET_KEY_KEY_LENGTH + EXPANDED_SECRET_KEY_NONCE_LENGTH;