{
    "mode": "man",
    "parameter": "X448",
    "section": "7ssl",
    "url": "https://www.chedong.com/phpMan.php/man/X448/7ssl/json",
    "generated": "2026-06-16T10:00:34Z",
    "sections": {
        "NAME": {
            "content": "X25519, X448 - EVPPKEY X25519 and X448 support\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "The X25519 and X448 EVPPKEY implementation supports key generation and key derivation using\nX25519 and X448. It has associated private and public key formats compatible with RFC 8410.\n\nNo additional parameters can be set during key generation.\n\nThe peer public key must be set using EVPPKEYderivesetpeer() when performing key\nderivation.\n",
            "subsections": []
        },
        "NOTES": {
            "content": "A context for the X25519 algorithm can be obtained by calling:\n\nEVPPKEYCTX *pctx = EVPPKEYCTXnewid(EVPPKEYX25519, NULL);\n\nFor the X448 algorithm a context can be obtained by calling:\n\nEVPPKEYCTX *pctx = EVPPKEYCTXnewid(EVPPKEYX448, NULL);\n\nX25519 or X448 private keys can be set directly using EVPPKEYnewrawprivatekey(3) or\nloaded from a PKCS#8 private key file using PEMreadbioPrivateKey(3) (or similar function).\nCompletely new keys can also be generated (see the example below). Setting a private key also\nsets the associated public key.\n\nX25519 or X448 public keys can be set directly using EVPPKEYnewrawpublickey(3) or loaded\nfrom a SubjectPublicKeyInfo structure in a PEM file using PEMreadbioPUBKEY(3) (or similar\nfunction).\n",
            "subsections": []
        },
        "EXAMPLES": {
            "content": "This example generates an X25519 private key and writes it to standard output in PEM format:\n\n#include <openssl/evp.h>\n#include <openssl/pem.h>\n...\nEVPPKEY *pkey = NULL;\nEVPPKEYCTX *pctx = EVPPKEYCTXnewid(EVPPKEYX25519, NULL);\nEVPPKEYkeygeninit(pctx);\nEVPPKEYkeygen(pctx, &pkey);\nEVPPKEYCTXfree(pctx);\nPEMwritePrivateKey(stdout, pkey, NULL, NULL, 0, NULL, NULL);\n\nThe key derivation example in EVPPKEYderive(3) can be used with X25519 and X448.\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "EVPPKEYCTXnew(3), EVPPKEYkeygen(3), EVPPKEYderive(3), EVPPKEYderivesetpeer(3)\n",
            "subsections": []
        },
        "COPYRIGHT": {
            "content": "Copyright 2017-2020 The OpenSSL Project Authors. All Rights Reserved.\n\nLicensed under the Apache License 2.0 (the \"License\").  You may not use this file except in\ncompliance with the License.  You can obtain a copy in the file LICENSE in the source\ndistribution or at <https://www.openssl.org/source/license.html>.\n\n\n\n3.0.2                                        2026-06-02                                 X25519(7SSL)",
            "subsections": []
        }
    },
    "summary": "X25519, X448 - EVPPKEY X25519 and X448 support",
    "flags": [],
    "examples": [
        "This example generates an X25519 private key and writes it to standard output in PEM format:",
        "#include <openssl/evp.h>",
        "#include <openssl/pem.h>",
        "...",
        "EVPPKEY *pkey = NULL;",
        "EVPPKEYCTX *pctx = EVPPKEYCTXnewid(EVPPKEYX25519, NULL);",
        "EVPPKEYkeygeninit(pctx);",
        "EVPPKEYkeygen(pctx, &pkey);",
        "EVPPKEYCTXfree(pctx);",
        "PEMwritePrivateKey(stdout, pkey, NULL, NULL, 0, NULL, NULL);",
        "The key derivation example in EVPPKEYderive(3) can be used with X25519 and X448."
    ],
    "see_also": [
        {
            "name": "EVPPKEYCTXnew",
            "section": "3",
            "url": "https://www.chedong.com/phpMan.php/man/EVPPKEYCTXnew/3/json"
        },
        {
            "name": "EVPPKEYkeygen",
            "section": "3",
            "url": "https://www.chedong.com/phpMan.php/man/EVPPKEYkeygen/3/json"
        },
        {
            "name": "EVPPKEYderive",
            "section": "3",
            "url": "https://www.chedong.com/phpMan.php/man/EVPPKEYderive/3/json"
        },
        {
            "name": "EVPPKEYderivesetpeer",
            "section": "3",
            "url": "https://www.chedong.com/phpMan.php/man/EVPPKEYderivesetpeer/3/json"
        }
    ]
}