Releases: paragonie/sodium_compat
Version 1.9.4
- Applied the same optimizations from
ParagonIE_Sodium_Core32_Int64
toParagonIE_Sodium_Core32_Int32
. This won't have as much of an impact on performance asv1.9.2
did, but it helps.
Version 1.9.3
Almost identical to v1.9.2
except I added a type-hint so Psalm won't report a false positive to projects that use our library.
Version 1.9.2
- The
ParagonIE_Sodium_Compat::$fastMult
flag now exposes an optimized integer multiplication implementation on 32-bit systems. Previously it only optimized 64-bit platforms. This should result in a 9x-10x speedup on average.
Version 1.9.1
Fix performance issue with crypto_kx()
polyfill. It was always calling the PHP implementation of scalarmult()
instead of trying the PHP extension instead.
Version 1.9.0
- The
crypto_aead_xchacha20poly1305_ietf_*
polyfill will now correctly use the native (ext/sodium) API if the functions exist.
Version 1.8.0
- Added
ParagonIE_Sodium_Compat::polyfill_is_fast()
for runtime decision-making. It will return FALSE if the 32-bit implementation is going to be invoked. - Added missing version constants #81
sodium_crypto_box_seal_open()
will no longer silently catch all exceptions and return false, only the ones necessary for behavior compatibility with ext/sodium
Version 1.7.0
- Improved performance on 32-bit and 64-bit platforms by reducing the number of cycles needed for constant-time multiplication in our Curve25519 and Poly1305 implementations. The actual numbers will vary depending on machine jitter. That being said:
- 32-bit:
- Curve25519 should be to 10% faster than in
v1.6.6
- Poly1305 should be up to 25% faster than in
v1.6.6
- Curve25519 should be to 10% faster than in
- 64-bit (these numbers are mostly irrelevant if you already set
ParagonIE_Sodium_Compat::$fastMult
totrue
):- Curve25519 should be to 15% faster than in
v1.6.6
- Poly1305 should be up to 20% faster than in
v1.6.6
- Curve25519 should be to 15% faster than in
- 32-bit:
- Removed dead code (including the Field Element constructor, which was a vestige of an earlier design; Field Elements always have 10 integers in them).
- Comments, docblocks, and whitespace consistency.
This should be the last release for a while. A hypothetical v1.8.0 would include optional GMP support (which should get performance closer to what libsodium itself offers, and should be available to both 32-bit and 64-bit platforms).
That being said, we're much happier with the stability and performance of ParagonIE_Sodium_Core32_*
than we were with v1.6.0
.
I'd like to thank everyone who has reported bugs, sent patches, or shared optimization strategies with our team over the years. You've helped to bring open source, state-of-the-art cryptography to the hands every PHP developer (one way or another) and had an immeasurable positive impact on many software developer ecosystems. You all rock!
Version 1.6.6
- Greatly improve the speed of sodium_compat on 32-bit PHP! Special thanks to @duskwuff for introducing me to an optimization strategy for PHP code that gave us a speedup factor of 7x to 8x the previous speed.
Version 1.6.5
- Fixed an outstanding issue with
crypto_box_seal()
generating invalid ephemeral keypairs on 32-bit platforms.