Dylan K. Taylor
6eac2ea7a5
Modernize private property declarations in src/network
2022-05-17 21:22:33 +01:00
Dylan K. Taylor
7ddd547190
Merge remote-tracking branch 'origin/stable' into staging/4.1
2022-02-06 23:55:52 +00:00
Andrew1481432
2a4111868c
Fixed incorrect doc for EncryptionContext ( #4791 )
...
* Fixed incorrect doc for EncryptionContext
* Update src/network/mcpe/encryption/EncryptionContext.php
Co-authored-by: Dylan T <odigiman@gmail.com>
2022-02-02 13:12:33 +00:00
Dylan K. Taylor
1ab285f573
PrepareEncryptionTask: remove usage of no-op function
2021-12-16 18:47:50 +00:00
Dylan K. Taylor
889d048ca3
Make use of Utils::assumeNotFalse() in a bunch of places
...
I've stuck to only doing this in the places where I'm sure we should never get false back. Other places I'm less sure of (and I found more bugs along the way).
2021-12-08 19:39:04 +00:00
Dylan K. Taylor
2b5667a56b
Move PHP minimum to 8.0
2021-07-26 20:29:39 +01:00
Dylan K. Taylor
09eac0e129
Merge remote-tracking branch 'origin/stable'
2021-07-26 20:14:33 +01:00
Dylan K. Taylor
f89e10e684
Silence openssl_free_key() deprecation warnings on 8.0
...
we don't give a shit and these calls are currently needed for 7.4.
2021-07-23 16:30:22 +01:00
Dylan T
0eb4231b51
Use OpenSSL for ECDH during client login, drop mdanter/ecc ( #4328 )
...
This brings a significant performance improvement to login sequence handling, reducing CPU cost of `PrepareEncryptionTask` by over 90% and `ProcessLoginTask` by over 60%. It also allows us to shed a dependency.
2021-07-22 23:04:00 +01:00
Dylan K. Taylor
04a6e89d6f
Change encryption to use CTR instead of GCM
...
despite MCPE claiming to use GCM, it omits the auth tag, which defeats the whole point of using GCM.
CTR can be used instead, with the final 4 bytes of the IV being 0002.
2021-06-13 21:57:23 +01:00
Dylan K. Taylor
0df2677464
EncryptionContext: Allow passing encryption algo as a constructor parameter
2021-06-13 19:57:48 +01:00
Dylan K. Taylor
1e6d97a157
Merge branch 'stable'
2021-04-07 21:25:39 +01:00
Dylan K. Taylor
bc208e11f4
phpstan 0.12.57
2020-11-21 18:07:14 +00:00
Dylan K. Taylor
e23379c34b
EncryptionContext: provide the packet ID in the exception message
2020-11-10 14:45:19 +00:00
Dylan K. Taylor
222399d178
EncryptionContext: fix exception message
2020-06-18 11:52:05 +01:00
Dylan K. Taylor
95114dcc1e
EncryptionContext: fixed a phpstan level 7 error (openssl_digest() might return false for god knows what reason)
2020-06-18 11:50:43 +01:00
Dylan K. Taylor
edc3156bea
Rename NetworkCipher -> EncryptionContext
2020-06-18 11:37:53 +01:00
Dylan K. Taylor
d7eb4f9651
Extract more general-purpose logic to JwtUtils
...
this code could now be reused for creating custom login packets.
2020-05-13 20:46:01 +01:00
Dylan K. Taylor
ed757c7207
consolidate some JWT handling into one class
2020-05-06 21:32:22 +01:00
Dylan K. Taylor
e392a6a807
PrepareEncryptionTask: do not store onCompletion as a field
...
pthreads will screw around with it and make it do things it's not supposed to, which is the exact reason why we have thread-local storage to begin with.
2020-05-06 13:32:18 +01:00
Dylan K. Taylor
ff53ddd3ad
PrepareEncryptionTask: fix wrongly-specified nullability of serverPrivateKey
2020-05-06 13:29:58 +01:00
Dylan K. Taylor
0397204c68
network/mcpe: imports cleanup
2020-04-27 12:56:28 +01:00
Dylan K. Taylor
b2636161f7
PrepareEncryptionTask: move a bunch of stuff out of the AsyncTask class
2020-04-23 16:27:49 +01:00
Dylan K. Taylor
dd37d286f0
use a dedicated exception class for throwing exceptions on decrypt failure
2020-04-22 09:40:26 +01:00
Dylan K. Taylor
3d3a487422
PrepareEncryptionTask: remove cyclic dependency on NetworkSession
2020-04-18 11:25:29 +01:00
Dylan K. Taylor
67bcc1c0fb
phpdoc armageddon for master, pass 1
2020-01-22 11:55:03 +00:00
Dylan K. Taylor
aba71762e9
master-specific @var annotations
2020-01-09 17:50:01 +00:00
Dylan K. Taylor
4651bcf8c3
master: imports cleanup
...
it was easier to make an empty merge and re-run php-cs-fixer afterwards.
2019-12-11 23:23:03 +00:00
Dylan K. Taylor
5499ac620c
Removed pocketmine subdirectory, map PSR-4 style
2019-07-30 19:14:57 +01:00