Skip to content

Releases: paragonie/sodium_compat

Version 1.9.4

10 May 03:07
v1.9.4
Compare
Choose a tag to compare
  • Applied the same optimizations from ParagonIE_Sodium_Core32_Int64 to ParagonIE_Sodium_Core32_Int32. This won't have as much of an impact on performance as v1.9.2 did, but it helps.

Version 1.9.3

09 May 19:18
Compare
Choose a tag to compare

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

09 May 19:09
v1.9.2
d30e880
Compare
Choose a tag to compare
  • 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

20 Mar 17:30
v1.9.1
Compare
Choose a tag to compare

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

06 Mar 17:23
v1.9.0
Compare
Choose a tag to compare
  • The crypto_aead_xchacha20poly1305_ietf_* polyfill will now correctly use the native (ext/sodium) API if the functions exist.

Version 1.8.0

30 Nov 05:16
v1.8.0
Compare
Choose a tag to compare
  • 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

22 Sep 04:15
v1.7.0
Compare
Choose a tag to compare
  • 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
    • 64-bit (these numbers are mostly irrelevant if you already set ParagonIE_Sodium_Compat::$fastMult to true):
      • Curve25519 should be to 15% faster than in v1.6.6
      • Poly1305 should be up to 20% faster than in v1.6.6
  • 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

21 Sep 01:52
v1.6.6
a19c29c
Compare
Choose a tag to compare
  • 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

14 Sep 00:27
v1.6.5
Compare
Choose a tag to compare
  • Fixed an outstanding issue with crypto_box_seal() generating invalid ephemeral keypairs on 32-bit platforms.

Verison 1.6.4

29 Aug 22:40
v1.6.4
3f2fd07
Compare
Choose a tag to compare
  • Fix ParagonIE_Sodium_File on 32-bit devices. See #72.
  • Fix behavior of sodium_memzero() and sodium_increment() with the old PHP extension. Fixes #73.