#![cfg_attr(not(feature = "std"), no_std)]
#![forbid(unsafe_code)]
#![deny(missing_docs)]
#[cfg(feature = "alloc")]
extern crate alloc;
pub mod error;
pub use error::{validate, Error, Result, ResultExt, SecureErrorHandling};
pub mod block;
pub use block::{Aes128, Aes192, Aes256, Cbc, Ctr};
pub mod hash;
pub use hash::{
Blake2b, Blake2s, Keccak256, Sha1, Sha224, Sha256, Sha384, Sha3_224, Sha3_256, Sha3_384,
Sha3_512, Sha512, Shake128, Shake256,
};
#[cfg(feature = "alloc")]
pub mod aead;
#[cfg(feature = "alloc")]
pub use aead::{AeadCipher, ChaCha20Poly1305, ChaCha20Poly1305Cipher, Gcm, XChaCha20Poly1305};
pub mod mac;
pub use mac::{Hmac, Poly1305};
pub mod stream;
pub use stream::chacha::chacha20::ChaCha20;
#[cfg(feature = "alloc")]
pub mod kdf;
#[cfg(feature = "alloc")]
pub use kdf::{Argon2, Hkdf, KeyDerivationFunction, PasswordHashFunction, Pbkdf2};
pub mod ec;
pub use ec::{
p256,
p384,
p521,
P256Point,
P256Scalar,
P384Point,
P384Scalar,
P521Point,
P521Scalar,
};
pub mod types;
pub use types::{
ByteSerializable, ConstantTimeEq, Digest, FixedSize, Nonce, RandomGeneration, Salt,
SecretBytes, SecureZeroingType, Tag,
};
pub use dcrypt_common::security::{
barrier, EphemeralSecret, SecretBuffer, SecretVec, SecureCompare, SecureOperation,
SecureOperationBuilder, SecureOperationExt, ZeroizeGuard,
};
pub use types::{
algorithms::{
Aes128 as Aes128Algorithm, Aes256 as Aes256Algorithm, ChaCha20 as ChaCha20Algorithm,
ChaCha20Poly1305 as ChaCha20Poly1305Algorithm, Ed25519 as Ed25519Algorithm,
P521 as P521Algorithm, X25519 as X25519Algorithm,
},
digest::{Blake2bCompatible, Keccak256Compatible, Sha256Compatible, Sha512Compatible},
key::{AsymmetricPublicKey, AsymmetricSecretKey, SymmetricKey},
nonce::{AesCtrCompatible, AesGcmCompatible, ChaCha20Compatible, XChaCha20Compatible},
salt::{Argon2Compatible, HkdfCompatible, Pbkdf2Compatible},
tag::{ChaCha20Poly1305Compatible, GcmCompatible, HmacCompatible, Poly1305Compatible},
};
#[cfg(feature = "xof")]
pub mod xof;
#[cfg(feature = "xof")]
pub use xof::{Blake3Xof, ExtendableOutputFunction, ShakeXof128, ShakeXof256};
#[cfg(feature = "alloc")] pub mod poly;
#[cfg(feature = "alloc")]
pub use poly::{
ntt::{montgomery_reduce, CooleyTukeyNtt, InverseNttOperator, NttOperator},
params::{DilithiumParams, Kyber256Params, Modulus, NttModulus},
polynomial::Polynomial,
prelude,
sampling::{CbdSampler, DefaultSamplers, GaussianSampler, UniformSampler},
serialize::{CoefficientPacker, CoefficientUnpacker, DefaultCoefficientSerde},
};
#[cfg(feature = "alloc")]
pub mod lattice;
#[cfg(feature = "alloc")]
pub mod code;
#[cfg(feature = "alloc")]
pub mod mq;