#[repr(u16)]pub enum Algorithm {
Show 33 variants
Classical = 80,
PasswordClassical = 81,
Hybrid = 256,
PostQuantum = 512,
MultiAlgorithm = 513,
MlKem1024 = 514,
MultiKem = 515,
MultiKemTriple = 516,
QuadLayer = 517,
LatticeCodeHybrid = 518,
Pq3Stack = 519,
MaxSecureLightweight = 768,
MaxSecurePurePq = 769,
MaxSecureHybrid = 770,
MaxSecureStateless = 771,
MaxSecureCryptoAgile = 772,
MaxSecurePqcZk = 773,
MaxSecureHybridTransition = 774,
FnDsa512Compact = 1_024,
FnDsa1024Security = 1_025,
FnDsaFpHardened = 1_026,
FnDsaDualSignature = 1_027,
FnDsaTransition = 1_028,
FnDsaZk = 1_029,
FnDsaZkStack = 1_030,
FnDsaTransitionStack = 1_031,
QuantumLatticeFusion = 1_280,
PostZkHomomorphic = 1_281,
QuantumResistantConsensus = 1_282,
EntropyOrchestrated = 1_283,
LatticeCodeHybridFn = 1_284,
AiSynthesizedCryptoAgile = 1_285,
Experimental = 1_286,
}Expand description
Supported cryptographic algorithms with unique identifiers
Each algorithm has a unique 16-bit identifier used in the binary format. Identifiers are grouped by algorithm family for easy categorization.
Variants§
Classical = 80
Classical cryptography: X25519 + Ed25519 + AES-256-GCM
PasswordClassical = 81
Password-based classical encryption
Hybrid = 256
Hybrid: ML-KEM-1024 + X25519 + ML-DSA-87 + Ed25519 + AES-256-GCM
PostQuantum = 512
Post-quantum: ML-KEM-1024 + ML-DSA-87 + AES-256-GCM
MultiAlgorithm = 513
Multi-algorithm runtime selection
MlKem1024 = 514
ML-KEM-1024 with AES-256-GCM
MultiKem = 515
Multi-KEM dual layer
MultiKemTriple = 516
Multi-KEM triple layer
QuadLayer = 517
Quad-layer redundant security
LatticeCodeHybrid = 518
Lattice-Code hybrid stack
Pq3Stack = 519
PQ3-Stack with forward secrecy
MaxSecureLightweight = 768
Max Secure: PQ Lightweight
MaxSecurePurePq = 769
Max Secure: Pure PQ
MaxSecureHybrid = 770
Max Secure: Hybrid Transition
MaxSecureStateless = 771
Max Secure: Stateless
MaxSecureCryptoAgile = 772
Max Secure: Crypto-Agile
MaxSecurePqcZk = 773
Max Secure: PQC + Zero-Knowledge
MaxSecureHybridTransition = 774
Max Secure: Hybrid Transition
FnDsa512Compact = 1_024
FN-DSA 512: Compact
FnDsa1024Security = 1_025
FN-DSA 1024: High-Security
FnDsaFpHardened = 1_026
FN-DSA: Floating-Point Hardened
FnDsaDualSignature = 1_027
FN-DSA: Dual Signature
FnDsaTransition = 1_028
FN-DSA: Transition Stack
FnDsaZk = 1_029
FN-DSA + Zero-Knowledge Stack
FnDsaZkStack = 1_030
FN-DSA + ZK Stack Enhanced
FnDsaTransitionStack = 1_031
FN-DSA: Transition Stack Enhanced
QuantumLatticeFusion = 1_280
Quantum-Inspired Lattice Fusion
PostZkHomomorphic = 1_281
Post-ZK Homomorphic with LFHE 2023
QuantumResistantConsensus = 1_282
Quantum-Resistant Consensus
EntropyOrchestrated = 1_283
Entropy-Orchestrated PQ Stack
LatticeCodeHybridFn = 1_284
Lattice-Code Hybrid FN
AiSynthesizedCryptoAgile = 1_285
AI-Synthesized Crypto-Agile
Experimental = 1_286
Experimental Engine (generic)
Implementations§
Source§impl Algorithm
impl Algorithm
Sourcepub fn from_id(id: u16) -> Option<Self>
pub fn from_id(id: u16) -> Option<Self>
Convert u16 identifier to Algorithm enum
§Example
use pqc_binary_format::Algorithm;
let algo = Algorithm::from_id(0x0100).unwrap();
assert_eq!(algo, Algorithm::Hybrid);Sourcepub const fn as_id(self) -> u16
pub const fn as_id(self) -> u16
Get u16 identifier for this algorithm
§Example
use pqc_binary_format::Algorithm;
assert_eq!(Algorithm::Hybrid.as_id(), 0x0100);Sourcepub const fn name(self) -> &'static str
pub const fn name(self) -> &'static str
Get human-readable name for this algorithm
§Example
use pqc_binary_format::Algorithm;
assert_eq!(Algorithm::Hybrid.name(), "Hybrid");Sourcepub const fn is_experimental(self) -> bool
pub const fn is_experimental(self) -> bool
Check if this algorithm is marked as experimental
Experimental algorithms may have reduced security guarantees and are intended for research purposes.