PHP 8.6 | NewFunctions/Constants: detect new sodium functions and related constants - #2099
Merged
Merged
Conversation
…ated constants [1] > - Sodium: > . sodium_crypto_ipcrypt_keygen() > . sodium_crypto_ipcrypt_encrypt() > . sodium_crypto_ipcrypt_decrypt() > . sodium_crypto_ipcrypt_nd_keygen() > . sodium_crypto_ipcrypt_nd_encrypt() > . sodium_crypto_ipcrypt_nd_decrypt() > . sodium_crypto_ipcrypt_ndx_keygen() > . sodium_crypto_ipcrypt_ndx_encrypt() > . sodium_crypto_ipcrypt_ndx_decrypt() > . sodium_crypto_ipcrypt_pfx_keygen() > . sodium_crypto_ipcrypt_pfx_encrypt() > . sodium_crypto_ipcrypt_pfx_decrypt() > . sodium_bin2ip() > . sodium_ip2bin() > . sodium_crypto_xof_shake128() > . sodium_crypto_xof_shake128_init() > . sodium_crypto_xof_shake128_update() > . sodium_crypto_xof_shake128_squeeze() > . sodium_crypto_xof_shake256() > . sodium_crypto_xof_shake256_init() > . sodium_crypto_xof_shake256_update() > . sodium_crypto_xof_shake256_squeeze() > . sodium_crypto_xof_turboshake128() > . sodium_crypto_xof_turboshake128_init() > . sodium_crypto_xof_turboshake128_update() > . sodium_crypto_xof_turboshake128_squeeze() > . sodium_crypto_xof_turboshake256() > . sodium_crypto_xof_turboshake256_init() > . sodium_crypto_xof_turboshake256_update() > . sodium_crypto_xof_turboshake256_squeeze() > - Sodium: > . SODIUM_CRYPTO_IPCRYPT_BYTES. > . SODIUM_CRYPTO_IPCRYPT_KEYBYTES. > . SODIUM_CRYPTO_IPCRYPT_ND_KEYBYTES. > . SODIUM_CRYPTO_IPCRYPT_ND_TWEAKBYTES. > . SODIUM_CRYPTO_IPCRYPT_ND_INPUTBYTES. > . SODIUM_CRYPTO_IPCRYPT_ND_OUTPUTBYTES. > . SODIUM_CRYPTO_IPCRYPT_NDX_KEYBYTES. > . SODIUM_CRYPTO_IPCRYPT_NDX_TWEAKBYTES. > . SODIUM_CRYPTO_IPCRYPT_NDX_INPUTBYTES. > . SODIUM_CRYPTO_IPCRYPT_NDX_OUTPUTBYTES. > . SODIUM_CRYPTO_IPCRYPT_PFX_KEYBYTES. > . SODIUM_CRYPTO_IPCRYPT_PFX_BYTES. > . SODIUM_CRYPTO_XOF_SHAKE128_BLOCKBYTES. > . SODIUM_CRYPTO_XOF_SHAKE128_STATEBYTES. > . SODIUM_CRYPTO_XOF_SHAKE256_BLOCKBYTES. > . SODIUM_CRYPTO_XOF_SHAKE256_STATEBYTES. > . SODIUM_CRYPTO_XOF_TURBOSHAKE128_BLOCKBYTES. > . SODIUM_CRYPTO_XOF_TURBOSHAKE128_STATEBYTES. > . SODIUM_CRYPTO_XOF_TURBOSHAKE256_BLOCKBYTES. > . SODIUM_CRYPTO_XOF_TURBOSHAKE256_STATEBYTES. This commit accounts for detecting use of the new functions and the new constants. Includes test. Refs: * https://github.com/php/php-src/blob/e783539fe5824067bbcc8b9e09f04735b819aa96/UPGRADING#L778-L807 * https://github.com/php/php-src/blob/ac53f14223b4cda3199675878113f82de4d1717a/UPGRADING#L924-L944 * php/php-src 20960 * php/php-src@8a907a9 Related to 2052
…ated constants [2] > - Sodium: > . sodium_crypto_kem_keypair(), sodium_crypto_kem_seed_keypair(), > sodium_crypto_kem_secretkey(), sodium_crypto_kem_publickey(), > sodium_crypto_kem_enc() and sodium_crypto_kem_dec() expose the X-Wing > KEM (hybrid ML-KEM768+X25519, libsodium's recommended KEM). > Available when PHP is built against libsodium >= 1.0.22. > . sodium_crypto_kem_mlkem768_keypair(), > sodium_crypto_kem_mlkem768_seed_keypair(), > sodium_crypto_kem_mlkem768_secretkey(), > sodium_crypto_kem_mlkem768_publickey(), > sodium_crypto_kem_mlkem768_enc() and sodium_crypto_kem_mlkem768_dec() > expose the ML-KEM768 (FIPS 203) KEM. > Available when PHP is built against libsodium >= 1.0.22. > - Sodium: > . SODIUM_CRYPTO_KEM_PUBLICKEYBYTES (libsodium >= 1.0.22). > . SODIUM_CRYPTO_KEM_SECRETKEYBYTES (libsodium >= 1.0.22). > . SODIUM_CRYPTO_KEM_CIPHERTEXTBYTES (libsodium >= 1.0.22). > . SODIUM_CRYPTO_KEM_SHAREDSECRETBYTES (libsodium >= 1.0.22). > . SODIUM_CRYPTO_KEM_SEEDBYTES (libsodium >= 1.0.22). > . SODIUM_CRYPTO_KEM_KEYPAIRBYTES (libsodium >= 1.0.22). > . SODIUM_CRYPTO_KEM_MLKEM768_PUBLICKEYBYTES (libsodium >= 1.0.22). > . SODIUM_CRYPTO_KEM_MLKEM768_SECRETKEYBYTES (libsodium >= 1.0.22). > . SODIUM_CRYPTO_KEM_MLKEM768_CIPHERTEXTBYTES (libsodium >= 1.0.22). > . SODIUM_CRYPTO_KEM_MLKEM768_SHAREDSECRETBYTES (libsodium >= 1.0.22). > . SODIUM_CRYPTO_KEM_MLKEM768_SEEDBYTES (libsodium >= 1.0.22). > . SODIUM_CRYPTO_KEM_MLKEM768_KEYPAIRBYTES (libsodium >= 1.0.22). This commit accounts for detecting use of the new functions and the new constants. Includes test. Refs: * https://github.com/php/php-src/blob/ac53f14223b4cda3199675878113f82de4d1717a/UPGRADING#L777-L789 * https://github.com/php/php-src/blob/ac53f14223b4cda3199675878113f82de4d1717a/UPGRADING#L945-L956 * php/php-src 23420 * php/php-src@d1116a1 Related to 2052
wimg
approved these changes
Sep 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PHP 8.6 | NewFunctions/Constants: detect new sodium functions and related constants [1]
This commit accounts for detecting use of the new functions and the new constants.
Includes test.
Refs:
Related to #2052
PHP 8.6 | NewFunctions/Constants: detect new sodium functions and related constants [2]
This commit accounts for detecting use of the new functions and the new constants.
Includes test.
Refs:
Related to #2052