diff options
author | Damien Miller <djm@mindrot.org> | 2002-02-19 15:26:42 +1100 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2002-02-19 15:26:42 +1100 |
commit | 21cf4e0628bc5b372e002916f8b2020d98524a35 (patch) | |
tree | 8335027111f526af8de872d47cc2fc1a1082a569 /cipher.h | |
parent | a93c6d87ef75a23cfbdb30f0a5821ae54300895f (diff) |
- markus@cvs.openbsd.org 2002/02/18 13:05:32
[cipher.c cipher.h]
switch to EVP, ok djm@ deraadt@
Diffstat (limited to 'cipher.h')
-rw-r--r-- | cipher.h | 38 |
1 files changed, 3 insertions, 35 deletions
@@ -32,16 +32,12 @@ | |||
32 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 32 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
33 | */ | 33 | */ |
34 | 34 | ||
35 | /* RCSID("$OpenBSD: cipher.h,v 1.30 2002/02/14 23:41:01 markus Exp $"); */ | 35 | /* RCSID("$OpenBSD: cipher.h,v 1.31 2002/02/18 13:05:32 markus Exp $"); */ |
36 | 36 | ||
37 | #ifndef CIPHER_H | 37 | #ifndef CIPHER_H |
38 | #define CIPHER_H | 38 | #define CIPHER_H |
39 | 39 | ||
40 | #include <openssl/des.h> | 40 | #include <openssl/evp.h> |
41 | #include <openssl/blowfish.h> | ||
42 | #include <openssl/rc4.h> | ||
43 | #include <openssl/cast.h> | ||
44 | #include "rijndael.h" | ||
45 | /* | 41 | /* |
46 | * Cipher types for SSH-1. New types can be added, but old types should not | 42 | * Cipher types for SSH-1. New types can be added, but old types should not |
47 | * be removed for compatibility. The maximum allowed value is 31. | 43 | * be removed for compatibility. The maximum allowed value is 31. |
@@ -67,36 +63,8 @@ typedef struct CipherContext CipherContext; | |||
67 | 63 | ||
68 | struct Cipher; | 64 | struct Cipher; |
69 | struct CipherContext { | 65 | struct CipherContext { |
70 | union { | ||
71 | struct { | ||
72 | des_key_schedule key; | ||
73 | des_cblock iv; | ||
74 | } des; | ||
75 | struct { | ||
76 | des_key_schedule key1; | ||
77 | des_key_schedule key2; | ||
78 | des_key_schedule key3; | ||
79 | des_cblock iv1; | ||
80 | des_cblock iv2; | ||
81 | des_cblock iv3; | ||
82 | } des3; | ||
83 | struct { | ||
84 | struct bf_key_st key; | ||
85 | u_char iv[8]; | ||
86 | } bf; | ||
87 | struct { | ||
88 | CAST_KEY key; | ||
89 | u_char iv[8]; | ||
90 | } cast; | ||
91 | struct { | ||
92 | u_char iv[16]; | ||
93 | rijndael_ctx enc; | ||
94 | rijndael_ctx dec; | ||
95 | } rijndael; | ||
96 | RC4_KEY rc4; | ||
97 | } u; | ||
98 | int plaintext; | 66 | int plaintext; |
99 | int encrypt; | 67 | EVP_CIPHER_CTX evp; |
100 | Cipher *cipher; | 68 | Cipher *cipher; |
101 | }; | 69 | }; |
102 | 70 | ||