Overview
KB
Technical FAQ
PHP Manual
CSS2 Manual
HTML Manual
JS Guide
JS Reference
PhpDock Manual
Nu-Coder Manual
PhpExpress Manual
PHP Joomla
Development
Learn PHP
 
<sodium_crypto_sign_ed25519_pk_to_curve25519sodium_crypto_sign_keypair>
^Sodium FunctionsLast updated: Mon, 26 Oct 2026

sodium_crypto_sign_ed25519_sk_to_curve25519

(PHP 7 >= 7.2.0, PHP 8)

sodium_crypto_sign_ed25519_sk_to_curve25519 — Convert an Ed25519 secret key to a Curve25519 secret key

Description

function sodium_crypto_sign_ed25519_sk_to_curve25519(#[\SensitiveParameter] string $secret_key): string

Given an Ed25519 secret key, calculate the birationally equivalent X25519 secret key.

Parameters

secret_key

Secret key suitable for the crypto_sign functions.

Return Values

Secret key suitable for the crypto_box functions.


<sodium_crypto_sign_ed25519_pk_to_curve25519sodium_crypto_sign_keypair>
^Sodium FunctionsLast updated: Mon, 26 Oct 2026