Skip to content

Stdlib: sodium_crypto_sign* missing — Ed25519 sign/open/detached API (ext/sodium/libsodium.c) #15541

Description

@PurHur

Category

stdlib · php-src-strict · missing ext/sodium Ed25519 signing builtins

Problem

The Ed25519 signing family (sodium_crypto_sign_keypair, sodium_crypto_sign, sodium_crypto_sign_open, sodium_crypto_sign_detached, sodium_crypto_sign_verify_detached, sodium_crypto_sign_publickey_from_secretkey, sodium_crypto_sign_secretkey, sodium_crypto_sign_publickey) is registered on reference Zend with ext/sodium but missing on the VM (function_exists false for all).

Verified 2026-07-03 on master.

php-src reference

PHP implementation target

  • ext/sodium/sodium_crypto_sign*.php — libsodium FFI via existing VmSodium / JitSodium patterns
  • Register in ext/sodium/Module.php; constants SODIUM_CRYPTO_SIGN_* if not already present
  • PHP-in-PHP first; thin FFI only

Repro (verified 2026-07-03)

./script/docker-exec.sh -- php bin/vm.php test/repro/maintainer_gap_sodium_crypto_sign.php
# fail: sodium_crypto_sign_keypair not registered (exit 1)

Repro: test/repro/maintainer_gap_sodium_crypto_sign.php

Related: #3438 (umbrella ext/sodium), recent sodium box/scalarmult issues.

Done when

  • All eight sign-family functions registered when ext/sodium loaded
  • Detached verify rejects tampered message/signature like Zend
  • sodium_crypto_sign_open() returns false on bad signature
  • Repro exits 0; targeted compliance guard

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:vmVirtual machineenhancementNew feature or requestimplementation-readySpec complete: repro, php-src ref, done-when — safe for workers to claimphase-4:stdlibPhase 4 – stdlib for web appsstdlib

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions