Class AbstractKeyExchange

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected org.bouncycastle.crypto.BasicAgreement agreement
      Key Agreement.
      protected org.bouncycastle.crypto.AsymmetricCipherKeyPair keypair
      Generated key pair.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      byte[] generateSymKey​(byte[] remotekey)
      Generates the shared symmetric key given the remote public key.
      byte[] getPublicKey()
      Returns the generated public key.
      • Methods inherited from class java.lang.Object

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

      • keypair

        protected org.bouncycastle.crypto.AsymmetricCipherKeyPair keypair
        Generated key pair.
      • agreement

        protected org.bouncycastle.crypto.BasicAgreement agreement
        Key Agreement.
    • Constructor Detail

      • AbstractKeyExchange

        public AbstractKeyExchange()
    • Method Detail

      • generateSymKey

        public byte[] generateSymKey​(byte[] remotekey)
        Generates the shared symmetric key given the remote public key.
        Specified by:
        generateSymKey in interface IKeyExchange
        Parameters:
        remotekey - The remote public key.
        Returns:
        Shared symmetric key;
      • getPublicKey

        public byte[] getPublicKey()
        Returns the generated public key.
        Specified by:
        getPublicKey in interface IKeyExchange
        Returns:
        Generated public key.