Skip to content

4.2.9

Choose a tag to compare

@Spomky Spomky released this 29 Nov 10:13
· 161 commits to 4.4.x since this release
4.2.9
382f6e1

Release Notes for 4.2.9

4.2.x bugfix release (patch)

4.2.9

  • Total issues resolved: 0
  • Total pull requests resolved: 0
  • Total contributors: 0

Security

This release fixes GHSA-47cp-rxmj-fwr5. Without the GMP extension, PS256, PS384 and PS512 verification and RSA-OAEP, RSA-OAEP-256 and RSA1_5 decryption cost seconds to minutes of CPU per forged token, with the application's own keys.

When the OpenSSL extension is loaded, OpenSSL now computes the RSA operations, whatever the brick/math calculator:

  • the public operation, for PS* verification and RSA-OAEP and RSA1_5 encryption;
  • the private operation, for RSA-OAEP and RSA1_5 decryption and PS* signing.

With an RSA-2048 key in pure PHP:

  • a forged PS256 token went from 5 s to about 1 ms;
  • a forged RSA-OAEP token went from about 2 minutes to 2–4 ms;
  • a PS256 signature went from about 2 minutes to 2–3 ms.

Behaviour changes.

  • An encrypted key or a signature as large as the modulus still raises a RuntimeException, now with a message.
  • A key that OpenSSL refuses, such as one with an even modulus, raises a RuntimeException.
  • A private key with a wrong dp, dq or qi now decrypts and signs: OpenSSL detects the faulty CRT result and computes with d.