Class HybridKexBuilder.ClassicAgreement

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

public static final class HybridKexBuilder.ClassicAgreement extends Object
Configurator for the classic leg in HybridKexBuilder.ClassicMode.CLASSIC_AGREEMENT mode.

Required inputs before building:

Optional inputs:

After configuring the classic leg, continue with pqcKem() to configure the PQC leg.

Since:
1.0
  • Method Details

    • algorithm

      public HybridKexBuilder.ClassicAgreement algorithm(String algId)
      Sets the classic agreement algorithm identifier.

      Example for X25519 in this project: use "Xdh" with XdhSpec.X25519.

      Parameters:
      algId - algorithm id (must not be null)
      Returns:
      this configurator
      Throws:
      NullPointerException - if algId is null
      Since:
      1.0
    • spec

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

      Sets the local private key for the classic leg.
      Parameters:
      key - private key (must not be null)
      Returns:
      this configurator
      Throws:
      NullPointerException - if key is null
      Since:
      1.0
    • peerPublic

      Sets the peer public key for the classic leg.

      In HybridKexBuilder.ClassicMode.CLASSIC_AGREEMENT this key is assumed to be obtained out-of-band.

      Parameters:
      key - peer public key (must not be null)
      Returns:
      this configurator
      Throws:
      NullPointerException - if key is null
      Since:
      1.0
    • pqcKem

      public HybridKexBuilder.PqcKem pqcKem()
      Continues with PQC (KEM adapter) leg configuration.
      Returns:
      PQC configurator
      Since:
      1.0