[BACK]Return to kex.h CVS log [TXT][DIR] Up to [local] / src / usr.bin / ssh

Diff for /src/usr.bin/ssh/kex.h between version 1.2.2.4 and 1.3

version 1.2.2.4, 2001/03/21 18:52:47 version 1.3, 2000/05/25 20:45:20
Line 1 
Line 1 
 /*      $OpenBSD$       */  
   
 /*  /*
  * Copyright (c) 2000 Markus Friedl.  All rights reserved.   * Copyright (c) 2000 Markus Friedl.  All rights reserved.
  *   *
Line 11 
Line 9 
  * 2. Redistributions in binary form must reproduce the above copyright   * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the   *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.   *    documentation and/or other materials provided with the distribution.
    * 3. All advertising materials mentioning features or use of this software
    *    must display the following acknowledgement:
    *      This product includes software developed by Markus Friedl.
    * 4. The name of the author may not be used to endorse or promote products
    *    derived from this software without specific prior written permission.
  *   *
  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR   * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES   * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
Line 26 
Line 29 
 #ifndef KEX_H  #ifndef KEX_H
 #define KEX_H  #define KEX_H
   
 #include <openssl/evp.h>  #define KEX_DH1 "diffie-hellman-group1-sha1"
 #include "buffer.h"  #define KEX_DSS "ssh-dss"
   
 #define KEX_DH1         "diffie-hellman-group1-sha1"  
 #define KEX_DHGEX       "diffie-hellman-group-exchange-sha1"  
   
 enum kex_init_proposals {  enum kex_init_proposals {
         PROPOSAL_KEX_ALGS,          PROPOSAL_KEX_ALGS,
         PROPOSAL_SERVER_HOST_KEY_ALGS,          PROPOSAL_SERVER_HOST_KEY_ALGS,
Line 52 
Line 52 
         MODE_MAX          MODE_MAX
 };  };
   
 enum kex_exchange {  
         DH_GRP1_SHA1,  
         DH_GEX_SHA1  
 };  
   
 typedef struct Kex Kex;  typedef struct Kex Kex;
 typedef struct Mac Mac;  typedef struct Mac Mac;
 typedef struct Comp Comp;  typedef struct Comp Comp;
 typedef struct Enc Enc;  typedef struct Enc Enc;
   
 struct Enc {  struct Enc {
         char            *name;          int             type;
         Cipher          *cipher;  
         int             enabled;          int             enabled;
         u_char  *key;          int             block_size;
         u_char  *iv;          unsigned char   *key;
           unsigned char   *iv;
           int             key_len;
           int             iv_len;
           char            *name;
 };  };
 struct Mac {  struct Mac {
         char            *name;  
         int             enabled;  
         EVP_MD          *md;          EVP_MD          *md;
           int             enabled;
         int             mac_len;          int             mac_len;
         u_char  *key;          unsigned char   *key;
         int             key_len;          int             key_len;
           char            *name;
 };  };
 struct Comp {  struct Comp {
         int             type;          int             type;
Line 89 
Line 87 
         int             we_need;          int             we_need;
         int             server;          int             server;
         char            *name;          char            *name;
         int             hostkey_type;          char            *hostkeyalg;
         int             kex_type;  
 };  };
   
 Buffer  *kex_init(char *myproposal[PROPOSAL_MAX]);  Buffer  *kex_init(char *myproposal[PROPOSAL_MAX]);
Line 101 
Line 98 
 Kex *  Kex *
 kex_choose_conf(char *cprop[PROPOSAL_MAX],  kex_choose_conf(char *cprop[PROPOSAL_MAX],
     char *sprop[PROPOSAL_MAX], int server);      char *sprop[PROPOSAL_MAX], int server);
 int     kex_derive_keys(Kex *k, u_char *hash, BIGNUM *shared_secret);  int     kex_derive_keys(Kex *k, unsigned char *hash, BIGNUM *shared_secret);
 void    packet_set_kex(Kex *k);  void    packet_set_kex(Kex *k);
 int     dh_pub_is_valid(DH *dh, BIGNUM *dh_pub);  int     dh_pub_is_valid(DH *dh, BIGNUM *dh_pub);
 DH      *dh_new_group_asc(const char *, const char *);  DH      *dh_new_group1();
 DH      *dh_new_group(BIGNUM *, BIGNUM *);  
 void    dh_gen_key(DH *, int);  
 DH      *dh_new_group1(void);  
   
 u_char *  unsigned char *
 kex_hash(  kex_hash(
     char *client_version_string,      char *client_version_string,
     char *server_version_string,      char *server_version_string,
Line 120 
Line 114 
     BIGNUM *server_dh_pub,      BIGNUM *server_dh_pub,
     BIGNUM *shared_secret);      BIGNUM *shared_secret);
   
 u_char *  
 kex_hash_gex(  
     char *client_version_string,  
     char *server_version_string,  
     char *ckexinit, int ckexinitlen,  
     char *skexinit, int skexinitlen,  
     char *serverhostkeyblob, int sbloblen,  
     int minbits, BIGNUM *prime, BIGNUM *gen,  
     BIGNUM *client_dh_pub,  
     BIGNUM *server_dh_pub,  
     BIGNUM *shared_secret);  
 #endif  #endif

Legend:
Removed from v.1.2.2.4  
changed lines
  Added in v.1.3