mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-11-28 15:32:45 +00:00
Make certain that random keys havethe correct parity, for interoperation with
MIT v4 implementations. Submitted by: Reece R. Pollack <reece@eco.twg.com>
This commit is contained in:
parent
f14d551c2c
commit
2b50c84ac1
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=8388
@ -2,7 +2,7 @@
|
|||||||
/* Copyright (C) 1993 Eric Young - see README for more details */
|
/* Copyright (C) 1993 Eric Young - see README for more details */
|
||||||
|
|
||||||
/*-
|
/*-
|
||||||
* $Id: rand_key.c,v 1.2 1994/07/19 19:22:04 g89r4222 Exp $
|
* $Id: rand_key.c,v 1.1.1.1 1994/09/30 14:49:51 csgr Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "des_locl.h"
|
#include "des_locl.h"
|
||||||
@ -36,6 +36,7 @@ des_cblock ret;
|
|||||||
des_set_odd_parity((des_cblock *)key);
|
des_set_odd_parity((des_cblock *)key);
|
||||||
des_cbc_cksum((des_cblock *)key,(des_cblock *)key,
|
des_cbc_cksum((des_cblock *)key,(des_cblock *)key,
|
||||||
(long)sizeof(key),ks,(des_cblock *)data);
|
(long)sizeof(key),ks,(des_cblock *)data);
|
||||||
|
des_set_odd_parity((des_cblock *)key);
|
||||||
|
|
||||||
bcopy(key,ret,sizeof(key));
|
bcopy(key,ret,sizeof(key));
|
||||||
bzero(key,sizeof(key));
|
bzero(key,sizeof(key));
|
||||||
|
Loading…
Reference in New Issue
Block a user