Top Description Inners Fields Constructors Methods
org.bouncycastle.pqc.addon

public Class PQCOtherInfoGenerator

extends Object
Class Inheritance
Known Direct Subclasses
org.bouncycastle.pqc.addon.PQCOtherInfoGenerator.PartyU, org.bouncycastle.pqc.addon.PQCOtherInfoGenerator.PartyV
Imports
java.security.SecureRandom, java.util.Arrays, javax.security.auth.DestroyFailedException, org.bouncycastle.asn1.x509.AlgorithmIdentifier, org.bouncycastle.crypto.util.DEROtherInfo

Post-Quantum 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 KEMParameters
protected final DEROtherInfo.Builder
protected final SecureRandom

Constructor Summary

AccessConstructor and Description
public
PQCOtherInfoGenerator(KEMParameters
the PQC KEM parameters to use.
kemParameters
,
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

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

kemParametersback to summary
protected final KEMParameters kemParameters
otherInfoBuilderback to summary
protected final DEROtherInfo.Builder otherInfoBuilder
randomback to summary
protected final SecureRandom random

Constructor Detail

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

Create a basic builder with just the compulsory fields.

Parameters
kemParameters:KEMParameters

the PQC KEM parameters to use.

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.

org.bouncycastle.pqc.addon 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.addon.PQCOtherInfoGenerator:
kemParametersotherInfoBuilderrandom

Constructor Summary

AccessConstructor and Description
public
PartyU(KEMParameters kemParameters, AlgorithmIdentifier algorithmID, byte[] partyUInfo, byte[] partyVInfo, SecureRandom random)

Method Summary

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

Generate the OtherInfo decrypting the contents of suppPrivInfoPartB and putting it in the suppPrivInfo field of the OtherInfo structure.

public byte[]

Returns:

part A.
getSuppPrivInfoPartA
()

Return the part A information (Party U's public key).

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
extractorback to summary
private EncapsulatedSecretExtractor extractor

Constructor Detail

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

Method Detail

generateback to summary
public DEROtherInfo generate(byte[] suppPrivInfoPartB)

Generate the OtherInfo decrypting the contents of suppPrivInfoPartB and putting it in the suppPrivInfo field of the OtherInfo structure.

Parameters
suppPrivInfoPartB:byte[]

an encrypted packet

getSuppPrivInfoPartAback to summary
public byte[] getSuppPrivInfoPartA()

Return the part A information (Party U's public key).

Returns:byte[]

part A.

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.addon back to summary

public Class PQCOtherInfoGenerator.PartyV

extends PQCOtherInfoGenerator
Class Inheritance

Party V (responder) generation.

Field Summary

Modifier and TypeField and Description
private SecretWithEncapsulationImpl
Inherited from org.bouncycastle.pqc.addon.PQCOtherInfoGenerator:
kemParametersotherInfoBuilderrandom

Constructor Summary

AccessConstructor and Description
public
PartyV(KEMParameters kemParameters, AlgorithmIdentifier algorithmID, byte[] partyUInfo, byte[] partyVInfo, SecureRandom random)

Method Summary

Modifier and TypeMethod and Description
public DEROtherInfo
public byte[]

Returns:

an encrypted secret.
getSuppPrivInfoPartB
(byte[]
encoding of Party U's public key.
suppPrivInfoPartA
)

Return the part B information - a secret encrypted using the encoded public key passed in 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

secretWithEncapsulationback to summary
private SecretWithEncapsulationImpl secretWithEncapsulation

Constructor Detail

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

Method Detail

generateback to summary
public DEROtherInfo generate()
getSuppPrivInfoPartBback to summary
public byte[] getSuppPrivInfoPartB(byte[] suppPrivInfoPartA)

Return the part B information - a secret encrypted using the encoded public key passed in suppPrivInfoPartA.

Parameters
suppPrivInfoPartA:byte[]

encoding of Party U's public key.

Returns:byte[]

an encrypted secret.

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.