massa_cipher/
lib.rs

1// Copyright (c) 2022 MASSA LABS <info@massa.net>
2
3//! MASSA Cipher crate
4//!
5//! `massa-cipher` uses AES-GCM
6//!
7//! AES-GCM is a state-of-the-art high-performance Authenticated Encryption with Associated Data (AEAD)
8//! that provides confidentiality and authenticity.
9//!
10//! To hash the password before using it as a cipher key, we use the `PBKDF2` key derivation function
11//! as specified in [RFC 2898](https://datatracker.ietf.org/doc/html/rfc2898).
12//!
13//! The AES-GCM crate we use has received one security audit by NCC Group, with no significant findings.
14
15mod constants;
16mod decrypt;
17mod encrypt;
18mod error;
19mod tests;
20
21pub use decrypt::decrypt;
22pub use encrypt::encrypt;
23pub use encrypt::CipherData;
24pub use error::CipherError;
25
26pub type Salt = [u8; constants::SALT_SIZE];