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

Diff for /src/usr.bin/ssh/Attic/cipher-ctr.c between version 1.4 and 1.4.4.2

version 1.4, 2004/02/06 23:41:13 version 1.4.4.2, 2005/09/02 03:45:00
Line 17 
Line 17 
 RCSID("$OpenBSD$");  RCSID("$OpenBSD$");
   
 #include <openssl/evp.h>  #include <openssl/evp.h>
   #include <openssl/aes.h>
   
 #include "log.h"  #include "log.h"
 #include "xmalloc.h"  #include "xmalloc.h"
   
 #if OPENSSL_VERSION_NUMBER < 0x00907000L  
 #include "rijndael.h"  
 #define AES_KEY rijndael_ctx  
 #define AES_BLOCK_SIZE 16  
 #define AES_encrypt(a, b, c) rijndael_encrypt(c, a, b)  
 #define AES_set_encrypt_key(a, b, c) rijndael_set_key(c, (char *)a, b, 1)  
 #else  
 #include <openssl/aes.h>  
 #endif  
   
 const EVP_CIPHER *evp_aes_128_ctr(void);  const EVP_CIPHER *evp_aes_128_ctr(void);
 void ssh_aes_ctr_iv(EVP_CIPHER_CTX *, int, u_char *, u_int);  void ssh_aes_ctr_iv(EVP_CIPHER_CTX *, int, u_char *, u_int);
   
Line 91 
Line 82 
         }          }
         if (key != NULL)          if (key != NULL)
                 AES_set_encrypt_key(key, EVP_CIPHER_CTX_key_length(ctx) * 8,                  AES_set_encrypt_key(key, EVP_CIPHER_CTX_key_length(ctx) * 8,
                      &c->aes_ctx);                      &c->aes_ctx);
         if (iv != NULL)          if (iv != NULL)
                 memcpy(c->aes_counter, iv, AES_BLOCK_SIZE);                  memcpy(c->aes_counter, iv, AES_BLOCK_SIZE);
         return (1);          return (1);

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.4.4.2