summaryrefslogtreecommitdiffstats
path: root/crypto/evp/e_des.c
diff options
context:
space:
mode:
authorBen Laurie <ben@openssl.org>2001-07-30 23:57:25 +0000
committerBen Laurie <ben@openssl.org>2001-07-30 23:57:25 +0000
commitdbad169019598981174ff46c7a9bf58373b0e53a (patch)
treece8ca1188d5614648f24b03967785543f1edc8f5 /crypto/evp/e_des.c
parent3ba5d1cf2eb6ef28ac5f6d9f3d28020d00c5be50 (diff)
Really add the EVP and all of the DES changes.
Diffstat (limited to 'crypto/evp/e_des.c')
-rw-r--r--crypto/evp/e_des.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/crypto/evp/e_des.c b/crypto/evp/e_des.c
index 2193b1c350..ed2594311f 100644
--- a/crypto/evp/e_des.c
+++ b/crypto/evp/e_des.c
@@ -62,6 +62,7 @@
#include <openssl/evp.h>
#include <openssl/objects.h>
#include "evp_locl.h"
+#include <openssl/des.h>
static int des_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
const unsigned char *iv, int enc);
@@ -72,21 +73,21 @@ static int des_ecb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
const unsigned char *in, unsigned int inl)
{
BLOCK_CIPHER_ecb_loop()
- des_ecb_encrypt((des_cblock *)(in + i), (des_cblock *)(out + i), ctx->c.des_ks, ctx->encrypt);
+ des_ecb_encrypt((des_cblock *)(in + i), (des_cblock *)(out + i), ctx->cipher_data, ctx->encrypt);
return 1;
}
static int des_ofb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
const unsigned char *in, unsigned int inl)
{
- des_ofb64_encrypt(in, out, (long)inl, ctx->c.des_ks, (des_cblock *)ctx->iv, &ctx->num);
+ des_ofb64_encrypt(in, out, (long)inl, ctx->cipher_data, (des_cblock *)ctx->iv, &ctx->num);
return 1;
}
static int des_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
const unsigned char *in, unsigned int inl)
{
- des_ncbc_encrypt(in, out, (long)inl, ctx->c.des_ks,
+ des_ncbc_encrypt(in, out, (long)inl, ctx->cipher_data,
(des_cblock *)ctx->iv, ctx->encrypt);
return 1;
}
@@ -94,12 +95,12 @@ static int des_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
static int des_cfb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
const unsigned char *in, unsigned int inl)
{
- des_cfb64_encrypt(in, out, (long)inl, ctx->c.des_ks,
+ des_cfb64_encrypt(in, out, (long)inl, ctx->cipher_data,
(des_cblock *)ctx->iv, &ctx->num, ctx->encrypt);
return 1;
}
-BLOCK_CIPHER_defs(des, des_ks, NID_des, 8, 8, 8,
+BLOCK_CIPHER_defs(des, des_key_schedule, NID_des, 8, 8, 8,
0, des_init_key, NULL,
EVP_CIPHER_set_asn1_iv,
EVP_CIPHER_get_asn1_iv,
@@ -111,7 +112,7 @@ static int des_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
{
des_cblock *deskey = (des_cblock *)key;
- des_set_key_unchecked(deskey,ctx->c.des_ks);
+ des_set_key_unchecked(deskey,ctx->cipher_data);
return 1;
}