ntrust_native/
api.rs

1//! Global constants that are part of the API (i.e. array sizes)
2
3#[cfg(feature = "ntruhps2048509")]
4/// The number of bytes required to store the public key
5pub const CRYPTO_PUBLICKEYBYTES: usize = 699;
6#[cfg(feature = "ntruhps2048509")]
7/// The number of bytes required to store the secret key
8pub const CRYPTO_SECRETKEYBYTES: usize = 935;
9#[cfg(feature = "ntruhps2048509")]
10/// The number of bytes required to store the ciphertext resulting from the encryption
11pub const CRYPTO_CIPHERTEXTBYTES: usize = 699;
12#[cfg(feature = "ntruhps2048509")]
13/// Name of the variant
14pub const CRYPTO_ALGNAME: &str = "ntruhps2048509";
15
16#[cfg(feature = "ntruhps2048677")]
17/// The number of bytes required to store the public key
18pub const CRYPTO_PUBLICKEYBYTES: usize = 930;
19#[cfg(feature = "ntruhps2048677")]
20/// The number of bytes required to store the secret key
21pub const CRYPTO_SECRETKEYBYTES: usize = 1234;
22#[cfg(feature = "ntruhps2048677")]
23/// The number of bytes required to store the ciphertext resulting from the encryption
24pub const CRYPTO_CIPHERTEXTBYTES: usize = 930;
25#[cfg(feature = "ntruhps2048677")]
26/// Name of the variant
27pub const CRYPTO_ALGNAME: &str = "ntruhps2048677";
28
29#[cfg(feature = "ntruhps4096821")]
30/// The number of bytes required to store the public key
31pub const CRYPTO_PUBLICKEYBYTES: usize = 1230;
32#[cfg(feature = "ntruhps4096821")]
33/// The number of bytes required to store the secret key
34pub const CRYPTO_SECRETKEYBYTES: usize = 1590;
35#[cfg(feature = "ntruhps4096821")]
36/// The number of bytes required to store the ciphertext resulting from the encryption
37pub const CRYPTO_CIPHERTEXTBYTES: usize = 1230;
38#[cfg(feature = "ntruhps4096821")]
39/// Name of the variant
40pub const CRYPTO_ALGNAME: &str = "ntruhps4096821";
41
42#[cfg(feature = "ntruhrss701")]
43/// The number of bytes required to store the public key
44pub const CRYPTO_PUBLICKEYBYTES: usize = 1138;
45#[cfg(feature = "ntruhrss701")]
46/// The number of bytes required to store the secret key
47pub const CRYPTO_SECRETKEYBYTES: usize = 1450;
48#[cfg(feature = "ntruhrss701")]
49/// The number of bytes required to store the ciphertext resulting from the encryption
50pub const CRYPTO_CIPHERTEXTBYTES: usize = 1138;
51#[cfg(feature = "ntruhrss701")]
52/// Name of the variant
53pub const CRYPTO_ALGNAME: &str = "ntruhrss701";
54
55/// The number of bytes required to store the negotiated/shared key
56pub const CRYPTO_BYTES: usize = 32;