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

public Class PQCSecretKeyProcessor

extends Object
implements SecretKeyProcessor
Class Inheritance
All Implemented Interfaces
org.bouncycastle.pqc.addon.SecretKeyProcessor
Imports
java.io.IOException, .OutputStream, java.security.SecureRandom, javax.crypto.SecretKey, javax.crypto.spec.SecretKeySpec, javax.security.auth.DestroyFailedException, org.bouncycastle.crypto.fips.FipsOutputXOFCalculator, .FipsSHS, .FipsXOFOperatorFactory, org.bouncycastle.util.Arrays

A processor with associated builders for doing secret key transformation using a PQC KEM algorithm.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
PQCSecretKeyProcessor.PartyUBuilder

Party U (initiator) processor builder.

public static class
PQCSecretKeyProcessor.PartyVBuilder

Party V (responder) processor builder.

Field Summary

Modifier and TypeField and Description
private final FipsOutputXOFCalculator<T extends FipsParameters>

Constructor Summary

AccessConstructor and Description
private
PQCSecretKeyProcessor(byte[] secret, byte[] shared)

Method Summary

Modifier and TypeMethod and Description
public SecretKey
processKey(SecretKey
the key to be processed.
initialKey
)

Implements org.bouncycastle.pqc.addon.SecretKeyProcessor.processKey.

Transform the passed in secret key returning the result.
private static void
xor(byte[] a, byte[] b)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

xofOperatorback to summary
private final FipsOutputXOFCalculator<T extends FipsParameters> xofOperator

Constructor Detail

PQCSecretKeyProcessorback to summary
private PQCSecretKeyProcessor(byte[] secret, byte[] shared)

Method Detail

processKeyback to summary
public SecretKey processKey(SecretKey initialKey)

Implements org.bouncycastle.pqc.addon.SecretKeyProcessor.processKey.

Doc from org.bouncycastle.pqc.addon.SecretKeyProcessor.processKey.

Transform the passed in secret key returning the result.

Parameters
initialKey:SecretKey

the key to be processed.

Returns:SecretKey

a new secret key.

Annotations
@Override
xorback to summary
private static void xor(byte[] a, byte[] b)
org.bouncycastle.pqc.addon back to summary

public Class PQCSecretKeyProcessor.PartyUBuilder

extends Object
Class Inheritance
  • java.lang.Object
  • org.bouncycastle.pqc.addon.PQCSecretKeyProcessor.PartyUBuilder

Party U (initiator) processor builder.

Field Summary

Modifier and TypeField and Description
private final AsymmetricCipherKeyPair
private final EncapsulatedSecretExtractor
private byte[]

Constructor Summary

AccessConstructor and Description
public
PartyUBuilder(KEMParameters kemParameters, SecureRandom random)

Method Summary

Modifier and TypeMethod and Description
public SecretKeyProcessor
build(byte[] partB)

public byte[]
public PQCSecretKeyProcessor.PartyUBuilder
withSharedInfo(byte[] sharedInfo)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

aKpback to summary
private final AsymmetricCipherKeyPair aKp
extractorback to summary
private final EncapsulatedSecretExtractor extractor
sharedInfoback to summary
private byte[] sharedInfo

Constructor Detail

PartyUBuilderback to summary
public PartyUBuilder(KEMParameters kemParameters, SecureRandom random)

Method Detail

buildback to summary
public SecretKeyProcessor build(byte[] partB)
getPartAback to summary
public byte[] getPartA()
withSharedInfoback to summary
public PQCSecretKeyProcessor.PartyUBuilder withSharedInfo(byte[] sharedInfo)
org.bouncycastle.pqc.addon back to summary

public Class PQCSecretKeyProcessor.PartyVBuilder

extends Object
Class Inheritance
  • java.lang.Object
  • org.bouncycastle.pqc.addon.PQCSecretKeyProcessor.PartyVBuilder

Party V (responder) processor builder.

Field Summary

Modifier and TypeField and Description
private final KEMParameters
protected final SecureRandom
private SecretWithEncapsulationImpl
private byte[]
private byte[]
private boolean

Constructor Summary

AccessConstructor and Description
public
PartyVBuilder(KEMParameters kemParameters, SecureRandom random)

Method Summary

Modifier and TypeMethod and Description
public SecretKeyProcessor
public byte[]
getPartB(byte[] partUContribution)

public PQCSecretKeyProcessor.PartyVBuilder
withSharedInfo(byte[] sharedInfo)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

kemParametersback to summary
private final KEMParameters kemParameters
randomback to summary
protected final SecureRandom random
secretWithEncapsulationback to summary
private SecretWithEncapsulationImpl secretWithEncapsulation
sharedInfoback to summary
private byte[] sharedInfo
sharedSecretback to summary
private byte[] sharedSecret
usedback to summary
private boolean used

Constructor Detail

PartyVBuilderback to summary
public PartyVBuilder(KEMParameters kemParameters, SecureRandom random)

Method Detail

buildback to summary
public SecretKeyProcessor build()
getPartBback to summary
public byte[] getPartB(byte[] partUContribution)
withSharedInfoback to summary
public PQCSecretKeyProcessor.PartyVBuilder withSharedInfo(byte[] sharedInfo)