[fix-weak-ssh-dh-keys] bitwise_leftShift() expects number of bits, not bytes.

This commit is contained in:
Andreas Fischer 2013-06-02 16:55:19 +02:00
parent 252c6ec68d
commit 1733c3366c

View File

@ -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);