Class KeyExchange

java.lang.Object
com.jcraft.jsch.KeyExchange
Direct Known Subclasses:
DHECN, DHGEX, DHGN, DHXEC

public abstract class KeyExchange
extends java.lang.Object
  • Field Summary

    Fields
    Modifier and Type Field Description
    protected int DSS  
    protected int ECDSA  
    protected int EDDSA  
    protected byte[] H  
    protected byte[] K  
    protected byte[] K_S  
    protected int RSA  
    protected Session session  
    protected HASH sha  
    static int STATE_END  
  • Constructor Summary

    Constructors
    Constructor Description
    KeyExchange()  
  • Method Summary

    Modifier and Type Method Description
    java.lang.String getFingerPrint()  
    java.lang.String getKeyAlgorithName()  
    java.lang.String getKeyType()  
    abstract int getState()  
    protected static java.lang.String[] guess​(Session session, byte[] I_S, byte[] I_C)  
    abstract void init​(Session session, byte[] V_S, byte[] V_C, byte[] I_S, byte[] I_C)  
    abstract boolean next​(Buffer buf)  
    protected byte[] normalize​(byte[] secret)  
    protected boolean verify​(java.lang.String alg, byte[] K_S, int index, byte[] sig_of_H)  

    Methods inherited from class java.lang.Object

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

  • Constructor Details

    • KeyExchange

      public KeyExchange()
  • Method Details

    • init

      public abstract void init​(Session session, byte[] V_S, byte[] V_C, byte[] I_S, byte[] I_C) throws java.lang.Exception
      Throws:
      java.lang.Exception
    • next

      public abstract boolean next​(Buffer buf) throws java.lang.Exception
      Throws:
      java.lang.Exception
    • getState

      public abstract int getState()
    • getKeyType

      public java.lang.String getKeyType()
    • getKeyAlgorithName

      public java.lang.String getKeyAlgorithName()
    • guess

      protected static java.lang.String[] guess​(Session session, byte[] I_S, byte[] I_C) throws java.lang.Exception
      Throws:
      java.lang.Exception
    • getFingerPrint

      public java.lang.String getFingerPrint()
    • normalize

      protected byte[] normalize​(byte[] secret)
    • verify

      protected boolean verify​(java.lang.String alg, byte[] K_S, int index, byte[] sig_of_H) throws java.lang.Exception
      Throws:
      java.lang.Exception