Bouncy Castle Cryptography Library 1.87

org.bouncycastle.pqc.crypto.hqc
Class HQCPrivateKeyParameters

java.lang.Object
  extended byorg.bouncycastle.crypto.params.AsymmetricKeyParameter
      extended byorg.bouncycastle.pqc.crypto.hqc.HQCKeyParameters
          extended byorg.bouncycastle.pqc.crypto.hqc.HQCPrivateKeyParameters
All Implemented Interfaces:
CipherParameters

public class HQCPrivateKeyParameters
extends HQCKeyParameters

An HQC decapsulation key. Its encoding is dkKEM = seedKEM, the 32-byte seed from which the HQC specification of 2026-10-12 derives the whole key pair (Section 3.7, Table 9); the expanded form decapsulation works on - ekPKE, seedPKE.dk and sigma - is derived from it on first use and kept, the caching the specification allows to offset the cost of re-deriving it on every decapsulation.


Constructor Summary
HQCPrivateKeyParameters(HQCParameters params, byte[] sk)
           
 
Method Summary
 byte[] getEncoded()
           
 byte[] getPrivateKey()
           
 HQCPublicKeyParameters getPublicKeyParameters()
          Return the encapsulation key this decapsulation key pairs with, derived from the seed.
 
Methods inherited from class org.bouncycastle.pqc.crypto.hqc.HQCKeyParameters
getParameters
 
Methods inherited from class org.bouncycastle.crypto.params.AsymmetricKeyParameter
isPrivate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HQCPrivateKeyParameters

public HQCPrivateKeyParameters(HQCParameters params,
                               byte[] sk)
Parameters:
params - the parameter set.
sk - the 32-byte seedKEM.
Method Detail

getPublicKeyParameters

public HQCPublicKeyParameters getPublicKeyParameters()
Return the encapsulation key this decapsulation key pairs with, derived from the seed.

Returns:
the matching public key parameters.

getPrivateKey

public byte[] getPrivateKey()
Returns:
a copy of the 32-byte seedKEM.

getEncoded

public byte[] getEncoded()
Returns:
the key's encoding, the 32-byte seedKEM.

Bouncy Castle Cryptography Library 1.87