Class MQVParameterSpec

  • All Implemented Interfaces:
    java.security.spec.AlgorithmParameterSpec

    public class MQVParameterSpec
    extends java.lang.Object
    implements java.security.spec.AlgorithmParameterSpec
    Parameter spec to provide MQV ephemeral keys and user keying material.
    • Constructor Summary

      Constructors 
      Constructor Description
      MQVParameterSpec​(java.security.KeyPair ephemeralKeyPair, java.security.PublicKey otherPartyEphemeralKey)
      Constructor taking an ephemeral key pair without user keying material.
      MQVParameterSpec​(java.security.KeyPair ephemeralKeyPair, java.security.PublicKey otherPartyEphemeralKey, byte[] userKeyingMaterial)
      Constructor taking an ephemeral key pair.
      MQVParameterSpec​(java.security.PrivateKey ephemeralPrivateKey, java.security.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​(java.security.PrivateKey ephemeralPrivateKey, java.security.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​(java.security.PublicKey ephemeralPublicKey, java.security.PrivateKey ephemeralPrivateKey, java.security.PublicKey otherPartyEphemeralKey)
      Constructor without user keying material.
      MQVParameterSpec​(java.security.PublicKey ephemeralPublicKey, java.security.PrivateKey ephemeralPrivateKey, java.security.PublicKey otherPartyEphemeralKey, byte[] userKeyingMaterial)
      Base constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.security.PrivateKey getEphemeralPrivateKey()
      Return our ephemeral private key.
      java.security.PublicKey getEphemeralPublicKey()
      Return our ephemeral public key, if available.
      java.security.PublicKey getOtherPartyEphemeralKey()
      Return the other party's ephemeral public key.
      byte[] getUserKeyingMaterial()
      Return the user keying material for the KDF used to derive the final secret key.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • MQVParameterSpec

        public MQVParameterSpec​(java.security.PublicKey ephemeralPublicKey,
                                java.security.PrivateKey ephemeralPrivateKey,
                                java.security.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​(java.security.PublicKey ephemeralPublicKey,
                                java.security.PrivateKey ephemeralPrivateKey,
                                java.security.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​(java.security.KeyPair ephemeralKeyPair,
                                java.security.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​(java.security.PrivateKey ephemeralPrivateKey,
                                java.security.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

        public MQVParameterSpec​(java.security.KeyPair ephemeralKeyPair,
                                java.security.PublicKey otherPartyEphemeralKey)
        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

        public MQVParameterSpec​(java.security.PrivateKey ephemeralPrivateKey,
                                java.security.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.
        Parameters:
        ephemeralPrivateKey - our ephemeral private key.
        otherPartyEphemeralKey - the other party's ephemeral public key.
    • Method Detail

      • getEphemeralPrivateKey

        public java.security.PrivateKey getEphemeralPrivateKey()
        Return our ephemeral private key.
        Returns:
        our ephemeral private key.
      • getEphemeralPublicKey

        public java.security.PublicKey getEphemeralPublicKey()
        Return our ephemeral public key, if available.
        Returns:
        the ephemeral public key, may be null.
      • getOtherPartyEphemeralKey

        public java.security.PublicKey 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.