mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2024-11-25 00:38:24 -05:00
Use stronger PRNG for MS-MPPE-Send/Recv-Key salt
When generating a MS-MPPE-Send/Recv-Key, don't use a weak PRNG for the salt. Signed-off-by: Nick Lowe <nick.lowe@lugatech.com>
This commit is contained in:
parent
9e1f1bdb6f
commit
c06c9099f0
@ -1197,7 +1197,9 @@ int radius_msg_add_mppe_keys(struct radius_msg *msg,
|
||||
vhdr = (struct radius_attr_vendor *) pos;
|
||||
vhdr->vendor_type = RADIUS_VENDOR_ATTR_MS_MPPE_SEND_KEY;
|
||||
pos = (u8 *) (vhdr + 1);
|
||||
salt = os_random() | 0x8000;
|
||||
if (os_get_random((u8 *) &salt, sizeof(salt)) < 0)
|
||||
return 0;
|
||||
salt |= 0x8000;
|
||||
WPA_PUT_BE16(pos, salt);
|
||||
pos += 2;
|
||||
encrypt_ms_key(send_key, send_key_len, salt, req_authenticator, secret,
|
||||
|
Loading…
Reference in New Issue
Block a user