Skip to main content

Crate dcrypt

Crate dcrypt 

Source
Expand description

§dcrypt

A modular cryptographic library providing both traditional and post-quantum algorithms.

§Security status

Releases through v1.2.3 contain serious memory-safety, authentication, nonce-handling, and format vulnerabilities and must not be used for production cryptography. v2.0.0 contains important remediations but is withdrawn for violating the project’s implementation policy. v3.0.0 is the supported corrective release. Consult the workspace SECURITY.md and migration notes before use.

§Features

  • traditional (default): symmetric primitives plus ECDH, ECIES, ECDSA, Ed25519, and the standard BLS12-381 Basic/Aug/PoP and Eth2 profiles
  • post-quantum: final FIPS 203 ML-KEM and FIPS 204 ML-DSA
  • hybrid: Hybrid constructions combining traditional and post-quantum primitives (and therefore enables both categories)
  • alloc: allocation-backed APIs without the standard library
  • full: All features enabled

§Crate Structure

This is a facade crate that re-exports functionality from several sub-crates:

  • [dcrypt-algorithms]: Core algorithms (AES, SHA, etc.)
  • [dcrypt-symmetric]: Symmetric encryption
  • [dcrypt-kem]: Key Encapsulation Mechanisms
  • [dcrypt-sign]: Digital signatures
  • [dcrypt-pke]: Public Key Encryption
  • [dcrypt-hybrid]: Hybrid constructions

§Example Usage

// The category feature activates and re-exports the required crates.
use dcrypt::api::Signature;
use dcrypt::sign::mldsa::MlDsa44;

// Or using the prelude (always available)
use dcrypt::prelude::*;

Re-exports§

pub use dcrypt_api as api;
pub use dcrypt_common as common;
pub use dcrypt_internal as internal;
pub use dcrypt_params as params;
pub use dcrypt_algorithms as algorithms;
pub use dcrypt_symmetric as symmetric;
pub use dcrypt_kem as kem;
pub use dcrypt_sign as sign;
pub use dcrypt_pke as pke;

Modules§

prelude
Common imports for dcrypt users
traits
Trait definitions for cryptographic operations in dcrypt

Enums§

Error
Primary error type for cryptographic operations

Traits§

Signature
Core trait for digital signature algorithms

Type Aliases§

Result
Result type for cryptographic operations