Skip to content

ext/sodium: ChaCha20 stream, XChaCha20 stream, and AEAD APIs (#15464, #15461, #15429) - #15536

Merged
PurHur merged 1 commit into
masterfrom
agent/sodium-stream-batch-15464-15461-15429
Jul 3, 2026
Merged

PurHur merged 1 commit into
masterfrom
agent/sodium-stream-batch-15464-15461-15429

Conversation

@PurHur

@PurHur PurHur commented Jul 3, 2026

Copy link
Copy Markdown
Owner

Summary

php-src reference

  • ext/sodium/libsodium.c — PHP_FUNCTION(sodium_crypto_stream*), sodium_crypto_stream_xchacha20*, sodium_crypto_aead_xchacha20poly1305_ietf_*

Verification

php bin/vm.php test/repro-maintainer/maintainer_gap_sodium_crypto_stream.php
# stream_ok

php bin/vm.php test/repro-maintainer/maintainer_gap_sodium_crypto_stream_xchacha20.php
# xchacha20_stream_ok

php bin/vm.php test/repro/maintainer_gap_sodium_xchacha20_aead.php
# aead_ok

./script/docker-exec.sh -- bash -lc 'source script/php-env.sh && vendor/bin/phpunit --filter sodium_crypto_stream'
# OK (4 tests)

./script/docker-exec.sh -- bash -lc 'source script/php-env.sh && vendor/bin/phpunit --filter sodium_xchacha20_aead'
# OK (2 tests)

Closes #15464
Closes #15461
Closes #15429

Made with Cursor

…15461, #15429)

Register sodium_crypto_stream*, sodium_crypto_stream_xchacha20*, and
sodium_crypto_aead_xchacha20poly1305_ietf_* on the VM via PHP wrappers
delegating to host ext/sodium or libsodium FFI, with JIT lowering for XOR helpers.

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment