Top Description Inners Fields Constructors Methods
org.bouncycastle.pqc.crypto.util

public Class PQCOtherInfoGenerator

extends Object
Class Inheritance
Known Direct Subclasses
org.bouncycastle.pqc.crypto.util.PQCOtherInfoGenerator.PartyU, org.bouncycastle.pqc.crypto.util.PQCOtherInfoGenerator.PartyV
Imports
java.io.IOException, java.security.SecureRandom, org.bouncycastle.asn1.x509.AlgorithmIdentifier, org.bouncycastle.crypto.AsymmetricCipherKeyPair, .EncapsulatedSecretExtractor, .EncapsulatedSecretGenerator, .SecretWithEncapsulation, org.bouncycastle.crypto.params.AsymmetricKeyParameter, org.bouncycastle.crypto.util.DEROtherInfo, org.bouncycastle.pqc.crypto.KEMParameters, org.bouncycastle.pqc.crypto.mlkem.MLKEMExtractor, .MLKEMGenerator, .MLKEMKeyGenerationParameters, .MLKEMKeyPairGenerator, .MLKEMParameters, .MLKEMPrivateKeyParameters, org.bouncycastle.pqc.crypto.ntru.NTRUKEMExtractor, .NTRUKEMGenerator, .NTRUKeyGenerationParameters, .NTRUKeyPairGenerator, .NTRUParameters, .NTRUPrivateKeyParameters

OtherInfo Generator for which can be used for populating the SuppPrivInfo field used to provide shared secret data used with NIST SP 800-56A agreement algorithms.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
PQCOtherInfoGenerator.PartyU

Party U (initiator) generation.

public static class
PQCOtherInfoGenerator.PartyV

Party V (responder) generation.

Field Summary

Modifier and TypeField and Description
protected final DEROtherInfo.Builder
protected final SecureRandom
protected boolean

Constructor Summary

AccessConstructor and Description
public
PQCOtherInfoGenerator(AlgorithmIdentifier
the algorithm associated with this invocation of the KDF.
algorithmID
,
byte[]
sender party info.
partyUInfo
,
byte[]
receiver party info.
partyVInfo
,
SecureRandom
a source of randomness.
random
)

Create a basic builder with just the compulsory fields.

Method Summary

Modifier and TypeMethod and Description
private static byte[]
private static AsymmetricKeyParameter
getPublicKey(byte[] enc)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

otherInfoBuilderback to summary
protected final DEROtherInfo.Builder otherInfoBuilder
randomback to summary
protected final SecureRandom random
usedback to summary
protected boolean used

Constructor Detail

PQCOtherInfoGeneratorback to summary
public PQCOtherInfoGenerator(AlgorithmIdentifier algorithmID, byte[] partyUInfo, byte[] partyVInfo, SecureRandom random)

Create a basic builder with just the compulsory fields.

Parameters
algorithmID:AlgorithmIdentifier

the algorithm associated with this invocation of the KDF.

partyUInfo:byte[]

sender party info.

partyVInfo:byte[]

receiver party info.

random:SecureRandom

a source of randomness.

Method Detail

getEncodedback to summary
private static byte[] getEncoded(AsymmetricKeyParameter pubKey)
getPublicKeyback to summary
private static AsymmetricKeyParameter getPublicKey(byte[] enc) throws IOException
org.bouncycastle.pqc.crypto.util back to summary

public Class PQCOtherInfoGenerator.PartyU

extends PQCOtherInfoGenerator
Class Inheritance

Party U (initiator) generation.

Field Summary

Modifier and TypeField and Description
private AsymmetricCipherKeyPair
private EncapsulatedSecretExtractor
Inherited from org.bouncycastle.pqc.crypto.util.PQCOtherInfoGenerator:
otherInfoBuilderrandomused

Constructor Summary

AccessConstructor and Description
public
PartyU(KEMParameters
the key type parameters for populating the private info field.
kemParams
,
AlgorithmIdentifier
the algorithm associated with this invocation of the KDF.
algorithmID
,
byte[]
sender party info.
partyUInfo
,
byte[]
receiver party info.
partyVInfo
,
SecureRandom
a source of randomness.
random
)

