NHExchangePairGenerator (Bouncy Castle Library 1.85 API Specification)
Date: 2026-07-12

org.bouncycastle.pqc.crypto.newhope

## Class NHExchangePairGenerator

- java.lang.Object
- - org.bouncycastle.pqc.crypto.newhope.NHExchangePairGenerator

- All Implemented Interfaces:
    ExchangePairGenerator

      public class NHExchangePairGenerator
      extends java.lang.Object
      implements ExchangePairGenerator

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `NHExchangePairGenerator(java.security.SecureRandom random)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `ExchangePair` | `generateExchange(AsymmetricKeyParameter senderPublicKey)` Generate an exchange pair based on the sender public key.
    `ExchangePair` | `GenerateExchange(AsymmetricKeyParameter senderPublicKey)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### NHExchangePairGenerator

          public NHExchangePairGenerator(java.security.SecureRandom random)

  - ### Method Detail

    - #### GenerateExchange

          public ExchangePair GenerateExchange(AsymmetricKeyParameter senderPublicKey)

    - #### generateExchange

          public ExchangePair generateExchange(AsymmetricKeyParameter senderPublicKey)

      Description copied from interface: `ExchangePairGenerator`
      Generate an exchange pair based on the sender public key.
      Specified by:
        `generateExchange` in interface `ExchangePairGenerator`
      Parameters:
        `senderPublicKey` - the public key of the exchange initiator.
      Returns:
        An ExchangePair derived from the sender public key.