From 97cf60900d7457416170008c7f78c7ca27b96a5a Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Fri, 7 Jun 2013 00:47:37 +0200 Subject: [PATCH] [feature/elliptic-curve] Rename $q to $max because that's what it is. --- phpseclib/Net/SSH2.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/phpseclib/Net/SSH2.php b/phpseclib/Net/SSH2.php index 3e4a391c..e01b4519 100644 --- a/phpseclib/Net/SSH2.php +++ b/phpseclib/Net/SSH2.php @@ -1194,12 +1194,11 @@ class Net_SSH2 { -- http://tools.ietf.org/html/rfc4419#section-6.2 */ $one = new Math_BigInteger(1); - $q = $one->bitwise_leftShift(16 * $keyLength); // 2 * 8 * $keyLength - $q = $q->subtract($one); + $max = $one->bitwise_leftShift(16 * $keyLength)->subtract($one); // 2 * 8 * $keyLength $g = new Math_BigInteger(2); $x = new Math_BigInteger(); - $x = $x->random($one, $q); + $x = $x->random($one, $max); $e = $g->modPow($x, $p); $eBytes = $e->toBytes(true);