Skip to content

ext/sodium: document the 8.4 aarch64 support for AES-256-GCM - #5780

Merged
lacatoire merged 1 commit into
php:masterfrom
lacatoire:sync-src/sodium-aes256gcm-aarch64-84
Aug 25, 2026
Merged

ext/sodium: document the 8.4 aarch64 support for AES-256-GCM#5780
lacatoire merged 1 commit into
php:masterfrom
lacatoire:sync-src/sodium-aes256gcm-aarch64-84

Conversation

@lacatoire

@lacatoire lacatoire commented Aug 19, 2026

Copy link
Copy Markdown
Member

Before PHP 8.4 the HAVE_AESGCM guard in ext/sodium/libsodium.c covered x86 and x86_64 only. PHP 8.4 extends it to __aarch64__ and _M_ARM64, which changes two distinct things on aarch64:

  • sodium_crypto_aead_aes256gcm_is_available() may now return true; before 8.4 it was compiled as a plain RETURN_FALSE.
  • sodium_crypto_aead_aes256gcm_encrypt(), ..._decrypt(), ..._keygen() and the four SODIUM_CRYPTO_AEAD_AES256GCM_* constants are now defined at all; before 8.4 calling one raised Error: Call to undefined function.

sodium_crypto_aead_aes256gcm_is_available() sits outside the guard and has always existed, so it is the one member of the family whose availability did not change. This adds a changelog entry to all four function pages and fills in the four constant descriptions, which were empty. The table shared by the encrypt, decrypt and keygen pages is declared once as sodium.changelog.aes256gcm-aarch64 in language-snippets.ent; translations that lack the entity fall back to the English one.

Verified on emulated aarch64: 8.3 returns false with the other functions undefined, 8.4 returns true with them defined. With libsodium 1.0.18, 8.4 defines them but still returns false, hence may in the wording.

Sources

  • Guard extended to aarch64: php/php-src#12867, commit 1816403d84. The pull request title mentions AEGIS only; the aarch64 change rides along in the same commit ("Also don't prevent usage of AES-GCM on aarch64").
  • UPGRADING and NEWS for PHP 8.4.
  • Not backported: git tag --contains 1816403d84 yields php-8.4.0RC1 and php-8.4.0 only.

Tracker: PHP 8.4 Documentation Tracker.

@lacatoire lacatoire added the 8.4 label Aug 20, 2026
@lacatoire lacatoire added this to the PHP 8.4 milestone Aug 20, 2026
@lacatoire
lacatoire force-pushed the sync-src/sodium-aes256gcm-aarch64-84 branch 3 times, most recently from bba7160 to eb25bf1 Compare August 25, 2026 19:37
Before PHP 8.4 the HAVE_AESGCM guard in ext/sodium/libsodium.c covered
x86 and x86_64 only. PHP 8.4 extends it to __aarch64__ and _M_ARM64
(php-src #12867, commit 1816403d84). On aarch64 this means
sodium_crypto_aead_aes256gcm_is_available() may now return true, and the
encrypt, decrypt and keygen functions and the
SODIUM_CRYPTO_AEAD_AES256GCM_* constants are now defined at all.

The changelog table shared by the encrypt, decrypt and keygen pages is
declared once as sodium.changelog.aes256gcm-aarch64 in
language-snippets.ent. The previously empty descriptions of the four
constants are filled in as well.
@lacatoire
lacatoire force-pushed the sync-src/sodium-aes256gcm-aarch64-84 branch from eb25bf1 to 74eae01 Compare August 25, 2026 19:38
@lacatoire
lacatoire requested a lite review from Copilot August 25, 2026 19:39
@lacatoire lacatoire changed the title sodium_crypto_aead_aes256gcm_is_available: document the 8.4 aarch64 support ext/sodium: document the 8.4 aarch64 support for AES-256-GCM Aug 25, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@lacatoire
lacatoire merged commit 4c85baa into php:master Aug 25, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants