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

Diff for /src/usr.bin/ssh/cipher.c between version 1.33 and 1.34

version 1.33, 2000/10/11 20:45:21 version 1.34, 2000/10/12 09:59:18
Line 62 
Line 62 
 void  void
 des_ssh1_setkey(CipherContext *cc, const u_char *key, u_int keylen)  des_ssh1_setkey(CipherContext *cc, const u_char *key, u_int keylen)
 {  {
           static int dowarn = 1;
           if (dowarn) {
                   error("Warning: use of DES is strongly discouraged "
                       "due to cryptographic weaknesses");
                   dowarn = 0;
           }
         des_set_key((void *)key, cc->u.des.key);          des_set_key((void *)key, cc->u.des.key);
 }  }
 void  void
Line 301 
Line 307 
                 SSH_CIPHER_NONE, 8, 0,                  SSH_CIPHER_NONE, 8, 0,
                 none_setkey, none_setiv,                  none_setkey, none_setiv,
                 none_crypt, none_crypt },                  none_crypt, none_crypt },
           { "des",
                   SSH_CIPHER_DES, 8, 8,
                   des_ssh1_setkey, des_ssh1_setiv,
                   des_ssh1_encrypt, des_ssh1_decrypt },
         { "3des",          { "3des",
                 SSH_CIPHER_3DES, 8, 16,                  SSH_CIPHER_3DES, 8, 16,
                 des3_ssh1_setkey, des3_setiv,                  des3_ssh1_setkey, des3_setiv,
Line 332 
Line 342 
 /*--*/  /*--*/
   
 unsigned int  unsigned int
 cipher_mask1()  cipher_mask_ssh1(int client)
 {  {
         unsigned int mask = 0;          unsigned int mask = 0;
         Cipher *c;          mask |= 1 << SSH_CIPHER_3DES;           /* Mandatory */
         for (c = ciphers; c->name != NULL; c++) {          mask |= 1 << SSH_CIPHER_BLOWFISH;
                 if (c->number > SSH_CIPHER_NONE)          if (client) {
                         mask |= 1 << c->number;                  mask |= 1 << SSH_CIPHER_DES;
         }          }
         return mask;          return mask;
 }  }
Line 347 
Line 357 
 cipher_by_name(const char *name)  cipher_by_name(const char *name)
 {  {
         Cipher *c;          Cipher *c;
         if (strcmp(name, "des") == 0)  
                 error("Warning: use of DES is strongly discouraged "  
                     "due to cryptographic weaknesses");  
         for (c = ciphers; c->name != NULL; c++)          for (c = ciphers; c->name != NULL; c++)
                 if (strcasecmp(c->name, name) == 0)                  if (strcasecmp(c->name, name) == 0)
                         return c;                          return c;

Legend:
Removed from v.1.33  
changed lines
  Added in v.1.34