Class SntruPrimeKeyGenSpec
java.lang.Object
zeroecho.core.alg.ntruprime.SntruPrimeKeyGenSpec
- All Implemented Interfaces:
Describable, AlgorithmKeySpec
Algorithm-specific key generation parameters for SNTRU Prime.
SntruPrimeKeyGenSpec selects one of the standardized parameter
variants of the SNTRU Prime key encapsulation mechanism. Each variant
determines the security level, key sizes, and performance characteristics of
the generated key pair.
Variants
SntruPrimeKeyGenSpec.Variant.SNTRUP653: ~128-bit classical security.SntruPrimeKeyGenSpec.Variant.SNTRUP761: ~192-bit security.SntruPrimeKeyGenSpec.Variant.SNTRUP857: ~256-bit security.SntruPrimeKeyGenSpec.Variant.SNTRUP953,SntruPrimeKeyGenSpec.Variant.SNTRUP1013,SntruPrimeKeyGenSpec.Variant.SNTRUP1277: larger sets providing higher security margins with larger keys and ciphertexts.
Instances are immutable and passed to
KeyBuilders.Asymmetric.generateKeyPair(String, AlgorithmKeySpec).
Static factory methods are provided for each variant.
Example
KeyPair kp = session.keyBuilders().asymmetric()
.generateKeyPair("SNTRUPrime", SntruPrimeKeyGenSpec.sntrup761());
- Since:
- 1.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumEnumeration of supported SNTRU Prime parameter sets. -
Method Summary
Modifier and TypeMethodDescriptionReturns a textual description of this specification.static SntruPrimeKeyGenSpecCreates a specification from the given variant.static SntruPrimeKeyGenSpecCreates a key generation specification for theSntruPrimeKeyGenSpec.Variant.SNTRUP1013parameter set.static SntruPrimeKeyGenSpecCreates a key generation specification for theSntruPrimeKeyGenSpec.Variant.SNTRUP1277parameter set.static SntruPrimeKeyGenSpecCreates a key generation specification for theSntruPrimeKeyGenSpec.Variant.SNTRUP653parameter set.static SntruPrimeKeyGenSpecCreates a key generation specification for theSntruPrimeKeyGenSpec.Variant.SNTRUP761parameter set.static SntruPrimeKeyGenSpecCreates a key generation specification for theSntruPrimeKeyGenSpec.Variant.SNTRUP857parameter set.static SntruPrimeKeyGenSpecCreates a key generation specification for theSntruPrimeKeyGenSpec.Variant.SNTRUP953parameter set.variant()Returns the selected variant for this specification.
-
Method Details
-
of
Creates a specification from the given variant.- Parameters:
v- selected SNTRU Prime parameter set- Returns:
- new specification bound to
v - Throws:
NullPointerException- ifvisnull
-
sntrup653
Creates a key generation specification for theSntruPrimeKeyGenSpec.Variant.SNTRUP653parameter set.- Returns:
- a new specification targeting
SNTRUP653
-
sntrup761
Creates a key generation specification for theSntruPrimeKeyGenSpec.Variant.SNTRUP761parameter set.- Returns:
- a new specification targeting
SNTRUP761
-
sntrup857
Creates a key generation specification for theSntruPrimeKeyGenSpec.Variant.SNTRUP857parameter set.- Returns:
- a new specification targeting
SNTRUP857
-
sntrup953
Creates a key generation specification for theSntruPrimeKeyGenSpec.Variant.SNTRUP953parameter set.- Returns:
- a new specification targeting
SNTRUP953
-
sntrup1013
Creates a key generation specification for theSntruPrimeKeyGenSpec.Variant.SNTRUP1013parameter set.- Returns:
- a new specification targeting
SNTRUP1013
-
sntrup1277
Creates a key generation specification for theSntruPrimeKeyGenSpec.Variant.SNTRUP1277parameter set.- Returns:
- a new specification targeting
SNTRUP1277
-
variant
Returns the selected variant for this specification.- Returns:
- variant of SNTRU Prime key parameters
-
description
Returns a textual description of this specification.The description is the variant name (e.g.,
"SNTRUP761").- Specified by:
descriptionin interfaceDescribable- Returns:
- variant name string
-