summaryrefslogtreecommitdiffstats
path: root/crypto/des/speed.c
diff options
context:
space:
mode:
authorBodo Möller <bodo@openssl.org>1999-12-03 20:24:21 +0000
committerBodo Möller <bodo@openssl.org>1999-12-03 20:24:21 +0000
commitcddfe788fbbc4726fcf9892963df3f3e823eb233 (patch)
treefe129b6f8b162a2053634fdfb62d17d9dad17a10 /crypto/des/speed.c
parent21131f00d7ffcdac99334ce5704366c1cdd06fc4 (diff)
Add functions des_set_key_checked, des_set_key_unchecked.
Never use des_set_key (it depends on the global variable des_check_key), but usually des_set_key_unchecked. Only destest.c bothered to look at the return values of des_set_key, but it did not set des_check_key -- if it had done so, most checks would have failed because of wrong parity and because of weak keys.
Diffstat (limited to 'crypto/des/speed.c')
-rw-r--r--crypto/des/speed.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/crypto/des/speed.c b/crypto/des/speed.c
index da41abcb03..652cf5b03c 100644
--- a/crypto/des/speed.c
+++ b/crypto/des/speed.c
@@ -190,12 +190,12 @@ int main(int argc, char **argv)
printf("program when this computer is idle.\n");
#endif
- des_set_key(&key2,sch2);
- des_set_key(&key3,sch3);
+ des_set_key_unchecked(&key2,sch2);
+ des_set_key_unchecked(&key3,sch3);
#ifndef SIGALRM
printf("First we calculate the approximate speed ...\n");
- des_set_key(&key,sch);
+ des_set_key_unchecked(&key,sch);
count=10;
do {
long i;
@@ -225,7 +225,7 @@ int main(int argc, char **argv)
Time_F(START);
for (count=0,run=1; COND(ca); count++)
- des_set_key(&key,sch);
+ des_set_key_unchecked(&key,sch);
d=Time_F(STOP);
printf("%ld set_key's in %.2f seconds\n",count,d);
a=((double)COUNT(ca))/d;