mirror of
https://github.com/danog/phpseclib.git
synced 2024-12-13 09:37:37 +01:00
[fix-weak-ssh-dh-keys] bitwise_leftShift() expects number of bits, not bytes.
This commit is contained in:
parent
252c6ec68d
commit
1733c3366c
@ -1195,7 +1195,7 @@ class Net_SSH2 {
|
||||
|
||||
-- http://tools.ietf.org/html/rfc4419#section-6.2 */
|
||||
$q = new Math_BigInteger(1);
|
||||
$q = $q->bitwise_leftShift(2 * $keyLength);
|
||||
$q = $q->bitwise_leftShift(16 * $keyLength); // 2 * 8 * $keyLength
|
||||
$q = $q->subtract(new Math_BigInteger(1));
|
||||
|
||||
$g = new Math_BigInteger(2);
|
||||
|
Loading…
Reference in New Issue
Block a user