Class AbstractDHKeyExchange

    • Field Detail

      • v_s

        protected byte[] v_s
      • v_c

        protected byte[] v_c
      • i_s

        protected byte[] i_s
      • i_c

        protected byte[] i_c
      • k

        protected byte[] k
      • h

        protected byte[] h
      • e

        private byte[] e
      • eValue

        private java.math.BigInteger eValue
      • f

        private byte[] f
      • fValue

        private java.math.BigInteger fValue
      • session

        private final Session session
    • Constructor Detail

      • AbstractDHKeyExchange

        protected AbstractDHKeyExchange​(Session session)
    • Method Detail

      • init

        public void init​(byte[] v_s,
                         byte[] v_c,
                         byte[] i_s,
                         byte[] i_c)
                  throws java.lang.Exception
        Description copied from interface: KeyExchange
        Initialize the key exchange algorithm.
        Specified by:
        init in interface KeyExchange
        Parameters:
        v_s - the server identification string
        v_c - the client identification string
        i_s - the server key initialization packet
        i_c - the client key initialization packet
        Throws:
        java.lang.Exception - if an error occurs
      • getHash

        public Digest getHash()
        Description copied from interface: KeyExchange
        The message digest used by this key exchange algorithm.
        Specified by:
        getHash in interface KeyExchange
        Returns:
        the message digest
      • getH

        public byte[] getH()
        Description copied from interface: KeyExchange
        Retrieves the computed h parameter
        Specified by:
        getH in interface KeyExchange
        Returns:
        The h parameter
      • getK

        public byte[] getK()
        Description copied from interface: KeyExchange
        Retrieves the computed k parameter
        Specified by:
        getK in interface KeyExchange
        Returns:
        The k parameter
      • getE

        protected byte[] getE()
      • getEValue

        protected java.math.BigInteger getEValue()
      • updateE

        protected byte[] updateE​(Buffer buffer)
      • updateE

        protected byte[] updateE​(byte[] mpInt)
      • setE

        protected void setE​(byte[] e)
      • validateEValue

        protected void validateEValue​(java.math.BigInteger pValue)
                               throws SshException
        Throws:
        SshException
      • getF

        protected byte[] getF()
      • getFValue

        protected java.math.BigInteger getFValue()
      • updateF

        protected byte[] updateF​(Buffer buffer)
      • updateF

        protected byte[] updateF​(byte[] mpInt)
      • setF

        protected void setF​(byte[] f)
      • validateFValue

        protected void validateFValue​(java.math.BigInteger pValue)
                               throws SshException
        Throws:
        SshException
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object