Skip to content

Encryption and decryption, exmples, and tests#2

Open
singpolyma wants to merge 208 commits into
dryphp:masterfrom
singpolyma:master
Open

Encryption and decryption, exmples, and tests#2
singpolyma wants to merge 208 commits into
dryphp:masterfrom
singpolyma:master

Conversation

@singpolyma
Copy link
Copy Markdown
Contributor

I probably should have been making pull requests way more frequently, because this one is huge now.

I have implemented encryption an decryption (for RSA, AES, and 3DES). I have example code. I have a test suite which is checked by travis-ci (https://travis-ci.org/singpolyma/openpgp-php).

singpolyma and others added 20 commits May 25, 2021 19:35
This is just encoding/decoding/fingerprint calculation.
Add Passbolt to the projects using the library
Fix misc minor issues to improve PHP 8.1 compatibility
main changes:
  * namespace (eg `phpseclib\Crypt\RSA` -> `phpseclib3\Crypt\RSA`)
  * it's no more possible to directly set attributes, instead
    we need to use the loadPrivateKey / loadPublicKey static methods
  * harmonized the symetric cipher methods to use `getKeyLength`
    `getBlockLengthInBytes`
Fix OpenPGP unarmor should return false if armor contain invalid Base64 char
Fix PHP 8.2 deprecation errors
@Neustradamus
Copy link
Copy Markdown

Dear @dryphp team, @artob,

I wish you a Happy New Year 2024!

Can you look this important @singpolyma PR?

Thanks in advance.

cedricalfonsi and others added 9 commits February 20, 2024 16:30
Fixes #120
Closes #139
…ntify-openpgpjs-v510-revoked-key-as-revoked

PB-26152 parser support of critical subpacket flag
Uncaught OutOfRangeException: Ciphertext representative out of range
With very large S2K `count` values, creating the key object was using double the memory of the S2K value because it first built a longer-than-needed string and then used `substr` to get only the needed length, which created another new string object.

This PR replaces `str_repeat(..., ceil(...))` (making a too-long string) and `substr` (trimming it) with `str_repeat(..., floor(...))` (making a too-short string) and a different use of `substr` (padding it with the remainder).

fixes #141
Reduce memory usage of S2K iteration
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.