projects
/
oweals
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Latest bn_mont.c modification broke ECDSA test. I've got math wrong, which
[oweals/openssl.git]
/
crypto
/
des
/
ecb_enc.c
diff --git
a/crypto/des/ecb_enc.c
b/crypto/des/ecb_enc.c
index acf23fdd00213fac4f58f735333a4764a6aaae7c..0861988323c6063fb1bfc73aec476c71bdc32c59 100644
(file)
--- a/
crypto/des/ecb_enc.c
+++ b/
crypto/des/ecb_enc.c
@@
-57,21
+57,22
@@
*/
#include "des_locl.h"
*/
#include "des_locl.h"
-#include "spr.h"
+#include "des_ver.h"
+#include <openssl/opensslv.h>
+#include <openssl/bio.h>
-
char *libdes_version="libdes v 3.24 - 20-Apr-1996 - eay"
;
-
char *DES_version="DES part of SSLeay 0.9.0b 29-Jun-1998"
;
+
OPENSSL_GLOBAL const char libdes_version[]="libdes" OPENSSL_VERSION_PTEXT
;
+
OPENSSL_GLOBAL const char DES_version[]="DES" OPENSSL_VERSION_PTEXT
;
-c
har *des_options(
)
+c
onst char *DES_options(void
)
{
static int init=1;
static char buf[32];
if (init)
{
{
static int init=1;
static char buf[32];
if (init)
{
- char *ptr,*unroll,*risc,*size;
+ c
onst c
har *ptr,*unroll,*risc,*size;
- init=0;
#ifdef DES_PTR
ptr="ptr";
#else
#ifdef DES_PTR
ptr="ptr";
#else
@@
-96,29
+97,26
@@
char *des_options()
size="int";
else
size="long";
size="int";
else
size="long";
- sprintf(buf,"des(%s,%s,%s,%s)",ptr,risc,unroll,size);
+ BIO_snprintf(buf,sizeof buf,"des(%s,%s,%s,%s)",ptr,risc,unroll,
+ size);
+ init=0;
}
return(buf);
}
}
return(buf);
}
-void des_ecb_encrypt(input, output, ks, enc)
-des_cblock (*input);
-des_cblock (*output);
-des_key_schedule ks;
-int enc;
+void DES_ecb_encrypt(const_DES_cblock *input, DES_cblock *output,
+ DES_key_schedule *ks, int enc)
{
register DES_LONG l;
{
register DES_LONG l;
- register unsigned char *in,*out;
DES_LONG ll[2];
DES_LONG ll[2];
+ const unsigned char *in = &(*input)[0];
+ unsigned char *out = &(*output)[0];
- in=(unsigned char *)input;
- out=(unsigned char *)output;
c2l(in,l); ll[0]=l;
c2l(in,l); ll[1]=l;
c2l(in,l); ll[0]=l;
c2l(in,l); ll[1]=l;
-
des_encrypt
(ll,ks,enc);
+
DES_encrypt1
(ll,ks,enc);
l=ll[0]; l2c(l,out);
l=ll[1]; l2c(l,out);
l=ll[0]=ll[1]=0;
}
l=ll[0]; l2c(l,out);
l=ll[1]; l2c(l,out);
l=ll[0]=ll[1]=0;
}
-