Create a basic builder with just the compulsory fields for the initiator.

Method Summary

Modifier and TypeMethod and Description
public DEROtherInfo
generate(byte[] suppPrivInfoPartB)

public byte[]
public PQCOtherInfoGenerator

Returns:

the current builder instance.
withSuppPubInfo
(byte[]
supplementary public info.
suppPubInfo
)

Add optional supplementary public info (DER tagged, implicit, 0).

Field Detail

aKpback to summary
private AsymmetricCipherKeyPair aKp
encSEback to summary
private EncapsulatedSecretExtractor encSE

Constructor Detail

PartyUback to summary
public PartyU(KEMParameters kemParams, AlgorithmIdentifier algorithmID, byte[] partyUInfo, byte[] partyVInfo, SecureRandom random)

Create a basic builder with just the compulsory fields for the initiator.

Parameters
kemParams:KEMParameters

the key type parameters for populating the private info field.

algorithmID:AlgorithmIdentifier

the algorithm associated with this invocation of the KDF.

partyUInfo:byte[]

sender party info.

partyVInfo:byte[]

receiver party info.

random:SecureRandom

a source of randomness.

Method Detail

generateback to summary
public DEROtherInfo generate(byte[] suppPrivInfoPartB)
getSuppPrivInfoPartAback to summary
public byte[] getSuppPrivInfoPartA()
withSuppPubInfoback to summary
public PQCOtherInfoGenerator withSuppPubInfo(byte[] suppPubInfo)

Add optional supplementary public info (DER tagged, implicit, 0).

Parameters
suppPubInfo:byte[]

supplementary public info.

Returns:PQCOtherInfoGenerator

the current builder instance.

org.bouncycastle.pqc.crypto.util back to summary

public Class PQCOtherInfoGenerator.PartyV

extends PQCOtherInfoGenerator
Class Inheritance

Party V (responder) generation.

Field Summary

Modifier and TypeField and Description
private EncapsulatedSecretGenerator
Inherited from org.bouncycastle.pqc.crypto.util.PQCOtherInfoGenerator:
otherInfoBuilderrandomused

Constructor Summary

AccessConstructor and Description
public
PartyV(KEMParameters
the key type parameters for populating the private info field.
kemParams
,
AlgorithmIdentifier
the algorithm associated with this invocation of the KDF.
algorithmID
,
byte[]
sender party info.
partyUInfo
,
byte[]
receiver party info.
partyVInfo
,
SecureRandom
a source of randomness.
random
)

Create a basic builder with just the compulsory fields for the responder.

Method Summary

Modifier and TypeMethod and Description
public DEROtherInfo
public byte[]
getSuppPrivInfoPartB(byte[] suppPrivInfoPartA)

public PQCOtherInfoGenerator

Returns:

the current builder instance.
withSuppPubInfo
(byte[]
supplementary public info.
suppPubInfo
)

Add optional supplementary public info (DER tagged, implicit, 0).

Field Detail

encSGback to summary
private EncapsulatedSecretGenerator encSG

Constructor Detail

PartyVback to summary
public PartyV(KEMParameters kemParams, AlgorithmIdentifier algorithmID, byte[] partyUInfo, byte[] partyVInfo, SecureRandom random)

Create a basic builder with just the compulsory fields for the responder.

Parameters
kemParams:KEMParameters

the key type parameters for populating the private info field.

algorithmID:AlgorithmIdentifier

the algorithm associated with this invocation of the KDF.

partyUInfo:byte[]

sender party info.

partyVInfo:byte[]

receiver party info.

random:SecureRandom

a source of randomness.

Method Detail

generateback to summary
public DEROtherInfo generate()
getSuppPrivInfoPartBback to summary
public byte[] getSuppPrivInfoPartB(byte[] suppPrivInfoPartA)
withSuppPubInfoback to summary
public PQCOtherInfoGenerator withSuppPubInfo(byte[] suppPubInfo)

Add optional supplementary public info (DER tagged, implicit, 0).

Parameters
suppPubInfo:byte[]

supplementary public info.

Returns:PQCOtherInfoGenerator

the current builder instance.