massa_cipher/
constants.rs

1// Copyright (c) 2022 MASSA LABS <info@massa.net>
2
3//! massa-cipher constant values.
4//!
5//! Read `lib.rs` module documentation for more information.
6
7use pbkdf2::Params;
8
9/// AES-GCM-SIV nonce size.
10///
11/// A nonce is a single-use value which enables securely encrypting multiple messages under the same key.
12/// Nonces need not be random: a counter can be used so long as the values are never repeated under the same key.
13pub const NONCE_SIZE: usize = 12;
14
15/// `PBKDF2` salt size.
16pub const SALT_SIZE: usize = 16;
17
18/// `PBKDF2` hash parameters.
19pub const HASH_PARAMS: Params = Params {
20    rounds: 600_000,
21    output_length: 32,
22};