Class HybridKexBuilder.PqcKem

java.lang.Object
zeroecho.sdk.builders.HybridKexBuilder.PqcKem
Enclosing class:
HybridKexBuilder

public static final class HybridKexBuilder.PqcKem extends Object
Configurator for the PQC leg (KEM adapter).

Required inputs differ by role:

The PQC leg is always message-based: initiator produces a peer message (ciphertext) and responder consumes it. The hybrid context transports this payload as the PQC part of the hybrid message.

Since:
1.0
  • Method Details

    • algorithm

      public HybridKexBuilder.PqcKem algorithm(String algId)
      Sets the PQC algorithm identifier.
      Parameters:
      algId - algorithm id (must not be null)
      Returns:
      this configurator
      Throws:
      NullPointerException - if algId is null
      Since:
      1.0
    • spec

      Sets the PQC context spec (algorithm parameters).
      Parameters:
      spec - spec (may be null if the algorithm provides a default)
      Returns:
      this configurator
      Since:
      1.0
    • peerPublic

      public HybridKexBuilder.PqcKem peerPublic(PublicKey key)
      Sets the recipient PQC public key for initiator-side construction.
      Parameters:
      key - recipient public key (must not be null)
      Returns:
      this configurator
      Throws:
      NullPointerException - if key is null
      Since:
      1.0
    • privateKey

      public HybridKexBuilder.PqcKem privateKey(PrivateKey key)
      Sets the recipient PQC private key for responder-side construction.
      Parameters:
      key - recipient private key (must not be null)
      Returns:
      this configurator
      Throws:
      NullPointerException - if key is null
      Since:
      1.0
    • buildInitiator

      public HybridKexContext buildInitiator()
      Builds an initiator-side HybridKexContext using the current builder configuration.
      Returns:
      initiator context
      Throws:
      IllegalStateException - if required configuration for initiator role is missing
      Since:
      1.0
    • buildResponder

      public HybridKexContext buildResponder()
      Builds a responder-side HybridKexContext using the current builder configuration.
      Returns:
      responder context
      Throws:
      IllegalStateException - if required configuration for responder role is missing
      Since:
      1.0