Package org.bouncycastle.crypto.fips
Class FipsEC.DHUAgreementParameters
- java.lang.Object
-
- org.bouncycastle.crypto.fips.FipsParameters
-
- org.bouncycastle.crypto.fips.FipsAgreementParameters
-
- org.bouncycastle.crypto.fips.FipsEC.DHUAgreementParameters
-
- All Implemented Interfaces:
Parameters
- Enclosing class:
- FipsEC
public static final class FipsEC.DHUAgreementParameters extends FipsAgreementParameters
Parameters for EC DHU key agreement.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AsymmetricECPrivateKeygetEphemeralPrivateKey()Return our ephemeral private key.AsymmetricECPublicKeygetEphemeralPublicKey()Return our ephemeral public key, if present.AsymmetricECPublicKeygetOtherPartyEphemeralKey()Return the other party's ephemeral public key.FipsEC.DHUAgreementParameterswithDigest(FipsAlgorithm digestAlgorithm)Add a digest algorithm to process the Z value with.FipsEC.DHUAgreementParameterswithKDF(FipsKDF.AgreementKDFParametersBuilder kdfType, byte[] iv, int outputSize)Add a KDF to process the Z value with.FipsEC.DHUAgreementParameterswithPRF(FipsKDF.PRF prfAlgorithm, byte[] salt)Add a PRF algorithm and salt to process the Z value with (as in SP 800-56C)-
Methods inherited from class org.bouncycastle.crypto.fips.FipsAgreementParameters
getDigestAlgorithm, getPrfAlgorithm, getSalt
-
Methods inherited from class org.bouncycastle.crypto.fips.FipsParameters
getAlgorithm
-
-
-
-
Method Detail
-
getEphemeralPublicKey
public AsymmetricECPublicKey getEphemeralPublicKey()
Return our ephemeral public key, if present.- Returns:
- our ephemeral public key, or null.
-
getEphemeralPrivateKey
public AsymmetricECPrivateKey getEphemeralPrivateKey()
Return our ephemeral private key.- Returns:
- our ephemeral private key.
-
getOtherPartyEphemeralKey
public AsymmetricECPublicKey getOtherPartyEphemeralKey()
Return the other party's ephemeral public key.- Returns:
- the other party's ephemeral public key.
-
withDigest
public FipsEC.DHUAgreementParameters withDigest(FipsAlgorithm digestAlgorithm)
Add a digest algorithm to process the Z value with.- Parameters:
digestAlgorithm- digest algorithm to use.- Returns:
- a new parameter set, including the digest algorithm
-
withPRF
public FipsEC.DHUAgreementParameters withPRF(FipsKDF.PRF prfAlgorithm, byte[] salt)
Add a PRF algorithm and salt to process the Z value with (as in SP 800-56C)- Parameters:
prfAlgorithm- PRF represent the MAC/HMAC algorithm to use.salt- the salt to use to initialise the PRF- Returns:
- a new parameter set, including the digest algorithm
-
withKDF
public FipsEC.DHUAgreementParameters withKDF(FipsKDF.AgreementKDFParametersBuilder kdfType, byte[] iv, int outputSize)
Add a KDF to process the Z value with. The outputSize parameter determines how many bytes will be generated.- Parameters:
kdfType- KDF builder type to use for parameter creation.iv- the iv parameter for KDF initialization.outputSize- the size of the output to be generated from the KDF.- Returns:
- a new parameter set, the KDF definition.
-
-