Package org.bouncycastle.jcajce.spec
Class MQVParameterSpec
java.lang.Object
org.bouncycastle.jcajce.spec.MQVParameterSpec
- All Implemented Interfaces:
AlgorithmParameterSpec
Parameter spec to provide MQV ephemeral keys and user keying material.
-
Constructor Summary
ConstructorsConstructorDescriptionMQVParameterSpec
(KeyPair ephemeralKeyPair, PublicKey otherPartyEphemeralKey) Constructor taking an ephemeral key pair without user keying material.MQVParameterSpec
(KeyPair ephemeralKeyPair, PublicKey otherPartyEphemeralKey, byte[] userKeyingMaterial) Constructor taking an ephemeral key pair.MQVParameterSpec
(PrivateKey ephemeralPrivateKey, PublicKey otherPartyEphemeralKey) Constructor without our ephemeral public key or user keying material - in this case it is assumed the ephemeral public key can be calculated later.MQVParameterSpec
(PrivateKey ephemeralPrivateKey, PublicKey otherPartyEphemeralKey, byte[] userKeyingMaterial) Constructor without our ephemeral public key - in this case it is assumed the ephemeral public key can be calculated later.MQVParameterSpec
(PublicKey ephemeralPublicKey, PrivateKey ephemeralPrivateKey, PublicKey otherPartyEphemeralKey) Constructor without user keying material.MQVParameterSpec
(PublicKey ephemeralPublicKey, PrivateKey ephemeralPrivateKey, PublicKey otherPartyEphemeralKey, byte[] userKeyingMaterial) Base constructor. -
Method Summary
Modifier and TypeMethodDescriptionReturn our ephemeral private key.Return our ephemeral public key, if available.Return the other party's ephemeral public key.byte[]
Return the user keying material for the KDF used to derive the final secret key.
-
Constructor Details
-
MQVParameterSpec
public MQVParameterSpec(PublicKey ephemeralPublicKey, PrivateKey ephemeralPrivateKey, PublicKey otherPartyEphemeralKey, byte[] userKeyingMaterial) Base constructor.- Parameters:
ephemeralPublicKey
- our ephemeral public key.ephemeralPrivateKey
- our ephemeral private key.otherPartyEphemeralKey
- the other party's ephemeral public key.userKeyingMaterial
- the user keying material for the key derivation function.
-
MQVParameterSpec
public MQVParameterSpec(PublicKey ephemeralPublicKey, PrivateKey ephemeralPrivateKey, PublicKey otherPartyEphemeralKey) Constructor without user keying material.- Parameters:
ephemeralPublicKey
- our ephemeral public key.ephemeralPrivateKey
- our ephemeral private key.otherPartyEphemeralKey
- the other party's ephemeral public key.
-
MQVParameterSpec
public MQVParameterSpec(KeyPair ephemeralKeyPair, PublicKey otherPartyEphemeralKey, byte[] userKeyingMaterial) Constructor taking an ephemeral key pair.- Parameters:
ephemeralKeyPair
- keypair holding our ephemeral public and private keys.otherPartyEphemeralKey
- the other party's ephemeral public key.userKeyingMaterial
- the user keying material for the key derivation function.
-
MQVParameterSpec
public MQVParameterSpec(PrivateKey ephemeralPrivateKey, PublicKey otherPartyEphemeralKey, byte[] userKeyingMaterial) Constructor without our ephemeral public key - in this case it is assumed the ephemeral public key can be calculated later.- Parameters:
ephemeralPrivateKey
- our ephemeral private key.otherPartyEphemeralKey
- the other party's ephemeral public key.userKeyingMaterial
- the user keying material for the key derivation function.
-
MQVParameterSpec
Constructor taking an ephemeral key pair without user keying material.- Parameters:
ephemeralKeyPair
- keypair holding our ephemeral public and private keys.otherPartyEphemeralKey
- the other party's ephemeral public key.
-
MQVParameterSpec
Constructor without our ephemeral public key or user keying material - in this case it is assumed the ephemeral public key can be calculated later.- Parameters:
ephemeralPrivateKey
- our ephemeral private key.otherPartyEphemeralKey
- the other party's ephemeral public key.
-
-
Method Details
-
getEphemeralPrivateKey
Return our ephemeral private key.- Returns:
- our ephemeral private key.
-
getEphemeralPublicKey
Return our ephemeral public key, if available.- Returns:
- the ephemeral public key, may be null.
-
getOtherPartyEphemeralKey
Return the other party's ephemeral public key.- Returns:
- the other party's public key.
-
getUserKeyingMaterial
public byte[] getUserKeyingMaterial()Return the user keying material for the KDF used to derive the final secret key.- Returns:
- the user keying material to be input into the KDF.
-