Commit Graph

1108 Commits

Author SHA1 Message Date
Jim Wigginton
a31d9ba38d - rm debug code
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@131 21d32557-59b3-4da0-833f-c5933fad653e
2010-11-20 02:13:39 +00:00
Jim Wigginton
b94a467999 - change license to the less restrictive MIT license (if people want to modify phpseclib and distribute binaries of it [whatever that means for PHP] without including the source code I don't care); two of the three PHP_Compat stuff still uses the LGPL since I didn't author them but they're only needed, anyway, if you're using phpseclib on PHP4.
- add svn:eol-style: LF to all files
- fixed pear.php.net bug # 18037 (thanks, nounours!)

git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@130 21d32557-59b3-4da0-833f-c5933fad653e
2010-11-13 19:28:20 +00:00
Jim Wigginton
dd4f0036f2 - fixed a bug that prevented key re-exchange from working
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@126 21d32557-59b3-4da0-833f-c5933fad653e
2010-10-24 01:24:30 +00:00
Jim Wigginton
a15cf62d3a - change $ecb to $this->ecb
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@124 21d32557-59b3-4da0-833f-c5933fad653e
2010-09-26 05:24:52 +00:00
Jim Wigginton
2140de74d0 - fixed a warning in Crypt_Rijndael
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@123 21d32557-59b3-4da0-833f-c5933fad653e
2010-09-26 05:02:10 +00:00
Jim Wigginton
76655b8bf9 - CFB mode is now supported as a stream cipher
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@122 21d32557-59b3-4da0-833f-c5933fad653e
2010-09-26 03:10:20 +00:00
Jim Wigginton
202c3b64e9 - added support for OFB and CFB modes (with the caveat that CFB mode isn't currently supported as a stream cipher)
- improvements to the fix to the bug Suby found
- fixed bug whereby CTR mode gave different results in mcrypt and internal modes when the continuous buffer was enabled and the plaintext being encrypted wasn't a multiple of the block size
- undid the fix for the bug f.dammassa found (thanks, j31!)


git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@120 21d32557-59b3-4da0-833f-c5933fad653e
2010-09-12 21:58:54 +00:00
Jim Wigginton
b3690e0fde - added support for AES-128-CBC encrypted private keys (ie. the default format of OpenSSH 5.4+)
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@119 21d32557-59b3-4da0-833f-c5933fad653e
2010-09-05 03:04:29 +00:00
Jim Wigginton
d07570b0eb - added limited support for keyboard-interactive authentication (thanks, j31!)
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@115 21d32557-59b3-4da0-833f-c5933fad653e
2010-08-28 17:26:22 +00:00
Jim Wigginton
d9d70f8797 - fixed a few bugs in Crypt_Hash
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@114 21d32557-59b3-4da0-833f-c5933fad653e
2010-08-08 21:29:39 +00:00
Jim Wigginton
f088d89712 - add logging to Net_SSH1 and fixed a bug in Crypt_DES (thanks, Suby!)
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@113 21d32557-59b3-4da0-833f-c5933fad653e
2010-08-08 05:06:38 +00:00
Jim Wigginton
3ef15724be - undo last commit - if you want to load a public key use loadKey(). it's called loadKey() and not loadPublicKey() for a reason. and while you're at it reread the documentation. i do have to concede, though... i should have read my own documentation before making the last commit.
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@112 21d32557-59b3-4da0-833f-c5933fad653e
2010-07-11 02:33:13 +00:00
Jim Wigginton
dff1ab92d6 - fixed bug in setPublicKey function (thanks nicklong!)
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@110 21d32557-59b3-4da0-833f-c5933fad653e
2010-06-19 12:01:21 +00:00
Jim Wigginton
6057a9da8f - fixed a bug in Crypt_Random
- SSH2 logging now more closely resembles the format of PuTTY logs


git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@105 21d32557-59b3-4da0-833f-c5933fad653e
2010-04-24 06:40:49 +00:00
Jim Wigginton
fa9e1f4f50 - suppress possible openbase_dir errors
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@103 21d32557-59b3-4da0-833f-c5933fad653e
2010-04-13 12:41:14 +00:00
Jim Wigginton
7fd48f8e72 - compatability adjustments for interoperability with strictly PKCS#1 v1.5 compliant RSA implementations
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@102 21d32557-59b3-4da0-833f-c5933fad653e
2010-04-10 15:57:02 +00:00
Jim Wigginton
39c97d3373 - crypt_random() used /dev/urandom in a rather slow way (thanks, TangiX!)
- revamped the logging system.  now, you can profile SSH2.php / SFTP.php without capturing full logs


git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@99 21d32557-59b3-4da0-833f-c5933fad653e
2010-04-07 03:50:54 +00:00
Jim Wigginton
1539cd4a01 - the triple equals in Math_BigIinteger::equals() made it so float(1) != int(1), so all instances where float(1) might occur have been removed
- Crypt_RSA::_blind() should now be faster.


git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@95 21d32557-59b3-4da0-833f-c5933fad653e
2010-03-01 17:28:19 +00:00
Jim Wigginton
c0b0886762 - use crypt_random for RSA blinding
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@94 21d32557-59b3-4da0-833f-c5933fad653e
2010-02-28 06:57:00 +00:00
Jim Wigginton
695207246a - fixed a bug that prevented multi-prime RSA keys from loading
- slightly refactored Random.php
- implemented RSA blinding


git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@93 21d32557-59b3-4da0-833f-c5933fad653e
2010-02-28 05:28:38 +00:00
Jim Wigginton
748983a824 - speed up BigInteger.php
- added support for more public / private key formats (thanks, m4rc!)


git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@91 21d32557-59b3-4da0-833f-c5933fad653e
2010-02-26 03:40:26 +00:00
Jim Wigginton
f2ccfdb0ac - improved random number generator
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@89 21d32557-59b3-4da0-833f-c5933fad653e
2010-02-19 22:39:44 +00:00
Jim Wigginton
d77c85218d - removed setMCrypt from the Crypt_* objects (you can achieve the same effect by doing ini_set('mcrypt.algorithms_dir', $path))
- added support for CTR mode to the various Crypt_* objects


git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@83 21d32557-59b3-4da0-833f-c5933fad653e
2010-02-09 06:10:26 +00:00
Jim Wigginton
f96700960a - fixed an E_NOTICE error (thanks bietchetlien!)
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@81 21d32557-59b3-4da0-833f-c5933fad653e
2010-01-29 06:21:16 +00:00
Jim Wigginton
1e8a295994 - defined $this->mgfHLen
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@79 21d32557-59b3-4da0-833f-c5933fad653e
2010-01-25 07:42:45 +00:00
Jim Wigginton
1841949aaf - removed debug code
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@78 21d32557-59b3-4da0-833f-c5933fad653e
2010-01-23 17:36:49 +00:00
Jim Wigginton
a8f0567527 - sped up Math_BigInteger
- fixed a bug whereby partial RSA keys didn't function properly (thanks, CountZero!)
- fixed a bug that prevented setPrecision from working correctly with non multiples of eight
- fixed a few E_NOTICEs


git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@76 21d32557-59b3-4da0-833f-c5933fad653e
2010-01-21 00:52:11 +00:00
Jim Wigginton
7ecd481002 - fixes to Math_BigInteger::_barrett()
- speed ups based on <http://blog.libssh2.org/index.php?/archives/21-Compiled-Variables.html>.


git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@74 21d32557-59b3-4da0-833f-c5933fad653e
2010-01-04 07:59:01 +00:00
Jim Wigginton
e16ba96789 - fixed a few E_NOTICE errors
- sped up Math_BigInteger::_barrett()


git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@73 21d32557-59b3-4da0-833f-c5933fad653e
2009-12-31 06:11:07 +00:00
Jim Wigginton
8379f46a77 _mgf1() shouldn't be using $this->hLen
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@69 21d32557-59b3-4da0-833f-c5933fad653e
2009-12-08 14:18:59 +00:00
Jim Wigginton
315dec9dc5 - loadKey returns false on failure and true on success (thanks, seriksen!)
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@68 21d32557-59b3-4da0-833f-c5933fad653e
2009-12-07 23:22:05 +00:00
Jim Wigginton
9bd3c793d3 - an inability to unpad doesn't necessarily mean that padding is enabled when it shouldn't be - it might also mean that the key being used is the wrong one.
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@67 21d32557-59b3-4da0-833f-c5933fad653e
2009-12-06 07:26:52 +00:00
Jim Wigginton
793a355862 typo
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@66 21d32557-59b3-4da0-833f-c5933fad653e
2009-12-04 21:05:32 +00:00
Jim Wigginton
a7a41ff610 $this->publicKey -> $this->publicExponent
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@65 21d32557-59b3-4da0-833f-c5933fad653e
2009-12-04 20:50:21 +00:00
Jim Wigginton
a882a3a41f - added Crypt_RSA
- added RSA public key authentication to Net_SSH2


git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@62 21d32557-59b3-4da0-833f-c5933fad653e
2009-12-03 08:19:00 +00:00
Jim Wigginton
239f48cc6c - added a missing break
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@58 21d32557-59b3-4da0-833f-c5933fad653e
2009-11-23 23:37:07 +00:00
Jim Wigginton
4fd4601ed8 - rm bin2hex() call in _md2()
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@57 21d32557-59b3-4da0-833f-c5933fad653e
2009-11-23 22:03:08 +00:00
Jim Wigginton
a4e72f7811 - replaced list(...) = unpack('...') calls with extract(unpack('...')) (thanks martinu!)
- added pure-php implementations of md2, sha256, and sha512 to Crypt_Hash
- added setPrecision() to Math_BigInteger
- other small fixes


git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@56 21d32557-59b3-4da0-833f-c5933fad653e
2009-11-23 19:06:07 +00:00
Jim Wigginton
f50e880c41 - accommodate new Math_BigInteger updates
- fix a typo in Crypt_Rijndael's comments


git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@54 21d32557-59b3-4da0-833f-c5933fad653e
2009-11-03 22:03:43 +00:00
Jim Wigginton
65119f79d7 - small cosmetic issues
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@49 21d32557-59b3-4da0-833f-c5933fad653e
2009-10-07 20:53:19 +00:00
Jim Wigginton
a90471b937 - fixed a few bad constants (thanks, YeongGwon Jeong!)
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@41 21d32557-59b3-4da0-833f-c5933fad653e
2009-08-09 03:53:28 +00:00
Jim Wigginton
d6339e014f - Net_SFTP now has better support for uploading large files than it did before, per this:
http://www.frostjedi.com/phpbb/viewtopic.php?f=46&t=10415


git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@40 21d32557-59b3-4da0-833f-c5933fad653e
2009-06-09 04:00:38 +00:00
Jim Wigginton
ed39f723c9 - xor swap doesn't work when you're swapping elements with themselves
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@35 21d32557-59b3-4da0-833f-c5933fad653e
2009-05-27 21:36:53 +00:00
Jim Wigginton
c17f22ead9 - Crypt_Rijndael has issues when setKey() isn't called, as well
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@34 21d32557-59b3-4da0-833f-c5933fad653e
2009-05-27 16:25:35 +00:00
Jim Wigginton
9194759d58 - cosmetic changes to the code
- encryption should work even when setKey() isn't called
- padding wasn't always done when it should have been


git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@33 21d32557-59b3-4da0-833f-c5933fad653e
2009-05-27 16:15:23 +00:00
Jim Wigginton
3d88765f1d - removed debug code
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@30 21d32557-59b3-4da0-833f-c5933fad653e
2009-04-28 02:56:34 +00:00
Jim Wigginton
1eb6ac05c0 $x & 3 == 1 is the same thing as $x & (3 == 1) per php's order of precidence
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@24 21d32557-59b3-4da0-833f-c5933fad653e
2009-03-09 05:13:24 +00:00
Jim Wigginton
736bfab276 - fix E_NOTICE notices
- renamed hmac() -> hash() in SSH2.php


git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@23 21d32557-59b3-4da0-833f-c5933fad653e
2009-02-26 17:25:03 +00:00
Jim Wigginton
a8e70cbaa5 - forgot to add AES
- added __toString() to BigInteger.php (thanks, Techie-Michael!)


git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@22 21d32557-59b3-4da0-833f-c5933fad653e
2009-02-16 23:11:01 +00:00
Jim Wigginton
39de68ab48 - [bug] Crypt_Rijndael calculated IVs incorrectly
- [new] renamed Crypt_HMAC to Crypt_Hash and revised the API
- [new] added Crypt_AES
- [new] added AES support to Net_SSH2


git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@21 21d32557-59b3-4da0-833f-c5933fad653e
2009-02-16 22:22:13 +00:00
Jim Wigginton
c30f3b7e9a - pure-PHP implementation of Rijndael
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@20 21d32557-59b3-4da0-833f-c5933fad653e
2009-02-01 15:37:25 +00:00
Jim Wigginton
a78d7df660 - if padding is disabled and the length of the text-to-be-encrypted isn't a multiple of the block size, padding will be automatically enabled
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@19 21d32557-59b3-4da0-833f-c5933fad653e
2008-08-04 17:59:12 +00:00
Jim Wigginton
943f329197 - pack should be unpack
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@16 21d32557-59b3-4da0-833f-c5933fad653e
2008-05-21 05:15:32 +00:00
Jim Wigginton
6101b23a32 - fixed a bug discovered by MarkDHamill (see http://www.frostjedi.com/phpbb/viewtopic.php?f=46&t=9796)
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@11 21d32557-59b3-4da0-833f-c5933fad653e
2008-03-31 00:49:09 +00:00
Jim Wigginton
890ae4db4a - added sha1-96 and md5-96
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@9 21d32557-59b3-4da0-833f-c5933fad653e
2007-09-23 04:41:39 +00:00
Jim Wigginton
29ee82e67b - updated URL
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@7 21d32557-59b3-4da0-833f-c5933fad653e
2007-07-25 21:56:14 +00:00
Jim Wigginton
df0fe2386a - added SSH2.php and HMAC.php
- fixed issue with the IV's in TripleDES.php and DES.php
- fixed decryption in TripleDES.php using CRYPT_DES_MODE_INTERNAL
- renamed CRYPT_DES_MODE_SSH to CRYPT_DES_MODE_3CBC
- added CRYPT_DES_MODE_CBC3 as an alias for CRYPT_DES_MODE_CBC
- fixed issue with RC4.php using CRYPT_RC4_MODE_MCRYPT


git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@4 21d32557-59b3-4da0-833f-c5933fad653e
2007-07-23 05:21:39 +00:00
Jim Wigginton
367ddebf80 - initial commit
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@3 21d32557-59b3-4da0-833f-c5933fad653e
2007-07-02 04:19:55 +00:00