Class NtrulPrimeKeyGenSpec

java.lang.Object
zeroecho.core.alg.ntruprime.NtrulPrimeKeyGenSpec
All Implemented Interfaces:
Describable, AlgorithmKeySpec

public final class NtrulPrimeKeyGenSpec extends Object implements AlgorithmKeySpec, Describable
Algorithm-specific key generation parameters for NTRU LPRime.

NtrulPrimeKeyGenSpec selects one of the standardized parameter variants of the NTRU LPRime key encapsulation mechanism. Each variant determines the security level, key sizes, and performance characteristics of the generated key pair.

Variants

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("NTRULPRime", NtrulPrimeKeyGenSpec.ntrulpr761());
Since:
1.0
  • Method Details

    • of

      Creates a specification from the given variant.
      Parameters:
      v - selected NTRU LPRime parameter set
      Returns:
      new specification bound to v
      Throws:
      NullPointerException - if v is null
    • ntrulpr653

      public static NtrulPrimeKeyGenSpec ntrulpr653()
      Creates a key generation specification for the NtrulPrimeKeyGenSpec.Variant.NTRULPR653 parameter set.

      This variant offers around 128-bit classical security with relatively small key and ciphertext sizes, making it suitable for constrained environments.

      Returns:
      a new specification targeting NTRULPR653
    • ntrulpr761

      public static NtrulPrimeKeyGenSpec ntrulpr761()
      Creates a key generation specification for the NtrulPrimeKeyGenSpec.Variant.NTRULPR761 parameter set.

      This variant balances efficiency and strength, offering roughly 192-bit security. It is a common choice for post-quantum readiness in practical deployments.

      Returns:
      a new specification targeting NTRULPR761
    • ntrulpr857

      public static NtrulPrimeKeyGenSpec ntrulpr857()
      Creates a key generation specification for the NtrulPrimeKeyGenSpec.Variant.NTRULPR857 parameter set.

      This variant aims for ~256-bit classical security with larger keys and ciphertexts compared to the 653 and 761 sets, offering stronger margins.

      Returns:
      a new specification targeting NTRULPR857
    • ntrulpr953

      public static NtrulPrimeKeyGenSpec ntrulpr953()
      Creates a key generation specification for the NtrulPrimeKeyGenSpec.Variant.NTRULPR953 parameter set.

      Provides very high security beyond 256-bit classical strength, with larger key material and ciphertexts. Suitable for highly conservative use cases.

      Returns:
      a new specification targeting NTRULPR953
    • ntrulpr1013

      public static NtrulPrimeKeyGenSpec ntrulpr1013()
      Creates a key generation specification for the NtrulPrimeKeyGenSpec.Variant.NTRULPR1013 parameter set.

      A higher-strength variant designed for long-term security horizons, offering protection well above 256-bit security levels at the cost of larger keys.

      Returns:
      a new specification targeting NTRULPR1013
    • ntrulpr1277

      public static NtrulPrimeKeyGenSpec ntrulpr1277()
      Creates a key generation specification for the NtrulPrimeKeyGenSpec.Variant.NTRULPR1277 parameter set.

      The largest standardized parameter set, offering the highest security margin and designed for long-term quantum resistance in highly sensitive applications.

      Returns:
      a new specification targeting NTRULPR1277
    • variant

      public NtrulPrimeKeyGenSpec.Variant variant()
      Returns the selected variant for this specification.
      Returns:
      variant of NTRU LPRime key parameters
    • description

      public String description()
      Returns a textual description of this specification.

      The description is the variant name (e.g., "NTRULPR761").

      Specified by:
      description in interface Describable
      Returns:
      variant name string