crypto.x25519.keypair
Generate an X25519 key pair.
📝Syntax
[publicKey, secretKey] = crypto.x25519.keypair()
📥Input Arguments
Parameter Description
(none) this function takes no input argument.
📤Output Arguments
Parameter Description
publicKey a character vector: 64 lowercase hexadecimal characters (32 bytes).
secretKey a character vector: 64 lowercase hexadecimal characters (32 secure random bytes); keep it secret.
📄Description

crypto.x25519.keypair generates a random Curve25519 key pair (RFC 7748) using crypto.random. Share the public key and keep the secret key private.

💡Examples
generate a key pair
[pub, sec] = crypto.x25519.keypair()
🔗See Also
crypto.x25519.publiccrypto.x25519.sharedcrypto.random
Used Functions
Monocypher
📚Bibliography
https://www.rfc-editor.org/rfc/rfc7748, https://monocypher.org/
🕔Version History
Version Description
2.0.0 initial version
Edit this page on GitHub