Class FrodoKeyGenSpec
java.lang.Object
zeroecho.core.alg.frodo.FrodoKeyGenSpec
- All Implemented Interfaces:
Describable, AlgorithmKeySpec
Key generation specification for FrodoKEM
FrodoKeyGenSpec defines the parameters required to generate a
FrodoKEM key pair. It encapsulates the choice of Frodo variant, which
determines security level, performance, and key sizes.
Variants
EachFrodoKeyGenSpec.Variant corresponds to a standardized FrodoKEM
parameter set:
FrodoKeyGenSpec.Variant.FRODO_640_AES- 128-bit security level using AES-based pseudorandomness.FrodoKeyGenSpec.Variant.FRODO_640_SHAKE- 128-bit security level using SHAKE instead of AES.FrodoKeyGenSpec.Variant.FRODO_976_AES- ~192-bit security level with AES-based pseudorandomness.FrodoKeyGenSpec.Variant.FRODO_976_SHAKE- ~192-bit security level with SHAKE.FrodoKeyGenSpec.Variant.FRODO_1344_AES- ~256-bit security level with AES-based pseudorandomness.FrodoKeyGenSpec.Variant.FRODO_1344_SHAKE- ~256-bit security level with SHAKE.
AES-based and SHAKE-based variants differ only in the pseudorandom generator used internally. Security levels are defined against both classical and quantum adversaries under the Learning With Errors (LWE) assumption.
Thread-safety
This class is immutable and therefore safe to share across threads.
- Since:
- 1.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumEnumerates the standardized FrodoKEM parameter sets. -
Method Summary
Modifier and TypeMethodDescriptionHuman-readable description of this spec.static FrodoKeyGenSpecConvenience factory for theFrodoKeyGenSpec.Variant.FRODO_1344_AESparameter set.static FrodoKeyGenSpecConvenience factory for theFrodoKeyGenSpec.Variant.FRODO_1344_SHAKEparameter set.static FrodoKeyGenSpecConvenience factory for theFrodoKeyGenSpec.Variant.FRODO_640_AESparameter set.static FrodoKeyGenSpecConvenience factory for theFrodoKeyGenSpec.Variant.FRODO_640_SHAKEparameter set.static FrodoKeyGenSpecConvenience factory for theFrodoKeyGenSpec.Variant.FRODO_976_AESparameter set.static FrodoKeyGenSpecConvenience factory for theFrodoKeyGenSpec.Variant.FRODO_976_SHAKEparameter set.static FrodoKeyGenSpecCreates a spec from a given variant.variant()Returns the Frodo variant.
-
Method Details
-
of
Creates a spec from a given variant.- Parameters:
v- Frodo variant to select- Returns:
- new key generation spec
-
frodo640aes
Convenience factory for theFrodoKeyGenSpec.Variant.FRODO_640_AESparameter set.- Returns:
- spec targeting 128-bit security with AES PRG
-
frodo640shake
Convenience factory for theFrodoKeyGenSpec.Variant.FRODO_640_SHAKEparameter set.- Returns:
- spec targeting 128-bit security with SHAKE PRG
-
frodo976aes
Convenience factory for theFrodoKeyGenSpec.Variant.FRODO_976_AESparameter set.- Returns:
- spec targeting ~192-bit security with AES PRG
-
frodo976shake
Convenience factory for theFrodoKeyGenSpec.Variant.FRODO_976_SHAKEparameter set.- Returns:
- spec targeting ~192-bit security with SHAKE PRG
-
frodo1344aes
Convenience factory for theFrodoKeyGenSpec.Variant.FRODO_1344_AESparameter set.- Returns:
- spec targeting ~256-bit security with AES PRG
-
frodo1344shake
Convenience factory for theFrodoKeyGenSpec.Variant.FRODO_1344_SHAKEparameter set.- Returns:
- spec targeting ~256-bit security with SHAKE PRG
-
variant
-
description
Human-readable description of this spec.The value is simply the
Enum.toString()of the chosen parameter set (e.g.,"FRODO_640_AES").- Specified by:
descriptionin interfaceDescribable- Returns:
- string description of the variant
-