Skip to content

PHP 8.0 < 8.1 -- real slow due to XChaCha20 polyfill #178

@rotdrop

Description

@rotdrop

Hi,
thank you for this package. I'm experiencing very very bad performance on PHP 8.0 caused by the XChaCha20 polyfill.

Meanwhile I have recompile a php 8.0 package without libsodium support and installed the very latest pecl-extension from

https://github.com/jedisct1/libsodium-php.git

which has the require PHP binding sodium_crypto_stream_xchacha20_xor. With this setup things are quite fast, where "fast" means roughly 0.05 seconds for 16Mib and "slow" about 12 seconds for the same size. This is for symmetric encryption using the `File::encrypt()' method.

Without streaming (which compresses the data in chunks of 1Mib it seems), that is with the Symmetric\Crypto::encrypt() the thing is hopelessly slow (gave up) while it takes on my system roughly 5 seconds when using the hand-made bleeding edge libsodium bindings.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions