Skip to main content

crypto_dispatch/algorithms/
mod.rs

1// SPDX-FileCopyrightText: Copyright © 2026 ReallyMe LLC. All rights reserved
2//
3// SPDX-License-Identifier: Apache-2.0
4
5/// AES-256-GCM AEAD adapter.
6#[cfg(feature = "aes")]
7pub mod aes256_gcm;
8/// AES-256-GCM-SIV AEAD adapter.
9#[cfg(feature = "aes-gcm-siv")]
10pub mod aes256_gcm_siv;
11/// ChaCha20-Poly1305 and XChaCha20-Poly1305 AEAD adapters.
12#[cfg(feature = "chacha20-poly1305")]
13pub mod chacha20_poly1305;
14/// Ed25519 signature adapter.
15#[cfg(feature = "ed25519")]
16pub mod ed25519;
17/// HMAC-SHA-256 and HMAC-SHA-512 adapters.
18#[cfg(feature = "hmac")]
19pub mod hmac;
20mod keypair_result;
21#[cfg(all(
22    any(
23        feature = "ed25519",
24        feature = "p256",
25        feature = "p384",
26        feature = "p521",
27        feature = "secp256k1",
28        feature = "ml-dsa-44",
29        feature = "ml-dsa-65",
30        feature = "ml-dsa-87"
31    ),
32    any(feature = "native", all(feature = "wasm", target_arch = "wasm32"))
33))]
34mod map_signature_error;
35/// ML-DSA-44 signature adapter.
36#[cfg(feature = "ml-dsa-44")]
37pub mod ml_dsa_44;
38/// ML-DSA-65 signature adapter.
39#[cfg(feature = "ml-dsa-65")]
40pub mod ml_dsa_65;
41/// ML-DSA-87 signature adapter.
42#[cfg(feature = "ml-dsa-87")]
43pub mod ml_dsa_87;
44/// ML-KEM-1024 key encapsulation adapter.
45#[cfg(feature = "ml-kem-1024")]
46pub mod ml_kem_1024;
47/// ML-KEM-512 key encapsulation adapter.
48#[cfg(feature = "ml-kem-512")]
49pub mod ml_kem_512;
50/// ML-KEM-768 key encapsulation adapter.
51#[cfg(feature = "ml-kem-768")]
52pub mod ml_kem_768;
53/// NIST P-256 (secp256r1) signature adapter.
54#[cfg(feature = "p256")]
55pub mod p256;
56/// NIST P-384 (secp384r1) signature adapter.
57#[cfg(feature = "p384")]
58pub mod p384;
59/// NIST P-521 (secp521r1) signature adapter.
60#[cfg(feature = "p521")]
61pub mod p521;
62/// secp256k1 signature adapter.
63#[cfg(feature = "secp256k1")]
64pub mod secp256k1;
65/// SHA-384 and SHA-512 (SHA-2) hash adapters.
66#[cfg(feature = "sha2")]
67pub mod sha2;
68/// SHA-256 (SHA-2) hash adapter.
69#[cfg(feature = "sha2")]
70pub mod sha2_256;
71/// SHA3-224, SHA3-384, and SHA3-512 hash adapters.
72#[cfg(feature = "sha3")]
73pub mod sha3;
74/// SHA3-256 hash adapter.
75#[cfg(feature = "sha3")]
76pub mod sha3_256;
77/// X25519 Diffie–Hellman adapter.
78#[cfg(feature = "x25519")]
79pub mod x25519;
80/// X-Wing hybrid KEM adapters.
81#[cfg(feature = "x-wing")]
82pub mod x_wing;
83
84#[allow(unused_imports)]
85pub(crate) use keypair_result::KeypairResultExt;
86#[cfg(all(
87    any(
88        feature = "ed25519",
89        feature = "p256",
90        feature = "p384",
91        feature = "p521",
92        feature = "secp256k1",
93        feature = "ml-dsa-44",
94        feature = "ml-dsa-65",
95        feature = "ml-dsa-87"
96    ),
97    any(feature = "native", all(feature = "wasm", target_arch = "wasm32"))
98))]
99pub(crate) use map_signature_error::map_verify_error;