Class NtruKeyGenSpec
java.lang.Object
zeroecho.core.alg.ntru.NtruKeyGenSpec
- All Implemented Interfaces:
Describable, AlgorithmKeySpec
NtruKeyGenSpec selects an NTRU parameter set for key pair generation.
This specification is consumed by the asymmetric key builder registered by
NtruAlgorithm. Each factory method corresponds to a concrete
parameter set from the NTRU-HPS or NTRU-HRSS families. Larger parameter sets
generally trade bigger keys and ciphertexts for higher security margins.
Usage
// Choose a parameter set and generate a key pair
NtruAlgorithm alg = new NtruAlgorithm();
KeyPair kp = alg.asymmetricKeyPairGenerator(NtruKeyGenSpec.class)
.generateKeyPair(NtruKeyGenSpec.hrss701());
Instances are immutable and can be safely reused across threads.
- Since:
- 1.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumVariant enumerates supported NTRU parameter sets for key generation. -
Method Summary
Modifier and TypeMethodDescriptionReturns a short, human-readable description of the selected parameter set.static NtruKeyGenSpecReturns a spec for the NTRU-HPS-2048-509 parameter set.static NtruKeyGenSpecReturns a spec for the NTRU-HPS-2048-677 parameter set.static NtruKeyGenSpecReturns a spec for the NTRU-HPS-4096-1229 parameter set.static NtruKeyGenSpecReturns a spec for the NTRU-HPS-4096-821 parameter set.static NtruKeyGenSpechrss1373()Returns a spec for the NTRU-HRSS-1373 parameter set.static NtruKeyGenSpechrss701()Returns a spec for the NTRU-HRSS-701 parameter set.variant()Returns the selected NTRU parameter variant.
-
Method Details
-
hps2048_509
Returns a spec for the NTRU-HPS-2048-509 parameter set.- Returns:
- a new key generation spec for HPS-2048-509
-
hps2048_677
Returns a spec for the NTRU-HPS-2048-677 parameter set.- Returns:
- a new key generation spec for HPS-2048-677
-
hps4096_821
Returns a spec for the NTRU-HPS-4096-821 parameter set.- Returns:
- a new key generation spec for HPS-4096-821
-
hps4096_1229
Returns a spec for the NTRU-HPS-4096-1229 parameter set.- Returns:
- a new key generation spec for HPS-4096-1229
-
hrss701
Returns a spec for the NTRU-HRSS-701 parameter set.This is a sensible default in many deployments when an HRSS choice is desired.
- Returns:
- a new key generation spec for HRSS-701
-
hrss1373
Returns a spec for the NTRU-HRSS-1373 parameter set.- Returns:
- a new key generation spec for HRSS-1373
-
variant
Returns the selected NTRU parameter variant.- Returns:
- the variant represented by this spec
-
description
Returns a short, human-readable description of the selected parameter set.- Specified by:
descriptionin interfaceDescribable- Returns:
- the variant name as a string
-