1
0
mirror of https://github.com/danog/tgseclib.git synced 2024-12-04 02:27:52 +01:00
Commit Graph

772 Commits

Author SHA1 Message Date
terrafrost
e935c131e3 Merge branch '1.0' into 2.0 2017-12-19 07:27:55 -06:00
terrafrost
c340d62548 Crypt: some of the minimum key lengths were off 2017-12-19 07:04:36 -06:00
terrafrost
19a46748a2 Merge branch '2.0' 2017-12-17 16:25:30 -06:00
terrafrost
37922e5b4c Merge branch '1.0' into 2.0 2017-12-17 15:05:15 -06:00
terrafrost
6930560ae6 more adjustments for ARM CPU's 2017-12-17 14:52:43 -06:00
terrafrost
4f9e92b380 Merge branch '2.0' 2017-12-09 18:59:25 -06:00
terrafrost
87dd553517 Merge branch '1.0' into 2.0 2017-12-09 18:39:27 -06:00
terrafrost
b25681beeb fix float to int conversions on ARM CPU's 2017-12-09 18:16:48 -06:00
terrafrost
a96add4526 DSA/Signature/SSH2: fix infrequent error with too short sigs 2017-12-05 00:08:56 -06:00
Sokolovskyy Roman
c705e7d9c6 Add PhpDoc @var for extract() functions 2017-12-04 11:11:43 +01:00
terrafrost
defe0514a9 Random: CS adjustment 2017-12-03 22:42:58 -06:00
terrafrost
f0b1439639 Merge branch '2.0-travis-exp' into master-travis-exp 2017-12-03 22:41:02 -06:00
terrafrost
2f3c9197d9 Merge branch '1.0-travis-exp' into 2.0-travis-exp 2017-12-03 22:40:31 -06:00
terrafrost
ab5158dcd3 Random: return empty string if $length is 0 2017-12-03 22:39:01 -06:00
Sokolovskyy Roman
ee8f5e9769 Get rid of func_get_args() 2017-11-21 09:36:28 +01:00
terrafrost
ec579bd9ed revisions to rrran's PHPDoc changes 2017-11-05 14:35:27 -06:00
Sokolovskyy Roman
f40ea062c2 Lots of PHPDoc fixes 2017-10-25 11:44:14 +02:00
terrafrost
0a912b4818 Merge pull request #1193 from eternalharvest/bugfix/doccomment
Fix wrong doccomment annotation and Suggestion
2017-10-10 06:03:03 -05:00
Takuya Sawada
9e037309b9 SymmetricKey: refactor to simplify the code 2017-10-10 19:06:14 +09:00
Takuya Sawada
65cbc60918 SymmetricKey: fix indent style to follows the PSR-2 codeing style 2017-10-10 19:02:55 +09:00
terrafrost
245e7a15ca Merge branch '1.0' into 2.0 2017-10-05 05:37:56 -05:00
terrafrost
29fabaaa18 RSA: replace != with !$this->_equals 2017-10-05 05:31:19 -05:00
terrafrost
d1470644a2 Merge branch '1.0' into 2.0 2017-10-05 05:28:47 -05:00
terrafrost
aeb8a98a25 Crypt/Base: fix version_compare call 2017-10-05 05:28:16 -05:00
terrafrost
33de8b82d6 Merge branch '1.0' into 2.0 2017-10-05 05:26:49 -05:00
terrafrost
042c8a9239 RC4: don't assume key is "\0" by default 2017-10-05 05:26:23 -05:00
Takuya Sawada
7aa400745c SymmetricKey: add Eval engine implementation for 'cfb8' cipher mode of operation 2017-10-05 19:06:47 +09:00
Takuya Sawada
8604e327a3 SymmetricKey: add 'cfb8' cipher mode of operation support 2017-10-05 19:06:45 +09:00
Takuya Sawada
e3bdbf5e0a fix doccomment annotations 2017-10-05 18:46:59 +09:00
terrafrost
2608074e74 Merge branch '1.0-use-eval' into 2.0-use-eval 2017-10-04 17:08:27 -05:00
terrafrost
98d46db7c5 Crypt/Base: use eval() instead of create_function() for >= 5.3 2017-10-04 17:03:14 -05:00
terrafrost
1e9d20364c Merge pull request #1182 from eternalharvest/bugfix/doccomment
Fix wrong doccomment annotation of return type
2017-09-30 08:07:06 +01:00
terrafrost
af6048b48e AsymmetricKey: visibility fixes 2017-09-30 07:58:07 +01:00
Takuya Sawada
5a87cc525f fix wrong doccomment annotation of return type 2017-09-18 02:23:14 +09:00
terrafrost
9d8f014748 SymmetricKey: isValidKey took ints instead of strings 2017-08-07 23:57:02 -05:00
Sokolovskyy Roman
ccfb6c92bf Set of PHPDOC fixes 2017-08-03 09:16:37 +02:00
Sokolovskyy Roman
6181b2bfbd Set of PHPDOC fixes 2017-08-03 09:16:16 +02:00
Sokolovskyy Roman
a3b252150b Set of PHPDOC fixes 2017-08-03 09:14:32 +02:00
Sokolovskyy Roman
5fe61b325d PHPDOC fix 2017-08-03 09:12:07 +02:00
Sokolovskyy Roman
167718a046 Set of PHPDOC fixes 2017-08-03 09:11:44 +02:00
terrafrost
4a7d3d27ba DSA/Signatures/SSH2: self generated signatures wouldn't verify 2017-07-30 16:03:47 -05:00
Sokolovskyy Roman
800b81d3ef remove unneeded strlen call 2017-07-20 11:36:51 +02:00
Sokolovskyy Roman
65d9e2bb49 Added missin break
removed return statement
2017-07-20 11:35:08 +02:00
Sokolovskyy Roman
cc3f0c1ec1 Added missing private field 2017-07-20 11:10:06 +02:00
Sokolovskyy Roman
c603c2b2d0 Remove unused use
Fix in PHPDoc block
Wrong variable name fix
2017-07-20 11:09:29 +02:00
Sokolovskyy Roman
7a25abe60a PHPDoc fix
Using property instead of method call fix
2017-07-20 11:08:03 +02:00
terrafrost
7ef3864d22 RSA: RSAKeyValue -> RSAKeyPair for XML private keys 2017-06-28 23:19:50 -05:00
terrafrost
b46bedbdf7 SymmetricKey: use static::class instead of getClassContext() method 2017-06-28 07:34:51 -05:00
terrafrost
4171262b9e SymmetricKey: use strings for constructor and setPreferredEngine 2017-06-28 06:54:10 -05:00
terrafrost
819a165246 RSA: add enableBlinding() / disableBlinding() static methods 2017-06-26 23:19:30 -05:00
terrafrost
1630a6710d RSA/DSA: support XML keys with XML declarations 2017-06-26 21:58:20 -05:00
terrafrost
62a8047fa1 Hash: use hash extension for sha512/224 & sha512/256 on PHP 7.1+ 2017-06-26 21:45:29 -05:00
Matej Kravjar
47c419545a Fixed #632 Fatal error: Cannot access self:: when no class scope is active 2017-06-20 12:43:42 +02:00
terrafrost
6ca7323401 Merge branch '2.0' 2017-05-29 06:33:24 -05:00
terrafrost
a4cd384bab Merge branch '1.0' into 2.0 2017-05-29 06:32:23 -05:00
terrafrost
a451dd69f8 RSA: reset variables if bad key was loaded 2017-05-29 06:31:54 -05:00
terrafrost
e9d21367fa Merge branch '1.0' into 2.0 2017-05-28 09:57:45 -05:00
terrafrost
228b60cfe5 Random: suppress E_DEPRECATED errors 2017-05-28 09:53:02 -05:00
terrafrost
085d5ed495 Merge branch '2.0-crypt-fix-old-openssl' 2017-05-13 23:24:53 -05:00
terrafrost
9fc9d2fa19 Merge branch 'crypt-fix-old-openssl' into 2.0 2017-05-13 23:21:14 -05:00
terrafrost
a983412ea9 Crypt: fix OpenSSL engine on <= PHP 5.3.6 2017-05-13 23:18:42 -05:00
terrafrost
4a069f7c85 rm redundant files 2017-04-15 19:35:07 -05:00
terrafrost
42def63b00 Merge remote-tracking branch 'upstream/master' into dsa-test-2 2017-02-02 21:07:47 -05:00
terrafrost
ab1da5ac1f Merge pull request #1084 from terrafrost/php5-updates
PHP5 updates for master branch
2017-02-02 21:03:07 -05:00
terrafrost
eb459daeaf add DSA implementation 2017-02-02 20:20:47 -05:00
terrafrost
7d2e44b430 Merge branch '2.0' 2017-01-27 12:40:23 -06:00
terrafrost
ac2b7ef76c Merge branch '1.0' into 2.0 2017-01-27 12:17:04 -06:00
terrafrost
1bde98fc42 Crypt: OpenSSL apparently supports variable size keys 2017-01-27 11:20:22 -06:00
terrafrost
9ae5206588 RSA: setEngine -> setPreferredEngine (make it like SymmetricKey) 2016-12-11 09:59:50 -06:00
terrafrost
1dfd315725 RSA: use public / private / protected 2016-12-10 19:09:54 -06:00
terrafrost
813b85b5b2 Crypt: define visibility for more variables / methods 2016-12-09 16:46:01 -06:00
terrafrost
067c1882e5 SymmetricCiphers: rm some redundant methods / variables 2016-12-09 15:51:31 -06:00
terrafrost
d34a911402 SymmetricCiphers: don't cache "hi-optimized code"
Also add a new engine - ENGINE_EVAL. Previously ENGINE_INTERNAL
had three different modes - a "hi-optimized" version, a
"lo-optimized" version and a version that didn't depend on
create_function and there wasn't a way to really isolate these
modes and test them individually.
2016-12-08 09:20:19 -06:00
terrafrost
2a1177b256 SymmetricCiphers: add public / private / protected as appropriate 2016-12-07 22:19:20 -06:00
terrafrost
c852bae3c8 use short array syntax for arrays 2016-11-30 21:29:38 -06:00
terrafrost
7182ec393b make classes with only static methods abstract 2016-11-30 09:25:04 -06:00
terrafrost
370fbec300 ASN1: don't require octet / bit strings be base64-encoded 2016-11-28 20:51:21 -06:00
terrafrost
874ada8d93 ASN1: make methods static 2016-11-27 22:38:11 -06:00
terrafrost
df6d55fd97 ASN1: move ASN1 maps to external files for reuse 2016-11-22 23:56:07 -06:00
terrafrost
99a2127856 Hash: fix E_NOTICE with PHP4-style constructor 2016-11-17 20:54:38 -06:00
terrafrost
863ff6789b RSA: refactor PKCS1/PKCS8 to facilitate re-use 2016-11-17 08:09:10 -06:00
terrafrost
88e58c75d0 don't go out of our way to support < PHP 5.3
...not when phpseclib 2.0 requires PHP 5.3+
2016-10-02 22:07:33 -05:00
terrafrost
7ae4ea3e71 Merge branch '1.0' into 2.0 2016-10-02 21:56:59 -05:00
terrafrost
3c149e0e6a Merge branch '1.0-32bit-fixes' into 1.0 2016-10-02 21:39:16 -05:00
terrafrost
711079764e Merge branch '2.0' 2016-10-02 08:18:16 -05:00
terrafrost
42f5399960 Crypt/Base: fix bad merge 2016-10-02 08:09:54 -05:00
terrafrost
42fb96db16 fix float to int conversions on 32-bit linux PHP < 5.3 installs 2016-10-02 03:37:23 -05:00
terrafrost
3205c95177 Merge branch '1.0' into 2.0 2016-10-01 20:05:16 -05:00
terrafrost
d68975117c RC2: rm empty constructor 2016-09-23 21:55:26 -05:00
terrafrost
640f10609f fix PHP 7.1 compatibility errors 2016-09-21 01:21:54 -05:00
terrafrost
8019baee62 BigInteger: add randomRange / randomPrimeRange
...and redo random / randomPrime such that they take the byte size
as the parameter instead of the range.
2016-09-17 19:48:51 -07:00
terrafrost
c17a2604a0 Merge branch 'master-reorg' 2016-09-17 09:15:11 -07:00
terrafrost
845135f887 add PHP5-style constructors along side PHP4-style ones 2016-09-10 10:41:05 -07:00
terrafrost
47faa5736e RSA/PKCS8: CS adjustment 2016-08-18 14:53:21 -05:00
terrafrost
8b4ead6aef Merge branch 'master' of https://github.com/phpseclib/phpseclib 2016-08-18 13:49:28 -05:00
terrafrost
12f70270cd fix bad cherry pick 2016-08-04 01:06:52 -05:00
terrafrost
676c1982c7 fix bad merge 2016-08-04 01:04:00 -05:00
klemens
dd23d91d41 spelling fixes 2016-08-04 00:47:52 -05:00
terrafrost
c547ee16c7 Merge branch '1.0' into 2.0 2016-08-04 00:31:15 -05:00
klemens
dca95ac662 spelling fixes 2016-08-04 00:19:27 -05:00
terrafrost
d64599f799 Move _encodeLength and _decodeLength to Common\Functions\ASN1.php 2016-07-31 09:37:13 -05:00
terrafrost
c509909004 Organizational Revamp
- rename \phpseclib\Crypt\Base to \phpseclib\Crypt\Common\SymmetricKey
- create BlockCipher and StreamCipher to extend SymmetricKey
- replace _string_shift with \phpseclib\Common\Functions\Strings::shift
2016-07-30 22:18:06 -05:00
terrafrost
ec62e5d9f5 RSA: update PKCS1/8 comments 2016-07-28 22:14:37 -05:00
terrafrost
c12500cace RSA: code cleanup 2016-07-28 13:08:47 -05:00
terrafrost
caa7eed299 Merge branch '2.0' 2016-07-28 11:00:33 -05:00
terrafrost
eff01fba0e RSA: update phpdoc for 2.0 branch 2016-07-28 11:00:16 -05:00
terrafrost
61d0326bb6 Merge branch '1.0' into 2.0 2016-07-28 10:59:37 -05:00
terrafrost
b9f072bf03 RSA: phpdoc updates 2016-07-28 10:58:27 -05:00
terrafrost
c788ec574f Hash: CS adjustment 2016-06-22 10:10:32 -05:00
terrafrost
1e7bfe75b1 Tests/RSA: fix bad merge 2016-06-22 09:47:56 -05:00
terrafrost
4516227f13 Merge branch '2.0' 2016-06-21 22:55:33 -05:00
terrafrost
b08f17f514 Merge branch '1.0' into 2.0 2016-06-21 22:39:05 -05:00
andrewbelcher
dd754283bb Fix zero salt length RSA signatures. 2016-06-21 22:33:47 -05:00
terrafrost
1c4fe6b5ba Merge branch 'unsupported-hash-update' 2016-06-19 19:47:04 -05:00
terrafrost
7bdb09c4bd Merge branch '1.0' into 2.0 2016-06-18 23:29:33 -05:00
terrafrost
6ff421d354 BigInteger/RSA: don't compare openssl versions > 1.0 2016-06-18 23:28:33 -05:00
terrafrost
7a628c62b0 don't do phpinfo() check 2016-06-11 20:29:02 -05:00
terrafrost
e64a55955f Crypt/Base: trie -> true 2016-06-05 11:28:28 -05:00
terrafrost
fc2a7cef20 RSA: adjustments for master branch 2016-06-04 23:46:40 -05:00
terrafrost
39913e1248 Merge branch 'master' of https://github.com/phpseclib/phpseclib 2016-06-04 22:58:32 -05:00
terrafrost
6b66c1cd52 Merge branch '2.0' 2016-06-04 22:56:55 -05:00
terrafrost
87040bc518 Merge branch '1.0' into 2.0 2016-06-04 22:56:49 -05:00
terrafrost
e2a0b701c7 remove a few calls to paragonie/constant_time_encoding
- Hex::decode('aabb') can be replaced with "\xaa\xbb"
- Hex::decode(sha1('...')) can be replaced with sha1('...', true)
2016-06-04 22:31:23 -05:00
terrafrost
48fef11389 Merge branch 'cte' 2016-05-21 17:34:05 -05:00
Paragon Initiative Enterprises
adcbecae78 Use paragonie/constant_time_encoding 2016-05-21 12:57:53 -05:00
Paragon Initiative Enterprises
0e8fa93676 Use paragonie/constant_time_encoding 2016-05-12 16:28:40 -04:00
terrafrost
942d194d0a RSA: don't attempt to use the CRT when zero value components exist 2016-05-09 13:46:28 -05:00
terrafrost
c784d9e1e5 reapply PR #931 2016-05-08 01:34:37 -05:00
terrafrost
1f138916fa Merge branch '2.0' 2016-05-07 02:40:04 -05:00
terrafrost
a3d3dbd957 Merge branch '1.0' into 2.0 2016-05-07 02:39:17 -05:00
terrafrost
bf31e976c7 RSA: fix PHP4 compatability issue 2016-05-06 22:18:12 -05:00
terrafrost
e4c4824ddb Hash: throw exceptions if hash isn't explicitly supported 2016-05-05 14:20:24 -05:00
terrafrost
8fb4c3363d undo merging of master to 2.0 branch 2016-04-28 15:34:10 -05:00
terrafrost
e40d6cc1cc Hash: small tweaks per Joey3000 2016-04-12 11:32:40 -05:00
terrafrost
b4cf10fc94 Revert "Merge branch '2.0'"
This reverts commit be5f4ef6b19c82f6c898708cc8e1828b05e3d4e8, reversing
changes made to 638fe6971c.
2016-04-10 11:30:59 -05:00
terrafrost
2cc5dcdc89 Merge branch '2.0' 2016-04-10 11:30:34 -05:00
terrafrost
4b69dcb1ca Revert "Merge remote-tracking branch 'bantu/bootstrap'"
This reverts commit ef04c870e9, reversing
changes made to cd57bf31ae.
2016-04-10 11:25:31 -05:00
terrafrost
638fe6971c Merge branch 'master' of https://github.com/phpseclib/phpseclib 2016-04-10 10:18:49 -05:00
terrafrost
7dffbfde04 RSA/OpenSSH: savePublicKey() method should have been static 2016-04-10 10:18:15 -05:00
terrafrost
263564a2ee Merge branch 'master' of https://github.com/phpseclib/phpseclib 2016-04-09 13:00:51 -05:00
terrafrost
272d447b65 Merge branch 'sha512/x' 2016-04-09 12:57:34 -05:00
terrafrost
86646fdf40 RSA: PKCS1 v2.2 also added sha224 2016-04-09 12:57:23 -05:00
terrafrost
9cf93a02b3 Merge branch '2.0' 2016-04-03 21:37:52 -05:00
terrafrost
a7f2a5d9c9 Merge branch '1.0' into 2.0 2016-04-03 21:34:45 -05:00
terrafrost
ac97ce5d69 RSA: backport macdabby's changes 2016-04-03 21:34:11 -05:00
terrafrost
3b37619279 Tests/RSA: add unit test for setPrivateKey 2016-04-03 21:16:37 -05:00
terrafrost
2a1ee1107a Merge remote-tracking branch 'macdabby/master' 2016-04-03 21:10:42 -05:00
Scott
b7218aee28 Update Random.php 2016-03-27 10:54:39 -04:00
Scott
827e42222e Update Random.php 2016-03-27 10:49:03 -04:00
DAB
89a73161cb set publicExponent to false instead of unsetting 2016-03-25 22:10:36 -05:00