Class SaberKeyGenSpec

java.lang.Object
zeroecho.core.alg.saber.SaberKeyGenSpec
All Implemented Interfaces:
Describable, AlgorithmKeySpec

public final class SaberKeyGenSpec extends Object implements AlgorithmKeySpec, Describable
Key generation specification for the SABER post-quantum KEM algorithm.

A SaberKeyGenSpec selects one of the SABER parameter variants standardized in round-3 submissions. Each variant balances performance, bandwidth, and security level. This spec is passed to a registered AsymmetricKeyPairGenerator to generate a SABER key pair.

Variants

The SaberKeyGenSpec.Variant enumeration identifies supported SABER parameter sets:

Usage example

SaberKeyGenSpec spec = SaberKeyGenSpec.saberkem256r3();
KeyPair kp = session.keyBuilders().asymmetric().generateKeyPair("SABER", spec);
Since:
1.0
  • Method Details

    • of

      Creates a specification for a given variant.
      Parameters:
      v - the SABER variant
      Returns:
      new key generation spec for the variant
    • lightsaberkem128r3

      public static SaberKeyGenSpec lightsaberkem128r3()
      Creates a specification for the LightSaberKEM128R3 variant.

      This is the smallest SABER parameter set at the 128-bit security level, optimized for constrained environments. It trades some performance margin for reduced bandwidth and memory footprint.

      Returns:
      a new SaberKeyGenSpec representing the LightSaberKEM128R3 variant
    • saberkem128r3

      public static SaberKeyGenSpec saberkem128r3()
      Creates a specification for the SaberKEM128R3 variant.

      This is the baseline SABER parameter set at the 128-bit security level, balancing efficiency and security margin. It is the recommended choice for standard 128-bit use cases.

      Returns:
      a new SaberKeyGenSpec representing the SaberKEM128R3 variant
    • firesaberkem128r3

      public static SaberKeyGenSpec firesaberkem128r3()
      Creates a specification for the FireSaberKEM128R3 variant.

      This is the strongest SABER parameter set at the 128-bit security level, using larger dimensions to maximize security margin. It comes with higher computational and bandwidth cost than LightSaber or Saber.

      Returns:
      a new SaberKeyGenSpec representing the FireSaberKEM128R3 variant
    • lightsaberkem192r3

      public static SaberKeyGenSpec lightsaberkem192r3()
      Creates a specification for the LightSaberKEM192R3 variant.

      This variant targets approximately 192-bit security with minimized resource usage. It is designed for higher security requirements while still considering efficiency.

      Returns:
      a new SaberKeyGenSpec representing the LightSaberKEM192R3 variant
    • saberkem192r3

      public static SaberKeyGenSpec saberkem192r3()
      Creates a specification for the SaberKEM192R3 variant.

      This is the balanced SABER parameter set at the 192-bit security level, offering a midpoint between performance and conservative security margin.

      Returns:
      a new SaberKeyGenSpec representing the SaberKEM192R3 variant
    • firesaberkem192r3

      public static SaberKeyGenSpec firesaberkem192r3()
      Creates a specification for the FireSaberKEM192R3 variant.

      This is the strongest SABER configuration at the 192-bit security level, providing the highest margin at the cost of larger keys and slower operations.

      Returns:
      a new SaberKeyGenSpec representing the FireSaberKEM192R3 variant
    • lightsaberkem256r3

      public static SaberKeyGenSpec lightsaberkem256r3()
      Creates a specification for the LightSaberKEM256R3 variant.

      This variant targets approximately 256-bit security with reduced parameter sizes compared to the full Saber/FireSaber sets. It favors efficiency in very high-security applications.

      Returns:
      a new SaberKeyGenSpec representing the LightSaberKEM256R3 variant
    • saberkem256r3

      public static SaberKeyGenSpec saberkem256r3()
      Creates a specification for the SaberKEM256R3 variant.

      This is the balanced SABER parameter set at the 256-bit security level, recommended for long-term, high-assurance use cases where efficiency is still important.

      Returns:
      a new SaberKeyGenSpec representing the SaberKEM256R3 variant
    • firesaberkem256r3

      public static SaberKeyGenSpec firesaberkem256r3()
      Creates a specification for the FireSaberKEM256R3 variant.

      This is the strongest SABER configuration at the 256-bit security level, prioritizing maximum security margin over efficiency. It uses the largest parameter sizes and yields the heaviest resource usage.

      Returns:
      a new SaberKeyGenSpec representing the FireSaberKEM256R3 variant
    • variant

      public SaberKeyGenSpec.Variant variant()
      Returns the variant this spec represents.
      Returns:
      selected SABER variant
    • description

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

      Currently this is the SaberKeyGenSpec.Variant name, e.g. SABERKEM256R3.

      Specified by:
      description in interface Describable
      Returns:
      string description of the spec