projects
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Fix major cockup with short keys in CAST-128.
[openssl.git]
/
crypto
/
cast
/
c_skey.c
diff --git
a/crypto/cast/c_skey.c
b/crypto/cast/c_skey.c
index 2fc3363dcd0d1672bfd4f1c79dbc47ee2c3be195..5262a2ebd2122a82387eab8a83b69175bac284b8 100644
(file)
--- a/
crypto/cast/c_skey.c
+++ b/
crypto/cast/c_skey.c
@@
-88,6
+88,10
@@
unsigned char *data;
if (len > 16) len=16;
for (i=0; i<len; i++)
x[i]=data[i];
+ if(len <= 10)
+ key->short_key=1;
+ else
+ key->short_key=0;
K= &k[0];
X[0]=((x[ 0]<<24)|(x[ 1]<<16)|(x[ 2]<<8)|x[ 3])&0xffffffffL;