diff options
author | Ben Laurie <ben@openssl.org> | 1999-01-17 16:26:24 +0000 |
---|---|---|
committer | Ben Laurie <ben@openssl.org> | 1999-01-17 16:26:24 +0000 |
commit | 649cdb7be91d75184a51993b37fa6a9813dd2ef1 (patch) | |
tree | 9b899572037fa553f470ab990c43d86911b1065f /crypto/cast/c_skey.c | |
parent | fdd3b6421597e412fe3e80f09495caff4c8bd897 (diff) |
Fix major cockup with short keys in CAST-128.
Diffstat (limited to 'crypto/cast/c_skey.c')
-rw-r--r-- | crypto/cast/c_skey.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/crypto/cast/c_skey.c b/crypto/cast/c_skey.c index 2fc3363dcd..5262a2ebd2 100644 --- 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; |