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_box_secretkeysodium_crypto_core_ristretto255_add>
^Sodium FunctionsLast updated: Mon, 26 Oct 2026

sodium_crypto_box_seed_keypair

(PHP 7 >= 7.2.0, PHP 8)

sodium_crypto_box_seed_keypair — Deterministically derive the key pair from a single key

Description

function sodium_crypto_box_seed_keypair(#[\SensitiveParameter] string $seed): string

Clamps the seed to form a secret key, derives the public key, and returns the two as a keypair.

The *_seed_keypair functions are ideal for generating a keypair from a password and salt. Use the result as a seed to generate the desired keys.

Parameters

seed

Some cryptographic input. Must be 32 bytes.

Return Values

X25519 Keypair (secret key and public key).


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