Top Description Fields Constructors Methods
org.bouncycastle.jcajce.spec

public Class DHUParameterSpec

extends Object
implements AlgorithmParameterSpec
Class Inheritance
All Implemented Interfaces
java.security.spec.AlgorithmParameterSpec
Imports
java.security.KeyPair, .PrivateKey, .PublicKey, java.security.spec.AlgorithmParameterSpec, org.bouncycastle.util.Arrays

Parameter spec to provide Diffie-Hellman Unified model keys and user keying material.

Field Summary

Modifier and TypeField and Description
private final PrivateKey
private final PublicKey
private final PublicKey
private final byte[]

Constructor Summary

AccessConstructor and Description
public
DHUParameterSpec(PublicKey
our ephemeral public key.
ephemeralPublicKey
,
PrivateKey
our ephemeral private key.
ephemeralPrivateKey
,
PublicKey
the ephemeral public key sent by the other party.
otherPartyEphemeralKey
,
byte[]
key generation material to mix with the calculated secret.
userKeyingMaterial
)

Base constructor for a Diffie-Hellman unified model.

public
DHUParameterSpec(PublicKey
our ephemeral public key.
ephemeralPublicKey
,
PrivateKey
our ephemeral private key.
ephemeralPrivateKey
,
PublicKey
the ephemeral public key sent by the other party.
otherPartyEphemeralKey
)

Base constructor for a Diffie-Hellman unified model without user keying material.

public
DHUParameterSpec(KeyPair
our ephemeral public and private key.
ephemeralKeyPair
,
PublicKey
the ephemeral public key sent by the other party.
otherPartyEphemeralKey
,
byte[]
key generation material to mix with the calculated secret.
userKeyingMaterial
)

Base constructor for a Diffie-Hellman unified model using a key pair.

public
DHUParameterSpec(PrivateKey
our ephemeral private key.
ephemeralPrivateKey
,
PublicKey
the ephemeral public key sent by the other party.
otherPartyEphemeralKey
,
byte[]
key generation material to mix with the calculated secret.
userKeyingMaterial
)

Base constructor for a Diffie-Hellman unified model - calculation of our ephemeral public key is required.

public
DHUParameterSpec(KeyPair
our ephemeral public and private key.
ephemeralKeyPair
,
PublicKey
the ephemeral public key sent by the other party.
otherPartyEphemeralKey
)

Base constructor for a Diffie-Hellman unified model using a key pair without user keying material.

public
DHUParameterSpec(PrivateKey
our ephemeral private key.
ephemeralPrivateKey
,
PublicKey
the ephemeral public key sent by the other party.
otherPartyEphemeralKey
)

Base constructor for a Diffie-Hellman unified model - calculation of our ephemeral public key is required and no user keying material is provided.

Method Summary

Modifier and TypeMethod and Description
public PrivateKey

Returns:

our ephemeral private key.
getEphemeralPrivateKey
()

Return our ephemeral private key.

public PublicKey

Returns:

our ephemeral public key, can be null.
getEphemeralPublicKey
()

Return our ephemeral public key, null if it was not provided.

public PublicKey

Returns:

the ephemeral other party public key.
getOtherPartyEphemeralKey
()

Return the ephemeral other party public key.

public byte[]

Returns:

a copy of the user keying material, can be null.
getUserKeyingMaterial
()

Return a copy of the user keying material, null if none is available.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

ephemeralPrivateKeyback to summary
private final PrivateKey ephemeralPrivateKey
ephemeralPublicKeyback to summary
private final PublicKey ephemeralPublicKey
otherPartyEphemeralKeyback to summary
private final PublicKey otherPartyEphemeralKey
userKeyingMaterialback to summary
private final byte[] userKeyingMaterial

Constructor Detail

DHUParameterSpecback to summary
public DHUParameterSpec(PublicKey ephemeralPublicKey, PrivateKey ephemeralPrivateKey, PublicKey otherPartyEphemeralKey, byte[] userKeyingMaterial)

Base constructor for a Diffie-Hellman unified model.

Parameters
ephemeralPublicKey:PublicKey

our ephemeral public key.

ephemeralPrivateKey:PrivateKey

our ephemeral private key.

otherPartyEphemeralKey:PublicKey

the ephemeral public key sent by the other party.

userKeyingMaterial:byte[]

key generation material to mix with the calculated secret.

DHUParameterSpecback to summary
public DHUParameterSpec(PublicKey ephemeralPublicKey, PrivateKey ephemeralPrivateKey, PublicKey otherPartyEphemeralKey)

Base constructor for a Diffie-Hellman unified model without user keying material.

Parameters
ephemeralPublicKey:PublicKey

our ephemeral public key.

ephemeralPrivateKey:PrivateKey

our ephemeral private key.

otherPartyEphemeralKey:PublicKey

the ephemeral public key sent by the other party.

DHUParameterSpecback to summary
public DHUParameterSpec(KeyPair ephemeralKeyPair, PublicKey otherPartyEphemeralKey, byte[] userKeyingMaterial)

Base constructor for a Diffie-Hellman unified model using a key pair.

Parameters
ephemeralKeyPair:KeyPair

our ephemeral public and private key.

otherPartyEphemeralKey:PublicKey

the ephemeral public key sent by the other party.

userKeyingMaterial:byte[]

key generation material to mix with the calculated secret.

DHUParameterSpecback to summary
public DHUParameterSpec(PrivateKey ephemeralPrivateKey, PublicKey otherPartyEphemeralKey, byte[] userKeyingMaterial)

Base constructor for a Diffie-Hellman unified model - calculation of our ephemeral public key is required.

Parameters
ephemeralPrivateKey:PrivateKey

our ephemeral private key.

otherPartyEphemeralKey:PublicKey

the ephemeral public key sent by the other party.

userKeyingMaterial:byte[]

key generation material to mix with the calculated secret.

DHUParameterSpecback to summary
public DHUParameterSpec(KeyPair ephemeralKeyPair, PublicKey otherPartyEphemeralKey)

Base constructor for a Diffie-Hellman unified model using a key pair without user keying material.

Parameters
ephemeralKeyPair:KeyPair

our ephemeral public and private key.

otherPartyEphemeralKey:PublicKey

the ephemeral public key sent by the other party.

DHUParameterSpecback to summary
public DHUParameterSpec(PrivateKey ephemeralPrivateKey, PublicKey otherPartyEphemeralKey)

Base constructor for a Diffie-Hellman unified model - calculation of our ephemeral public key is required and no user keying material is provided.

Parameters
ephemeralPrivateKey:PrivateKey

our ephemeral private key.

otherPartyEphemeralKey:PublicKey

the ephemeral public key sent by the other party.

Method Detail

getEphemeralPrivateKeyback to summary
public PrivateKey getEphemeralPrivateKey()

Return our ephemeral private key.

Returns:PrivateKey

our ephemeral private key.

getEphemeralPublicKeyback to summary
public PublicKey getEphemeralPublicKey()

Return our ephemeral public key, null if it was not provided.

Returns:PublicKey

our ephemeral public key, can be null.

getOtherPartyEphemeralKeyback to summary
public PublicKey getOtherPartyEphemeralKey()

Return the ephemeral other party public key.

Returns:PublicKey

the ephemeral other party public key.

getUserKeyingMaterialback to summary
public byte[] getUserKeyingMaterial()

Return a copy of the user keying material, null if none is available.

Returns:byte[]

a copy of the user keying material, can be null.