Commit Graph

1108 Commits

Author SHA1 Message Date
terrafrost
27f578797d XML Key loading tweaks 2022-02-14 23:20:29 -06:00
terrafrost
7d3dbccd72 DH/PKCS8: encryption options couldn't be set for PKCS8 private keys 2022-02-14 21:19:29 -06:00
terrafrost
5bc572e2ce EC/PKCS8: OpenSSL didn't like phpseclib formed Ed25519 private keys
Tested with openssl pkey -in private.pem -pubout -text on
OpenSSL 1.1.1f 31 Mar 2020
2022-02-14 21:15:36 -06:00
terrafrost
f1dec13c38 PKCS8: the parent class shouldn't be directly called 2022-02-14 20:09:33 -06:00
terrafrost
dc488f967f PKCS8: fix private key creation 2022-02-14 19:27:47 -06:00
terrafrost
91a674a781 RSA/PrivateKey: add comment to explain things 2022-02-14 17:59:41 -06:00
Jack Worman
b96fc26dbc Psalm coverage to everywhere except phpseclib/Crypt/, phpseclib/Math/ and tests/
Revert "Removed remaining tabs"

This reverts commit 31c077d6b1.

Revert "Whitespace php-cs-fixer.php rules added"

This reverts commit 25e336614d.

Addressing comments
2022-02-14 17:30:41 -06:00
terrafrost
f96f3505a8 Hash: add support for keccak256 2022-02-08 20:34:17 -06:00
terrafrost
60edff77e6 EC: CS adjustment 2022-02-04 10:38:47 -06:00
Filippo Tessarotto
e884929175
EC: decipher private key to generate signature 2022-02-04 10:15:39 +01:00
terrafrost
56973d40db SSH2: stop using more dynamic properties in SymmetricKey 2022-02-01 21:17:10 -06:00
Jack Worman
9b1c218664 psalm ci
psalm-ci

psalm-ci

psalm-ci
2022-02-01 20:45:53 -06:00
Jack Worman
ef66d9f7dd php-cs-fixer ci
php-cs-fixer ci
2022-02-01 20:29:48 -06:00
terrafrost
d925e66677 Merge branch '1.0' into 3.0 2022-02-01 06:33:46 -06:00
terrafrost
54a5c4b064 Merge branch '1.0' into 2.0 2022-02-01 06:32:02 -06:00
terrafrost
4d66eeb6a4 Crypt/Base: fix CTR mode with continuous buffer with non-eval PHP 2022-02-01 06:31:09 -06:00
terrafrost
8a123550c5 Crypt/Base: code cleanup 2022-01-30 10:25:45 -06:00
terrafrost
3f2a5aa4cd SSH2: stop using dynamic properties in Hash 2022-01-30 01:52:31 -06:00
terrafrost
215fd61d12 SSHi2: stop using dynamic properties in SymmetricKey 2022-01-30 01:36:02 -06:00
Jack Worman
0a9fc99dc8 Un-qualifying global functions
Un-qualifying global functions
2022-01-30 01:19:16 -06:00
Jack Worman
e3b71763ae Fixed psalm level 6 errors in phpseclib/Net/ 2022-01-30 01:18:53 -06:00
terrafrost
56ed69fbe7 fix bad merge 2022-01-29 09:15:01 -06:00
terrafrost
1017120fa9 Merge branch '2.0' into 3.0 2022-01-28 15:10:07 -06:00
terrafrost
c8d379daa5 Crypt/Base: add OFB8 as a new mode 2022-01-28 14:39:16 -06:00
Jack Worman
7c000843ab Corrected many @return annotations in phpseclib/Net
Corrected many @return annotations in phpseclib/Net
2022-01-23 11:00:41 -06:00
terrafrost
c60b0c3cc7 Merge branch '1.0' into 2.0 2021-12-26 02:23:57 -06:00
David Anderson
dd9dfeec18
Check phpinfo() available before using it 2021-12-21 14:17:16 +00:00
terrafrost
13881b09d4 Travis: add PHP 8.1 support
See https://bugs.php.net/75474#1509646645 for more info on the static
change
2021-12-11 10:19:39 -06:00
terrafrost
8a0e6c05e7 Salsa20: fix PHP 5.6 error
The following demonstrates the error:

