Lines 141-146
Link Here
|
141 |
#ifndef OPENSSL_NO_RIPEMD |
141 |
#ifndef OPENSSL_NO_RIPEMD |
142 |
#include <openssl/ripemd.h> |
142 |
#include <openssl/ripemd.h> |
143 |
#endif |
143 |
#endif |
|
|
144 |
#ifndef OPENSSL_NO_WHIRLPOOL |
145 |
#include <openssl/whrlpool.h> |
146 |
#endif |
144 |
#ifndef OPENSSL_NO_RC4 |
147 |
#ifndef OPENSSL_NO_RC4 |
145 |
#include <openssl/rc4.h> |
148 |
#include <openssl/rc4.h> |
146 |
#endif |
149 |
#endif |
Lines 195-201
Link Here
|
195 |
static int do_multi(int multi); |
198 |
static int do_multi(int multi); |
196 |
#endif |
199 |
#endif |
197 |
|
200 |
|
198 |
#define ALGOR_NUM 21 |
201 |
#define ALGOR_NUM 22 |
199 |
#define SIZE_NUM 5 |
202 |
#define SIZE_NUM 5 |
200 |
#define RSA_NUM 4 |
203 |
#define RSA_NUM 4 |
201 |
#define DSA_NUM 3 |
204 |
#define DSA_NUM 3 |
Lines 207-213
Link Here
|
207 |
"md2","mdc2","md4","md5","hmac(md5)","sha1","rmd160","rc4", |
210 |
"md2","mdc2","md4","md5","hmac(md5)","sha1","rmd160","rc4", |
208 |
"des cbc","des ede3","idea cbc", |
211 |
"des cbc","des ede3","idea cbc", |
209 |
"rc2 cbc","rc5-32/12 cbc","blowfish cbc","cast cbc", |
212 |
"rc2 cbc","rc5-32/12 cbc","blowfish cbc","cast cbc", |
210 |
"aes-128 cbc","aes-192 cbc","aes-256 cbc","evp","sha256","sha512"}; |
213 |
"aes-128 cbc","aes-192 cbc","aes-256 cbc","evp","sha256","sha512", |
|
|
214 |
"whirlpool"}; |
211 |
static double results[ALGOR_NUM][SIZE_NUM]; |
215 |
static double results[ALGOR_NUM][SIZE_NUM]; |
212 |
static int lengths[SIZE_NUM]={16,64,256,1024,8*1024}; |
216 |
static int lengths[SIZE_NUM]={16,64,256,1024,8*1024}; |
213 |
static double rsa_results[RSA_NUM][2]; |
217 |
static double rsa_results[RSA_NUM][2]; |
Lines 344-349
Link Here
|
344 |
unsigned char sha512[SHA512_DIGEST_LENGTH]; |
348 |
unsigned char sha512[SHA512_DIGEST_LENGTH]; |
345 |
#endif |
349 |
#endif |
346 |
#endif |
350 |
#endif |
|
|
351 |
#ifndef OPENSSL_NO_WHIRLPOOL |
352 |
unsigned char whirlpool[WHIRLPOOL_DIGEST_LENGTH]; |
353 |
#endif |
347 |
#ifndef OPENSSL_NO_RIPEMD |
354 |
#ifndef OPENSSL_NO_RIPEMD |
348 |
unsigned char rmd160[RIPEMD160_DIGEST_LENGTH]; |
355 |
unsigned char rmd160[RIPEMD160_DIGEST_LENGTH]; |
349 |
#endif |
356 |
#endif |
Lines 419-424
Link Here
|
419 |
#define D_EVP 18 |
426 |
#define D_EVP 18 |
420 |
#define D_SHA256 19 |
427 |
#define D_SHA256 19 |
421 |
#define D_SHA512 20 |
428 |
#define D_SHA512 20 |
|
|
429 |
#define D_WHIRLPOOL 21 |
422 |
double d=0.0; |
430 |
double d=0.0; |
423 |
long c[ALGOR_NUM][SIZE_NUM]; |
431 |
long c[ALGOR_NUM][SIZE_NUM]; |
424 |
#define R_DSA_512 0 |
432 |
#define R_DSA_512 0 |
Lines 738-743
Link Here
|
738 |
else |
746 |
else |
739 |
#endif |
747 |
#endif |
740 |
#endif |
748 |
#endif |
|
|
749 |
#ifndef OPENSSL_NO_WHIRLPOOL |
750 |
if (strcmp(*argv,"whirlpool") == 0) doit[D_WHIRLPOOL]=1; |
751 |
else |
752 |
#endif |
741 |
#ifndef OPENSSL_NO_RIPEMD |
753 |
#ifndef OPENSSL_NO_RIPEMD |
742 |
if (strcmp(*argv,"ripemd") == 0) doit[D_RMD160]=1; |
754 |
if (strcmp(*argv,"ripemd") == 0) doit[D_RMD160]=1; |
743 |
else |
755 |
else |
Lines 926-937
Link Here
|
926 |
#ifndef OPENSSL_NO_SHA512 |
938 |
#ifndef OPENSSL_NO_SHA512 |
927 |
BIO_printf(bio_err,"sha512 "); |
939 |
BIO_printf(bio_err,"sha512 "); |
928 |
#endif |
940 |
#endif |
|
|
941 |
#ifndef OPENSSL_NO_WHIRLPOOL |
942 |
BIO_printf(bio_err,"whirlpool"); |
943 |
#endif |
929 |
#ifndef OPENSSL_NO_RIPEMD160 |
944 |
#ifndef OPENSSL_NO_RIPEMD160 |
930 |
BIO_printf(bio_err,"rmd160"); |
945 |
BIO_printf(bio_err,"rmd160"); |
931 |
#endif |
946 |
#endif |
932 |
#if !defined(OPENSSL_NO_MD2) || !defined(OPENSSL_NO_MDC2) || \ |
947 |
#if !defined(OPENSSL_NO_MD2) || !defined(OPENSSL_NO_MDC2) || \ |
933 |
!defined(OPENSSL_NO_MD4) || !defined(OPENSSL_NO_MD5) || \ |
948 |
!defined(OPENSSL_NO_MD4) || !defined(OPENSSL_NO_MD5) || \ |
934 |
!defined(OPENSSL_NO_SHA1) || !defined(OPENSSL_NO_RIPEMD160) |
949 |
!defined(OPENSSL_NO_SHA1) || !defined(OPENSSL_NO_RIPEMD160) || \ |
|
|
950 |
!defined(OPENSSL_NO_WHIRLPOOL) |
935 |
BIO_printf(bio_err,"\n"); |
951 |
BIO_printf(bio_err,"\n"); |
936 |
#endif |
952 |
#endif |
937 |
|
953 |
|
Lines 1146-1151
Link Here
|
1146 |
c[D_CBC_256_AES][0]=count; |
1162 |
c[D_CBC_256_AES][0]=count; |
1147 |
c[D_SHA256][0]=count; |
1163 |
c[D_SHA256][0]=count; |
1148 |
c[D_SHA512][0]=count; |
1164 |
c[D_SHA512][0]=count; |
|
|
1165 |
c[D_WHIRLPOOL][0]=count; |
1149 |
|
1166 |
|
1150 |
for (i=1; i<SIZE_NUM; i++) |
1167 |
for (i=1; i<SIZE_NUM; i++) |
1151 |
{ |
1168 |
{ |
Lines 1158-1163
Link Here
|
1158 |
c[D_RMD160][i]=c[D_RMD160][0]*4*lengths[0]/lengths[i]; |
1175 |
c[D_RMD160][i]=c[D_RMD160][0]*4*lengths[0]/lengths[i]; |
1159 |
c[D_SHA256][i]=c[D_SHA256][0]*4*lengths[0]/lengths[i]; |
1176 |
c[D_SHA256][i]=c[D_SHA256][0]*4*lengths[0]/lengths[i]; |
1160 |
c[D_SHA512][i]=c[D_SHA512][0]*4*lengths[0]/lengths[i]; |
1177 |
c[D_SHA512][i]=c[D_SHA512][0]*4*lengths[0]/lengths[i]; |
|
|
1178 |
c[D_WHIRLPOOL][i]=c[D_WHIRLPOOL][0]*4*lengths[0]/lengths[i]; |
1161 |
} |
1179 |
} |
1162 |
for (i=1; i<SIZE_NUM; i++) |
1180 |
for (i=1; i<SIZE_NUM; i++) |
1163 |
{ |
1181 |
{ |
Lines 1466-1473
Link Here
|
1466 |
} |
1484 |
} |
1467 |
} |
1485 |
} |
1468 |
#endif |
1486 |
#endif |
|
|
1487 |
#endif |
1469 |
|
1488 |
|
|
|
1489 |
#ifndef OPENSSL_NO_WHIRLPOOL |
1490 |
if (doit[D_WHIRLPOOL]) |
1491 |
{ |
1492 |
for (j=0; j<SIZE_NUM; j++) |
1493 |
{ |
1494 |
print_message(names[D_WHIRLPOOL],c[D_WHIRLPOOL][j],lengths[j]); |
1495 |
Time_F(START); |
1496 |
for (count=0,run=1; COND(c[D_WHIRLPOOL][j]); count++) |
1497 |
WHIRLPOOL(buf,lengths[j],whirlpool); |
1498 |
d=Time_F(STOP); |
1499 |
print_result(D_WHIRLPOOL,j,count,d); |
1500 |
} |
1501 |
} |
1470 |
#endif |
1502 |
#endif |
|
|
1503 |
|
1471 |
#ifndef OPENSSL_NO_RIPEMD |
1504 |
#ifndef OPENSSL_NO_RIPEMD |
1472 |
if (doit[D_RMD160]) |
1505 |
if (doit[D_RMD160]) |
1473 |
{ |
1506 |
{ |