public class DHUParameterSpec
extends java.lang.Object
implements java.security.spec.AlgorithmParameterSpec
Constructor and Description |
---|
DHUParameterSpec(java.security.KeyPair ephemeralKeyPair,
java.security.PublicKey otherPartyEphemeralKey)
Base constructor for a Diffie-Hellman unified model using a key pair without user keying material.
|
DHUParameterSpec(java.security.KeyPair ephemeralKeyPair,
java.security.PublicKey otherPartyEphemeralKey,
byte[] userKeyingMaterial)
Base constructor for a Diffie-Hellman unified model using a key pair.
|
DHUParameterSpec(java.security.PrivateKey ephemeralPrivateKey,
java.security.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.
|
DHUParameterSpec(java.security.PrivateKey ephemeralPrivateKey,
java.security.PublicKey otherPartyEphemeralKey,
java.security.spec.AlgorithmParameterSpec kdfParameterSpec)
Base constructor for a Diffie-Hellman unified model - calculation of our ephemeral public key
is required.
|
DHUParameterSpec(java.security.PrivateKey ephemeralPrivateKey,
java.security.PublicKey otherPartyEphemeralKey,
byte[] userKeyingMaterial)
Base constructor for a Diffie-Hellman unified model - calculation of our ephemeral public key
is required.
|
DHUParameterSpec(java.security.PublicKey ephemeralPublicKey,
java.security.PrivateKey ephemeralPrivateKey,
java.security.PublicKey otherPartyEphemeralKey)
Base constructor for a Diffie-Hellman unified model without user keying material.
|
DHUParameterSpec(java.security.PublicKey ephemeralPublicKey,
java.security.PrivateKey ephemeralPrivateKey,
java.security.PublicKey otherPartyEphemeralKey,
java.security.spec.AlgorithmParameterSpec kdfParameterSpec)
Base constructor for a Diffie-Hellman unified model.
|
DHUParameterSpec(java.security.PublicKey ephemeralPublicKey,
java.security.PrivateKey ephemeralPrivateKey,
java.security.PublicKey otherPartyEphemeralKey,
byte[] userKeyingMaterial)
Base constructor for a Diffie-Hellman unified model.
|
Modifier and Type | Method and Description |
---|---|
java.security.PrivateKey |
getEphemeralPrivateKey()
Return our ephemeral private key.
|
java.security.PublicKey |
getEphemeralPublicKey()
Return our ephemeral public key, null if it was not provided.
|
java.security.spec.AlgorithmParameterSpec |
getKdfParameterSpec()
Return the AlgorithmParameterSpec for the KDF used to derive the final secret key.
|
java.security.PublicKey |
getOtherPartyEphemeralKey()
Return the ephemeral other party public key.
|
byte[] |
getUserKeyingMaterial()
Return the user keying material for the KDF used to derive the final secret key.
|
public DHUParameterSpec(java.security.PublicKey ephemeralPublicKey, java.security.PrivateKey ephemeralPrivateKey, java.security.PublicKey otherPartyEphemeralKey, java.security.spec.AlgorithmParameterSpec kdfParameterSpec)
ephemeralPublicKey
- our ephemeral public key.ephemeralPrivateKey
- our ephemeral private key.otherPartyEphemeralKey
- the ephemeral public key sent by the other party.kdfParameterSpec
- parameter spec for key generator to mix with the calculated secret.public DHUParameterSpec(java.security.PublicKey ephemeralPublicKey, java.security.PrivateKey ephemeralPrivateKey, java.security.PublicKey otherPartyEphemeralKey, byte[] userKeyingMaterial)
ephemeralPublicKey
- our ephemeral public key.ephemeralPrivateKey
- our ephemeral private key.otherPartyEphemeralKey
- the ephemeral public key sent by the other party.userKeyingMaterial
- key generation material to mix with the calculated secret.public DHUParameterSpec(java.security.PublicKey ephemeralPublicKey, java.security.PrivateKey ephemeralPrivateKey, java.security.PublicKey otherPartyEphemeralKey)
ephemeralPublicKey
- our ephemeral public key.ephemeralPrivateKey
- our ephemeral private key.otherPartyEphemeralKey
- the ephemeral public key sent by the other party.public DHUParameterSpec(java.security.KeyPair ephemeralKeyPair, java.security.PublicKey otherPartyEphemeralKey, byte[] userKeyingMaterial)
ephemeralKeyPair
- our ephemeral public and private key.otherPartyEphemeralKey
- the ephemeral public key sent by the other party.userKeyingMaterial
- key generation material to mix with the calculated secret.public DHUParameterSpec(java.security.PrivateKey ephemeralPrivateKey, java.security.PublicKey otherPartyEphemeralKey, byte[] userKeyingMaterial)
ephemeralPrivateKey
- our ephemeral private key.otherPartyEphemeralKey
- the ephemeral public key sent by the other party.userKeyingMaterial
- key generation material to mix with the calculated secret.public DHUParameterSpec(java.security.PrivateKey ephemeralPrivateKey, java.security.PublicKey otherPartyEphemeralKey, java.security.spec.AlgorithmParameterSpec kdfParameterSpec)
ephemeralPrivateKey
- our ephemeral private key.otherPartyEphemeralKey
- the ephemeral public key sent by the other party.kdfParameterSpec
- parameter spec for key generator to mix with the calculated secret.public DHUParameterSpec(java.security.KeyPair ephemeralKeyPair, java.security.PublicKey otherPartyEphemeralKey)
ephemeralKeyPair
- our ephemeral public and private key.otherPartyEphemeralKey
- the ephemeral public key sent by the other party.public DHUParameterSpec(java.security.PrivateKey ephemeralPrivateKey, java.security.PublicKey otherPartyEphemeralKey)
ephemeralPrivateKey
- our ephemeral private key.otherPartyEphemeralKey
- the ephemeral public key sent by the other party.public java.security.PrivateKey getEphemeralPrivateKey()
public java.security.PublicKey getEphemeralPublicKey()
public java.security.PublicKey getOtherPartyEphemeralKey()
public byte[] getUserKeyingMaterial()
public java.security.spec.AlgorithmParameterSpec getKdfParameterSpec()