Commit Graph

334 Commits

Author SHA1 Message Date
terrafrost
d7abfaadbc X509: rm $signatureAlgorithm parameter from signature methods 2019-06-24 18:24:14 -05:00
terrafrost
52b7e4610c fix bad merge 2019-06-10 00:09:17 -05:00
terrafrost
6cf05541cc Merge branch '1.0' into 2.0 2019-06-09 23:46:46 -05:00
terrafrost
cd7de5723c RSA: add support for OpenSSH private keys 2019-06-09 23:42:41 -05:00
terrafrost
8e03f5bfb2 RSA: make it so PSS keys can be saved 2019-06-01 19:35:17 -05:00
terrafrost
cc32cd2e95 make RSA / DSA / ECDSA immutable and add support to SSH2 / X509 2019-05-19 15:35:29 -05:00
terrafrost
34e065fec8 Merge branch '2.0' 2019-03-23 20:22:34 -05:00
terrafrost
337d115179 Merge branch '1.0' into 2.0 2019-03-23 20:17:59 -05:00
terrafrost
b5b763b3f2 RSA: use hash_equals if available 2019-03-23 20:17:43 -05:00
terrafrost
37df27a4af Merge branch '2.0' 2019-03-08 08:02:54 -06:00
terrafrost
4a920c3690 RSA: fix bad merge 2019-03-08 08:02:20 -06:00
terrafrost
0bb37d2853 Merge branch '1.0' into 2.0 2019-03-08 07:30:33 -06:00
terrafrost
ca76d3913f RSA: protect against possible timing attacks during OAEP decryption 2019-03-08 07:27:04 -06:00
terrafrost
ed975a270d Merge branch '1.0' into 2.0 2019-03-04 08:15:45 -06:00
Zachery Stuart
a276c2b073 Call xml_parser_free and unset to avoid memory leaks 2019-03-04 08:15:08 -06:00
terrafrost
adc9a5d189 Merge branch '2.0' 2019-02-24 21:37:43 -06:00
Bob van de Vijver
48b1c87f4c
Fixed RSA loadKey type hint 2019-02-22 10:37:16 +01:00
terrafrost
17e6938fba updates to Exceptions 2018-12-31 09:55:32 -06:00
terrafrost
0398f7a815 add ECDSA / EdDSA support 2018-11-19 12:39:21 -06:00
terrafrost
78eb98311f Merge branch '2.0' 2018-04-29 16:56:35 -05:00
Bilge
8c299f865f
Fixed some RSA docblock types. 2018-04-25 21:18:51 +01:00
Wes
d4a98457bc Check phpinfo() is available before using
Fixes an issue I raised at https://github.com/phpseclib/phpseclib/issues/1255

Proof of logic at https://3v4l.org/RqrHt

I ended up moving more code than discussed in the issue - initially to avoid `$content` being undefined when it came to `preg_match_all()`, but also as it made sense grouping the code that way. Also, initialising `$versions` outside the check, right at the start ensures it's always defined for the `switch` code further down.
2018-03-24 11:05:16 +00:00
luz.paz
380517ef00 Misc. trivial typos
Found via `codespell -q 3`
2018-03-03 07:07:14 -05:00
terrafrost
55384afdac RSA: make it so you can't sign w/ public key, decrypt w/ private 2018-02-18 16:03:06 -06:00
Sokolovskyy Roman
c705e7d9c6 Add PhpDoc @var for extract() functions 2017-12-04 11:11:43 +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
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
Sokolovskyy Roman
cc3f0c1ec1 Added missing private field 2017-07-20 11:10:06 +02:00
terrafrost
819a165246 RSA: add enableBlinding() / disableBlinding() static methods 2017-06-26 23:19:30 -05: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
eb459daeaf add DSA implementation 2017-02-02 20:20:47 -05: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
c852bae3c8 use short array syntax for arrays 2016-11-30 21:29:38 -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
863ff6789b RSA: refactor PKCS1/PKCS8 to facilitate re-use 2016-11-17 08:09:10 -06: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
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
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
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
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
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
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
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
398a795e1f Revert "undo merging of master to 2.0 branch"
This reverts commit 8fb4c3363d.
2016-04-30 16:23:35 -05:00
terrafrost
8fb4c3363d undo merging of master to 2.0 branch 2016-04-28 15:34:10 -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
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
263564a2ee Merge branch 'master' of https://github.com/phpseclib/phpseclib 2016-04-09 13:00:51 -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
DAB
89a73161cb set publicExponent to false instead of unsetting 2016-03-25 22:10:36 -05:00
terrafrost
be0aed43cf RSA: bring PKCS1 compliancy to v2.2 2016-03-24 13:38:51 -05:00
terrafrost
698efd030a RSA: fix namespacing for caught exceptions 2016-02-20 23:54:19 -06:00
terrafrost
750f7652c7 Merge remote-tracking branch 'joey3000/use_cleanup' 2016-01-25 17:00:30 -06:00
Joey3000
bdc28b9453 Cherry-picking cleanup of use operator usage
Picked c9a80ff748 to the 2.0 branch and resolved conflicts.
2016-01-21 19:41:41 +01:00
Joey3000
c9a80ff748 Cleanup of use operator usage
This does the following:

1. Removes superfluous usage of the `use` operator. Specifically, that operator is not needed to use classes in the same `namespace` as the object (see https://secure.php.net/manual/en/language.namespaces.rules.php).

2. While at it, also sorted the `use` operators alphabetically, for a better overview.
2016-01-18 05:05:31 +01:00
terrafrost
5d85d5eca1 RSA: error out when encrypting strings that are too long 2016-01-17 09:45:13 -06:00
terrafrost
ad4c3670d3 Merge branch 'biginteger-revamp' 2016-01-16 22:59:19 -06:00
terrafrost
6abbbfdfe3 RSA: change default key size to 2048 2016-01-08 13:58:06 -06:00
terrafrost
f7efbcbc8e BigInteger: updates per Joey3000 2016-01-08 10:19:48 -06:00
terrafrost
c85b356b18 RSA: more updates per Joey3000 2016-01-07 22:26:10 -06:00
terrafrost
d5a359b41e RSA: updates per Joey3000 2016-01-03 13:03:58 -06:00
terrafrost
a0d21b6321 BigInteger: make select methods static, add type hinting, etc 2015-12-27 10:24:17 -06:00
terrafrost
806249c7e9 RSA: changes to how encryption / signatures work 2015-12-25 11:28:24 -06:00
terrafrost
1c9ee4ef28 RSA: fix PKCS8 key handling (again) 2015-12-07 23:53:09 -06:00
Andreas Fischer
466ad666b8 Merge branch '1.0' into 2.0
* 1.0:
2015-11-10 10:05:06 +01:00
terrafrost
c34be16c3a Merge branch 'rsa-pkcs8-fix' into rsa-pkcs8-fix-2.0
Conflicts:
	phpseclib/Crypt/RSA.php
2015-11-09 23:10:21 -06:00
terrafrost
7339112e10 RSA: fix issue with loading PKCS8 specific keys 2015-11-09 22:53:50 -06:00