function demo(&$x)
{
  $x = 5;
}

$x = $y = [10];
demo(...$y);
echo $x[0];

That outputs 5 in PHP 5.6 and 10 in later PHP versions
2021-12-10 07:30:26 -06:00
terrafrost
4141799c02 Tests: fix issues with Salsa20 / ChaCha20 unit tests 2021-12-04 18:43:12 -06:00
terrafrost
1bd5b40ee1 SymmetricKey: add getMode() 2021-11-28 11:27:52 -06:00
terrafrost
a85c2f0d6e RSA: rm unused privateKey variable 2021-11-22 08:13:55 -06:00
terrafrost
84295e2fc2 RSA/Keys/Raw: add support for private keys 2021-11-21 21:22:34 -06:00
terrafrost
c4b571a588 EC: error out when scalar is out of range 2021-11-21 09:55:04 -06:00
terrafrost
053910784e CS adjustments 2021-11-14 00:53:03 -06:00
terrafrost
4eb9cbd0c8 EC/Keys/PKCS8: publicKey parameter should be optional 2021-11-14 00:52:37 -06:00
terrafrost
13b5ad9593 Merge branch '1.0' into 3.0 2021-09-28 09:00:00 -05:00
terrafrost
addfd93b71 Merge branch '1.0' into 2.0 2021-09-28 08:59:13 -05:00
terrafrost
3ef68bd912 RSA: ssh-keygen -yf private.key fails if \r is present 2021-09-28 08:57:41 -05:00
Claude Pache
291eec0ce5 PublicKeyLoader: make all methods static 2021-08-14 12:03:43 -05:00
terrafrost
12864bd9f6 AsymmetricKey: make more methods static 2021-08-14 12:03:23 -05:00
terrafrost
a5fcb44e28 AsymmetricKey: make methods static 2021-06-16 01:40:27 -05:00
terrafrost
07423805ac Merge branch '2.0' into 3.0 2021-06-12 07:58:20 -05:00
terrafrost
451ddf453c Merge branch '1.0' into 2.0 2021-06-12 07:11:44 -05:00
terrafrost
c3560c2d4d RSA: OAEP decryption didn't check labels correctly 2021-06-12 07:06:08 -05:00
terrafrost
cfe8a24011 PrivateKey: tweak interface 2021-05-22 10:18:11 -05:00
terrafrost
d9615a6fb9 AsymetrticKey: add getComment() method 2021-04-18 22:20:48 -05:00
Bastien Miclo
0dabb0c090 Allow to specify extension value as critical 2021-04-15 21:21:48 -05:00
terrafrost
03e9060cbb cipher_name_openssl_ecb shouldn't be static because of AES 2021-04-14 05:24:03 -05:00
terrafrost
b7eaee4977 don't load plugins whose filename start with a . 2021-04-09 10:55:50 -05:00
terrafrost
f95b039d08 Merge branch 'moosa-1.0' into moosa-2.0 2021-04-03 18:17:27 -05:00
terrafrost
149b4d2131 RSA: fix for PHP8 2021-04-03 18:16:59 -05:00
terrafrost
74435e1b80 Merge branch 'moosa-1.0' into moosa-2.0 2021-04-03 17:55:22 -05:00
terrafrost
8af4280bde RSA: misc fixes for 'without NULL' PKCS1 signature validation 2021-04-03 17:55:12 -05:00
terrafrost
f61cce9c83 RSA: misc fixes for "without NULL" PKCS1 signature validation 2021-04-03 17:50:28 -05:00
terrafrost
ae15ac69d0 Merge branch 'moosa-2.0' into moosa-3.0 2021-04-03 17:12:38 -05:00
terrafrost
43eeb853f1 Merge branch 'moosa-1.0' into moosa-2.0 2021-04-03 16:47:37 -05:00
terrafrost
4a3e08c273 RSA: tweak to new validation method 2021-04-03 16:33:23 -05:00
terrafrost
9af9d69c19 RSA: support "strict" PKCS1 sigs without NULLs 2021-04-03 16:00:42 -05:00
terrafrost
42fc46e9a9 RSA: make sure that parameters is null for relaxed PKCS1 signatures 2021-04-03 11:33:49 -05:00
terrafrost
57b6942962 Merge branch '2.0' into 3.0 2021-03-20 06:30:39 -05:00
terrafrost
6136434139 Merge branch '1.0' into 2.0 2021-03-19 16:59:46 -05:00
terrafrost
e209db78b8 Crypt/Base: use a custom error handler for mcrypt 2021-03-19 16:55:58 -05:00
terrafrost
55f23334cd loadPublic -> loadPublicKey; loadPrivate -> loadPrivateKey 2021-02-12 07:48:12 -06:00
terrafrost
3bddf4d962 PublicKeyLoader: add loadPublic, loadPrivate and loadParameters 2021-02-08 23:44:24 -06:00
terrafrost
a18b86ae26 add mode to all block cipher examples 2021-02-04 01:06:14 -06:00
terrafrost
d096769654 Rijndael: calling setIV() after setBlockLength() can result in err 2021-02-02 20:21:56 -06:00
terrafrost
e9f79655db RSA: use OpenSSL for generating private keys 2021-01-28 09:49:15 -06:00
terrafrost
85a844bab1 RSA: CS adjustments 2021-01-26 22:58:45 -06:00
terrafrost
bdb6c08c35 misc docblock adjustments 2021-01-25 12:36:02 -06:00
terrafrost
8e7acd8842 Merge branch '1.0' into 2.0 2021-01-16 10:32:10 -06:00
Jan Slabon
e5a226f6be Added support of keys with PSS algorithm-identifier 2021-01-16 10:31:56 -06:00
Jan Slabon
131459996b Added support for absent parameters field in PSS keys
See [here](https://tools.ietf.org/html/rfc4055#section-3.1) for details.
2021-01-16 10:24:55 -06:00
terrafrost
c1b70c21cb RSA: the salt length isn't saved for new keys 2021-01-16 09:59:45 -06:00
terrafrost
5f8ca76d0f RSA: the salt length, if not specified, is the length of the hash 2021-01-14 08:11:53 -06:00
terrafrost
06cd62ae55 Merge branch 'rsa-exceptions' into 3.0 2021-01-14 03:10:59 -06:00
terrafrost
bfb49c06e8 RSA: throw exceptions instead of returning false 2021-01-13 12:08:23 -06:00
Simon Podlipsky
b82766486a Fix imports in PublicKeyLoader 2021-01-12 11:12:31 -06:00
terrafrost
05d934c89f RSA: improve identification of public / private PKCS1 / PKCS8 keys 2021-01-08 09:01:31 -06:00
terrafrost
e14e9e92ca EC: use the correct case up front 2021-01-07 19:35:34 -06:00
terrafrost
7b7d254a6c rm docblock templates 2020-12-30 09:08:05 -06:00
terrafrost
a19b5b4ca8 update how @internal phpdoc attributes are used 2020-12-30 05:05:54 -06:00
Bastien Miclo
224abbc1f9 Show array-failure in load() method 2020-12-23 07:49:08 -06:00
terrafrost
02fa3b142e EC/PKCS1: throw exception when trying to load non-strings 2020-12-23 07:06:04 -06:00
terrafrost
99e8d7b822 PKCS8: fix E_WARNING 2020-12-17 08:13:56 -06:00
terrafrost
e69b79eba7 Merge branch 'codelts' into 3.0 2020-11-21 10:51:30 -06:00
terrafrost
5983df848c EC: add support for PKCS1 private keys with separate parameters 2020-09-19 08:36:09 -05:00
William Desportes
5711e7fbe4
Fix phpdoc issues reported by Doctum 2020-09-12 10:14:54 +02:00
William Desportes
480af6b980
Merge branch '2.0' into 3.0 2020-09-09 10:46:22 +02:00
William Desportes
05f6467b1d
Merge branch '1.0' into 2.0 2020-09-09 09:56:23 +02:00
William Desportes
2ae683479a
Fix phpdoc errors 2020-09-09 09:43:26 +02:00
terrafrost
0747be3d27 Merge branch '1.0' into 2.0 2020-08-01 04:06:57 -05:00
Vincent Langlet
05a564c136 Return false by default 2020-07-30 15:42:02 +02:00
terrafrost
478672607c PKCS8: fix E_NOTICE 2020-07-19 22:40:42 -05:00
terrafrost
cc3ad79058 Crypt/Base: create_function isn't needed for PHP >= 5.3.0 2020-05-29 08:34:40 -05:00
terrafrost
32acf235e8 SymmetricKey: rm unused line 2020-05-16 13:19:24 -05:00
terrafrost
a82dc8e009 SymmetricKey: ECB doesn't use an IV either 2020-05-15 07:53:14 -05:00
terrafrost
f780640ecf move more common elements to StreamCipher class 2020-05-12 22:03:06 -05:00
terrafrost
cc45f18cb8 stream ciphers don't use IVs 2020-05-12 08:15:49 -05:00
terrafrost
ce6d28789a ChaCha20: rm unused 'use' statement 2020-05-12 07:00:38 -05:00
terrafrost
0b231cc53b RSA: rm ENCRYPTION_PKCS15_COMPAT mode 2020-04-19 15:10:38 -05:00
terrafrost
881fbd78ee Hash: add __toString() method 2020-04-19 09:19:27 -05:00
terrafrost
10ce0b9b21 PuTTY: comments weren't settable via toString() method 2020-04-18 10:44:15 -05:00
terrafrost
92d0cd837e PKCS8: add extractEncryptionAlgorithm() method 2020-04-17 22:51:03 -05:00
terrafrost
0f8486cc87 allow strinable objects to be loaded instead of just strings 2020-04-13 07:58:00 -05:00
terrafrost
94d3403ed3 getLoadedFormat() threw exception for loadFormat()-loaded keys 2020-04-08 06:15:46 -05:00
terrafrost
327a13d133 $key->getLoadedFormat didn't work on EC / DSA keys 2020-04-08 05:07:47 -05:00
terrafrost
ceff4cfbbc rm call_user_func() calls 2020-04-05 15:04:22 -05:00
terrafrost
e72c88cf16 Merge branch '1.0' into 2.0 2020-04-03 07:34:08 -05:00
Tyson Andre
41eb0d8012 Fix logic error reading random bytes from /dev/urandom
Fixes a bug introduced in c2be7e648

Previously, this would return those bytes if the number of bytes read
was **less than** the number of bytes this was trying to read.

In practice, I believe this would mean bytes from /dev/urandom would never
get used.  (Noticed when upgrading phpseclib)
2020-04-03 07:33:58 -05:00
terrafrost
fc87edce6e PKCS8: throw an exception when no ASN1 maps can be used 2020-03-30 00:19:45 -05:00
terrafrost
5d5ed4a449 RSA: fix for RSA PKCS1 public keys masquerading as public keys 2020-03-29 23:31:13 -05:00
terrafrost
8a761b5265 Merge branch '1.0' into 2.0 2020-02-01 20:14:46 -06:00
terrafrost
c2be7e6480 return early if fread() response is bool(false) 2020-02-01 17:30:52 -06:00
terrafrost
2b28c3814b Keys/PuTTY: better support RFC4716 keys 2020-01-19 02:09:39 -06:00
terrafrost
14c09f8527 throw exceptions for all private formats not supporting encryption 2020-01-18 22:53:35 -06:00
terrafrost
0afd386114 RSA: PuTTY public keys couldn't be saved 2020-01-18 22:12:00 -06:00
terrafrost
bed8be26d7 Keys/OpenSSH: throw an exception if you try to encrypt 2020-01-18 18:53:09 -06:00
terrafrost
0e1dff2be7 RSA: fix MSBLOB encoding error 2020-01-18 17:47:24 -06:00
terrafrost
3ba5902046 RSA / X509: misc fixes (mostly related to PSS) 2020-01-04 16:26:55 -06:00
terrafrost
c4e07725aa EC: don't call loadCurveByParams if params is null 2020-01-02 05:43:27 -06:00
terrafrost
a7b1d031bb visibility changes for phpseclib2_compat 2019-12-30 22:19:07 -06:00
terrafrost
0c8b6961e3 EC: fix PKCS8 Ed25519 private keys 2019-12-17 07:56:16 -06:00
terrafrost
f1d04b23db Merge branch '3.0' into phpseclib3 2019-11-23 01:55:36 -06:00
terrafrost
ea27295c8f SSH2: ssh-ed25519 keys didn't work 2019-11-23 00:58:12 -06:00
terrafrost
653dbd7f94 rename phpseclib/phpseclib to phpseclib/phpseclib3 for 3.0 branch 2019-11-21 19:38:03 -06:00
terrafrost
e7e563d0ce Merge branch '2.0' into 3.0 2019-10-20 13:45:06 -05:00
terrafrost
e36f9388cb Merge branch '1.0' into 2.0 2019-10-20 13:27:24 -05:00
Brice Figureau
207cd0f4ea (#1423) make PSS verification work for non power of 2 keys
RFC3447 doesn't require RSA public keys to be power of 2 keys.
The actual validation code doesn't work when trying to verify
a PSS signature generated with a non power of two key.
This small patch adds support for such keys.
2019-10-20 13:27:01 -05:00
terrafrost
e73f1ec910 fix PHP4 compatibility issue 2019-09-22 10:30:58 -05:00
terrafrost
71ced69714 SSH2: add support for EtM 2019-09-09 01:18:33 -05:00
terrafrost
580eb94fd3 SSH2: add umac-64 / umac-128 support 2019-09-08 11:23:29 -05:00
terrafrost
8608463d61 Hash: add support for UMACs 2019-09-07 14:46:55 -05:00
terrafrost
eddbdcc66c don't re-generate Eval mode stuff when only IV has changed 2019-09-06 05:37:13 -05:00
terrafrost
23ffa6452e revisions to gocom's code changes 2019-08-28 07:16:24 -05:00
Jukka Svahn
488433e10f Fix mode mapping order and param type 2019-08-24 02:06:45 +03:00
terrafrost
422523cf43 EC: make libsodium an insvisible key format 2019-08-09 09:19:01 -05:00
terrafrost
68f3d7d8af add support for Curve448 2019-08-08 22:38:42 -05:00
terrafrost
7cf5facae7 DH: add Curve25519 unit test based off of RFC7748 test vectors 2019-08-08 08:00:37 -05:00
terrafrost
f04d69a3eb Merge branch 'master' into diffie-hellman 2019-08-07 08:09:36 -05:00
terrafrost
1e7453b585 add a new diffie-hellman key exchange class 2019-08-06 22:10:56 -05:00
terrafrost
dfde088d4c visiblity adjustments for PHP 7.4 2019-08-03 16:42:40 -05:00
terrafrost
cb1e6b285c for private key's, load works but loadFormat would be better 2019-06-28 09:30:46 -05:00
terrafrost
eb659a5544 set password in load methods for each pubkey instead of in loader 2019-06-28 08:58:20 -05:00
terrafrost
5573187f3d rm $type parameter from AsymmetricKey::load and add loadFormat() 2019-06-28 08:51:12 -05:00
terrafrost
289ae55f9f rename ECDSA -> EC 2019-06-27 23:15:25 -05:00
terrafrost
0abce39e39 move $enableBlinding property from AsymmetricKey to RSA 2019-06-27 00:30:55 -05:00
terrafrost
25dab4b5ae move traits to Traits subfolder 2019-06-26 00:42:02 -05:00
terrafrost
7012e72488 mv Keys/ and Signature/ to Formats/* 2019-06-25 07:52:45 -05:00
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
c5a9a66d69 DSA: pass password parameter correctly to OpenSSH::load 2019-06-08 23:18:21 -05:00
terrafrost
327f555b7c add expanded support for OpenSSH private keys 2019-06-08 22:04:54 -05:00
terrafrost
88b6337a3f RSA: fix issue with PKCS1 encryption 2019-06-08 18:58:24 -05:00
terrafrost
a431a1959a ECDSA: make it so toString() can setspecified / named curve use 2019-06-03 20:33:01 -05:00
terrafrost
557676edd9 use array type hint 2019-06-02 10:26:26 -05:00
terrafrost
8e03f5bfb2 RSA: make it so PSS keys can be saved 2019-06-01 19:35:17 -05:00
terrafrost
b226c3d882 add second $options parameter to toString method for public keys 2019-06-01 15:53:35 -05:00
terrafrost
8017c74429 RSA: add preliminary support for RSA-PSS keys 2019-05-29 00:32:53 -05:00
terrafrost
7c7d500d80 System/Agent: add support for DSA / ECDSA keys 2019-05-23 08:35:36 -05:00
terrafrost
85e2bd4811 SSH2: get binary output from OpenSSH key handler 2019-05-21 09:10:18 -05:00
terrafrost
e06f733528 ECDSA: add missing class variables for deterministic ECDSA 2019-05-21 00:03:21 -05:00
terrafrost
cc32cd2e95 make RSA / DSA / ECDSA immutable and add support to SSH2 / X509 2019-05-19 15:35:29 -05:00
terrafrost
00b6eaf507 ECDSA/Keys/PKCS8: correctly convert private keys to public 2019-04-29 21:45:17 -05:00
terrafrost
1780bee619 SSH2: add support for elliptic curve hostkeys 2019-03-30 13:35:16 -05:00
terrafrost
aa4c6e686a Merge branch 'master' into chacha20 2019-03-26 08:36:07 -05:00
terrafrost
213516128a Crypt: $use_inline_crypt is no longer used 2019-03-23 20:50:10 -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
494d20efc8 add Salsa20 / ChaCha20 stream ciphers 2019-03-22 15:45:36 -05:00
terrafrost
307f685cbc Merge branch '1.0' into 2.0 2019-03-09 17:20:49 -06:00
terrafrost
84e2329249 Hash: fix issues with the mode 2019-03-09 17:08:59 -06:00
terrafrost
e706c549c1 Hash: adjustments for 2.0 branch 2019-03-08 08:36:16 -06:00
terrafrost
07ffe647f7 Merge branch '1.0' into 2.0 2019-03-08 08:34:58 -06:00
terrafrost
492562e034 Hash: fix issues with _computeKey 2019-03-08 08:34:33 -06: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
86b05c0081 Merge branch '1.0' into 2.0 2019-02-10 17:20:21 -06:00
terrafrost
fcfba38fc7 Crypt: avoid bogus IV errors in ECB mode 2019-02-10 17:18:40 -06:00
terrafrost
17e6938fba updates to Exceptions 2018-12-31 09:55:32 -06:00
terrafrost
c6f9807633 SymmetricKey: don't define self::$gcmField unless we're in GCM mode 2018-12-30 10:14:51 -06:00
terrafrost
f98e0afc76 AES: move GCM code to Rijndael 2018-12-30 02:15:06 -06:00
terrafrost
5abb16dc6d SymmetricKey: simplify mode setup 2018-12-30 01:30:21 -06:00
terrafrost
a8d07e3dcb SymmetricKey: make $cipher_name_openssl_ecb static 2018-12-29 23:21:18 -06:00
terrafrost
49be6e5529 Hash: rm function_exists calls for hash extension functions 2018-12-29 23:09:33 -06:00
terrafrost
e2256f4267 Hash: fix grammer error 2018-12-29 23:05:20 -06:00
terrafrost
5126937d40 Rijndael: replace block size switch with a single variadic function 2018-12-29 19:35:05 -06:00
terrafrost
01c92a59f8 add support for Galois/Counter Mode (GCM) 2018-12-27 08:31:35 -06:00
terrafrost
a30cfff79c Merge branch 'master' of https://github.com/phpseclib/phpseclib 2018-12-16 19:04:43 -06:00
terrafrost
3dbc50c667 Merge branch 'post-ecdsa' 2018-12-16 19:03:44 -06:00
terrafrost
d37969a345
Merge pull request #1322 from terrafrost/ecdsa
add ECDSA / EdDSA support
2018-12-16 17:46:28 -06:00
terrafrost
8e977b4e59 ECDSA: CS adjustments to curves 2018-12-03 03:47:46 -06:00
terrafrost
7fb7e6ce52 Twofish: make tables static 2018-12-02 14:28:14 -06:00
terrafrost
e758878580 RC2: make pitable / invpitable tables static 2018-12-02 14:13:08 -06:00
terrafrost
b278bc7e7e DES: make sboxes static 2018-12-02 13:59:42 -06:00
terrafrost
4679cb7bf7 Blowfish: make sboxes static 2018-12-02 12:42:53 -06:00
terrafrost
9bcd851e97 Blowfish: CS adjustments (" -> ') 2018-12-02 12:21:56 -06:00
terrafrost
5bcb298af7 SymmetricKey: throw an exception when en/de-crypting w/o a key 2018-12-02 12:01:56 -06:00
terrafrost
3ecc62912d throw exceptions when signing / verification is attempted w/o a key 2018-12-02 07:17:17 -06:00
terrafrost
2c1994805b ECDSA: make it so hash can't be changed for Ed25519 / Ed448 2018-11-29 10:05:28 -06:00
terrafrost
9ccfaff7ba expand on eval() explanation 2018-11-20 08:26:17 -06:00
terrafrost
0398f7a815 add ECDSA / EdDSA support 2018-11-19 12:39:21 -06:00
terrafrost
99dcf43a7a Merge branch '1.0' into 2.0 2018-10-13 08:21:22 -05:00
terrafrost
048635669e Crypt/Base: create hmac object outside of while loop 2018-10-13 08:20:09 -05:00
terrafrost
405ed06e8a Merge branch '2.0' 2018-10-13 08:18:47 -05:00
terrafrost
3119bb98e3 Merge branch '1.0' into 2.0 2018-10-13 08:15:46 -05:00
terrafrost
f0f7350045 Crypt/Base: if derived key length is 0 or less use hash length 2018-10-13 08:10:34 -05:00
terrafrost
39d3ffbeb1 Hash: use hash method for sha3 when available 2018-10-13 07:48:47 -05:00
terrafrost
3df87e8632 Merge branch '2.0' 2018-10-13 00:50:48 -05:00
terrafrost
f938922cfc Merge branch '1.0' into 2.0 2018-10-12 23:05:42 -05:00
terrafrost
2d7aadc689 Hash: tweaks to hash pre-computation 2018-10-12 23:04:57 -05:00
terrafrost
a1513eb02f Merge branch '2.0' 2018-10-12 22:44:14 -05:00
terrafrost
f5a9c0806a Merge branch '1.0' into 2.0 2018-10-12 21:44:52 -05:00
terrafrost
685e0abcc6 Hash: save hashed keys for re-use 2018-10-12 21:18:23 -05:00
Filippo Tessarotto
19f706003e
Explain the kraken 2018-10-09 08:35:56 +02:00
terrafrost
7740d9c0c0 Hash: add sha3 support 2018-08-11 23:55:41 -05: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
terrafrost
3dae376e9c Merge remote-tracking branch 'J5lx/2.0-cfb8' into 2.0 2018-03-27 11:06:11 -05:00
Jakob Gahde
8e6948fdd2
Backport CFB8 support from master 2018-03-27 04:32:16 +02: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
2a6f5f825a Asymmetric: fix for phar's
Inspired by 4e367c9631
2018-02-23 21:15:33 -06:00
terrafrost
b9cd84108c AES: fix issue preventing ECB mode from decrypting 2018-02-21 08:26:52 -06: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
terrafrost
239a32ff06
Merge pull request #1222 from rrran/extract_func_phpdoc
Add PhpDoc @var for extract() functions
2017-12-23 14:18:28 -06:00
Sokolovskyy Roman
b8d826f04f Trying to fix unit tests 2017-12-21 10:17:30 +01:00
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