Class HqcKeyGenSpec
java.lang.Object
zeroecho.core.alg.hqc.HqcKeyGenSpec
- All Implemented Interfaces:
Describable, AlgorithmKeySpec
HQC Key Generation Specification
Algorithm-specificAlgorithmKeySpec for generating
HQC (Hamming Quasi-Cyclic) key pairs. HQC is a post-quantum key encapsulation
mechanism based on error-correcting codes and provides IND-CCA2 security.
An HqcKeyGenSpec selects one of the parameter sets standardized for
HQC: 128-, 192-, or 256-bit security. The chosen variant determines key
sizes, ciphertext lengths, and shared secret size.
Variants
HqcKeyGenSpec.Variant.HQC_128- 128-bit classical / ~64-bit quantum security.HqcKeyGenSpec.Variant.HQC_192- 192-bit classical / ~96-bit quantum security.HqcKeyGenSpec.Variant.HQC_256- 256-bit classical / ~128-bit quantum security.
Usage
// Create a spec for HQC-256 key generation
HqcKeyGenSpec spec = HqcKeyGenSpec.hqc256();
// Generate a key pair via HqcAlgorithm
HqcAlgorithm hqc = new HqcAlgorithm();
KeyPair kp = hqc.asymmetricKeyPairGenerator(HqcKeyGenSpec.class).generateKeyPair(spec);
- Since:
- 1.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumEnumeration of HQC parameter sets. -
Method Summary
Modifier and TypeMethodDescriptionReturns a textual description of this spec.static HqcKeyGenSpechqc128()Returns a specification for the HQC-128 parameter set.static HqcKeyGenSpechqc192()Returns a specification for the HQC-192 parameter set.static HqcKeyGenSpechqc256()Returns a specification for the HQC-256 parameter set.static HqcKeyGenSpecCreates a specification for the given HQC parameter set.variant()Returns the selected HQC variant.
-
Method Details
-
of
Creates a specification for the given HQC parameter set.- Parameters:
v- selected variant- Returns:
- new
HqcKeyGenSpecfor the chosen variant
-
hqc128
Returns a specification for the HQC-128 parameter set.- Returns:
- spec for HQC-128
-
hqc192
Returns a specification for the HQC-192 parameter set.- Returns:
- spec for HQC-192
-
hqc256
Returns a specification for the HQC-256 parameter set.- Returns:
- spec for HQC-256
-
variant
Returns the selected HQC variant. -
description
Returns a textual description of this spec.The description is the
Enum.toString()value, e.g."HQC_256".- Specified by:
descriptionin interfaceDescribable- Returns:
- human-readable description of the spec
-