diff --git a/phpseclib/Crypt/AES.php b/phpseclib/Crypt/AES.php index cedb57b3..fccf26c5 100644 --- a/phpseclib/Crypt/AES.php +++ b/phpseclib/Crypt/AES.php @@ -55,8 +55,8 @@ * @package Crypt_AES * @author Jim Wigginton * @copyright MMVIII Jim Wigginton - * @license http://www.gnu.org/licenses/lgpl.txt - * @version $Id: AES.php,v 1.10 2010-09-26 05:24:52 terrafrost Exp $ + * @license http://www.opensource.org/licenses/mit-license.html MIT License + * @version $Id: AES.php,v 1.7 2010/02/09 06:10:25 terrafrost Exp $ * @link http://phpseclib.sourceforge.net */ diff --git a/phpseclib/Crypt/DES.php b/phpseclib/Crypt/DES.php index fb17c227..e0b333f2 100644 --- a/phpseclib/Crypt/DES.php +++ b/phpseclib/Crypt/DES.php @@ -52,8 +52,8 @@ * @package Crypt_DES * @author Jim Wigginton * @copyright MMVII Jim Wigginton - * @license http://www.gnu.org/licenses/lgpl.txt - * @version $Id: DES.php,v 1.16 2010-09-26 05:24:52 terrafrost Exp $ + * @license http://www.opensource.org/licenses/mit-license.html MIT License + * @version $Id: DES.php,v 1.12 2010/02/09 06:10:26 terrafrost Exp $ * @link http://phpseclib.sourceforge.net */ diff --git a/phpseclib/Crypt/Hash.php b/phpseclib/Crypt/Hash.php index 70645539..1d6740b3 100644 --- a/phpseclib/Crypt/Hash.php +++ b/phpseclib/Crypt/Hash.php @@ -48,8 +48,8 @@ * @package Crypt_Hash * @author Jim Wigginton * @copyright MMVII Jim Wigginton - * @license http://www.gnu.org/licenses/lgpl.txt - * @version $Id: Hash.php,v 1.8 2010-08-28 17:26:22 terrafrost Exp $ + * @license http://www.opensource.org/licenses/mit-license.html MIT License + * @version $Id: Hash.php,v 1.6 2009/11/23 23:37:07 terrafrost Exp $ * @link http://phpseclib.sourceforge.net */ diff --git a/phpseclib/Crypt/RC4.php b/phpseclib/Crypt/RC4.php index d8d20948..883991e4 100644 --- a/phpseclib/Crypt/RC4.php +++ b/phpseclib/Crypt/RC4.php @@ -54,8 +54,8 @@ * @package Crypt_RC4 * @author Jim Wigginton * @copyright MMVII Jim Wigginton - * @license http://www.gnu.org/licenses/lgpl.txt - * @version $Id: RC4.php,v 1.9 2010-10-24 01:24:30 terrafrost Exp $ + * @license http://www.opensource.org/licenses/mit-license.html MIT License + * @version $Id: RC4.php,v 1.8 2009/06/09 04:00:38 terrafrost Exp $ * @link http://phpseclib.sourceforge.net */ @@ -209,7 +209,6 @@ class Crypt_RC4 { $this->key = $key; if ( CRYPT_RC4_MODE == CRYPT_RC4_MODE_MCRYPT ) { - $this->encryptStream = $this->decryptStream = false; return; } diff --git a/phpseclib/Crypt/RSA.php b/phpseclib/Crypt/RSA.php index 5a5150c6..1045813c 100644 --- a/phpseclib/Crypt/RSA.php +++ b/phpseclib/Crypt/RSA.php @@ -61,8 +61,8 @@ * @package Crypt_RSA * @author Jim Wigginton * @copyright MMIX Jim Wigginton - * @license http://www.gnu.org/licenses/lgpl.txt - * @version $Id: RSA.php,v 1.20 2010-09-26 03:10:20 terrafrost Exp $ + * @license http://www.opensource.org/licenses/mit-license.html MIT License + * @version $Id: RSA.php,v 1.19 2010/09/12 21:58:54 terrafrost Exp $ * @link http://phpseclib.sourceforge.net */ @@ -1381,9 +1381,11 @@ class Crypt_RSA { */ function _blind($x, $r, $i) { +echo "blinding\r\n"; $x = $x->multiply($r->modPow($this->publicExponent, $this->primes[$i])); - +echo "calling modpow\r\n"; $x = $x->modPow($this->exponents[$i], $this->primes[$i]); +echo "modpow called\r\n"; $r = $r->modInverse($this->primes[$i]); $x = $x->multiply($r); @@ -1679,6 +1681,7 @@ class Crypt_RSA { $c = $this->_os2ip($c); $m = $this->_rsadp($c); +echo urlencode($m->toBytes()) . "\r\n"; if ($m === false) { user_error('Decryption error', E_USER_NOTICE); return false; @@ -2025,6 +2028,7 @@ class Crypt_RSA { case CRYPT_RSA_ENCRYPTION_PKCS1: $length = $this->k - 11; if ($length <= 0) { +echo 'returning false'; return false; } diff --git a/phpseclib/Crypt/Random.php b/phpseclib/Crypt/Random.php index 1ae6c5f0..d9c96b0b 100644 --- a/phpseclib/Crypt/Random.php +++ b/phpseclib/Crypt/Random.php @@ -34,8 +34,8 @@ * @package Crypt_Random * @author Jim Wigginton * @copyright MMVII Jim Wigginton - * @license http://www.gnu.org/licenses/lgpl.txt - * @version $Id: Random.php,v 1.9 2010-04-24 06:40:48 terrafrost Exp $ + * @license http://www.opensource.org/licenses/mit-license.html MIT License + * @version $Id: Random.php,v 1.9 2010/04/24 06:40:48 terrafrost Exp $ * @link http://phpseclib.sourceforge.net */ diff --git a/phpseclib/Crypt/Rijndael.php b/phpseclib/Crypt/Rijndael.php index d16fb8e6..643ea2db 100644 --- a/phpseclib/Crypt/Rijndael.php +++ b/phpseclib/Crypt/Rijndael.php @@ -63,8 +63,8 @@ * @package Crypt_Rijndael * @author Jim Wigginton * @copyright MMVIII Jim Wigginton - * @license http://www.gnu.org/licenses/lgpl.txt - * @version $Id: Rijndael.php,v 1.15 2010-09-26 05:02:10 terrafrost Exp $ + * @license http://www.opensource.org/licenses/mit-license.html MIT License + * @version $Id: Rijndael.php,v 1.12 2010/02/09 06:10:26 terrafrost Exp $ * @link http://phpseclib.sourceforge.net */ @@ -671,6 +671,8 @@ class Crypt_Rijndael { } break; case CRYPT_RIJNDAEL_MODE_CBC: +echo "USING CBC\r\n"; +echo "mode = {$this->mode}\r\n";exit; $xor = $this->encryptIV; for ($i = 0; $i < strlen($plaintext); $i+=$block_size) { $block = substr($plaintext, $i, $block_size); diff --git a/phpseclib/Crypt/TripleDES.php b/phpseclib/Crypt/TripleDES.php index 9c088a66..4803808a 100644 --- a/phpseclib/Crypt/TripleDES.php +++ b/phpseclib/Crypt/TripleDES.php @@ -46,8 +46,8 @@ * @package Crypt_TripleDES * @author Jim Wigginton * @copyright MMVII Jim Wigginton - * @license http://www.gnu.org/licenses/lgpl.txt - * @version $Id: TripleDES.php,v 1.17 2010-09-26 05:24:52 terrafrost Exp $ + * @license http://www.opensource.org/licenses/mit-license.html MIT License + * @version $Id: TripleDES.php,v 1.13 2010/02/26 03:40:25 terrafrost Exp $ * @link http://phpseclib.sourceforge.net */ diff --git a/phpseclib/Math/BigInteger.php b/phpseclib/Math/BigInteger.php index c175ce4e..3f072e24 100644 --- a/phpseclib/Math/BigInteger.php +++ b/phpseclib/Math/BigInteger.php @@ -66,7 +66,7 @@ * @package Math_BigInteger * @author Jim Wigginton * @copyright MMVI Jim Wigginton - * @license http://www.gnu.org/licenses/lgpl.txt + * @license http://www.opensource.org/licenses/mit-license.html MIT License * @version $Id: BigInteger.php,v 1.33 2010/03/22 22:32:03 terrafrost Exp $ * @link http://pear.php.net/package/Math_BigInteger */ @@ -599,7 +599,9 @@ class Math_BigInteger { for ($i = 0, $end = strlen($hex) & 0xFFFFFFF8; $i < $end; $i+=8) { $bits.= str_pad(decbin(hexdec(substr($hex, $i, 8))), 32, '0', STR_PAD_LEFT); } - $bits.= str_pad(decbin(hexdec(substr($hex, $end))), strlen($hex) & 7, '0', STR_PAD_LEFT); + if ($end != strlen($hex)) { // hexdec('') == 0 + $bits.= str_pad(decbin(hexdec(substr($hex, $end))), strlen($hex) & 7, '0', STR_PAD_LEFT); + } return $this->precision > 0 ? substr($bits, -$this->precision) : ltrim($bits, '0'); } diff --git a/phpseclib/Net/SFTP.php b/phpseclib/Net/SFTP.php index 2d83eb0e..0e3f41f8 100644 --- a/phpseclib/Net/SFTP.php +++ b/phpseclib/Net/SFTP.php @@ -47,7 +47,7 @@ * @package Net_SFTP * @author Jim Wigginton * @copyright MMIX Jim Wigginton - * @license http://www.gnu.org/licenses/lgpl.txt + * @license http://www.opensource.org/licenses/mit-license.html MIT License * @version $Id: SFTP.php,v 1.25 2010/10/02 22:23:25 terrafrost Exp $ * @link http://phpseclib.sourceforge.net */ diff --git a/phpseclib/Net/SSH1.php b/phpseclib/Net/SSH1.php index 57a952a9..784a9a71 100644 --- a/phpseclib/Net/SSH1.php +++ b/phpseclib/Net/SSH1.php @@ -64,8 +64,8 @@ * @package Net_SSH1 * @author Jim Wigginton * @copyright MMVII Jim Wigginton - * @license http://www.gnu.org/licenses/lgpl.txt - * @version $Id: SSH1.php,v 1.16 2010-08-08 05:06:38 terrafrost Exp $ + * @license http://www.opensource.org/licenses/mit-license.html MIT License + * @version $Id: SSH1.php,v 1.15 2010/03/22 22:01:38 terrafrost Exp $ * @link http://phpseclib.sourceforge.net */ diff --git a/phpseclib/Net/SSH2.php b/phpseclib/Net/SSH2.php index 10056dc9..263f347b 100644 --- a/phpseclib/Net/SSH2.php +++ b/phpseclib/Net/SSH2.php @@ -59,7 +59,7 @@ * @package Net_SSH2 * @author Jim Wigginton * @copyright MMVII Jim Wigginton - * @license http://www.gnu.org/licenses/lgpl.txt + * @license http://www.opensource.org/licenses/mit-license.html MIT License * @version $Id: SSH2.php,v 1.53 2010-10-24 01:24:30 terrafrost Exp $ * @link http://phpseclib.sourceforge.net */ diff --git a/phpseclib/PHP/Compat/Function/array_fill.php b/phpseclib/PHP/Compat/Function/array_fill.php index c6038357..13fc2ad5 100644 --- a/phpseclib/PHP/Compat/Function/array_fill.php +++ b/phpseclib/PHP/Compat/Function/array_fill.php @@ -1,5 +1,5 @@ , Arpad Ray * @link http://php.net/function.array_fill * @author Jim Wigginton