{
    "content": [
        {
            "type": "text",
            "text": "# EVP_KDF-X963 (man)\n\n## NAME\n\nEVPKDF-X963 - The X9.63-2001 EVPKDF implementation\n\n## DESCRIPTION\n\nThe EVPKDF-X963 algorithm implements the key derivation function (X963KDF).  X963KDF is used\nby Cryptographic Message Syntax (CMS) for EC KeyAgreement, to derive a key using input such\nas a shared secret key and shared info.\n\n## Sections\n\n- **NAME**\n- **DESCRIPTION** (2 subsections)\n- **NOTES**\n- **EXAMPLES**\n- **CONFORMING TO**\n- **SEE ALSO**\n- **HISTORY**\n- **COPYRIGHT**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "EVP_KDF-X963",
        "section": "",
        "mode": "man",
        "summary": "EVPKDF-X963 - The X9.63-2001 EVPKDF implementation",
        "synopsis": null,
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [
            "This example derives 10 bytes, with the secret key \"secret\" and sharedinfo value \"label\":",
            "EVPKDF *kdf;",
            "EVPKDFCTX *kctx;",
            "unsigned char out[10];",
            "OSSLPARAM params[4], *p = params;",
            "kdf = EVPKDFfetch(NULL, \"X963KDF\", NULL);",
            "kctx = EVPKDFCTXnew(kdf);",
            "EVPKDFfree(kdf);",
            "*p++ = OSSLPARAMconstructutf8string(OSSLKDFPARAMDIGEST,",
            "SNsha256, strlen(SNsha256));",
            "*p++ = OSSLPARAMconstructoctetstring(OSSLKDFPARAMSECRET,",
            "\"secret\", (sizet)6);",
            "*p++ = OSSLPARAMconstructoctetstring(OSSLKDFPARAMINFO,",
            "\"label\", (sizet)5);",
            "*p = OSSLPARAMconstructend();",
            "if (EVPKDFderive(kctx, out, sizeof(out), params) <= 0) {",
            "error(\"EVPKDFderive\");",
            "EVPKDFCTXfree(kctx);"
        ],
        "see_also": [
            {
                "name": "EVPKDF",
                "section": "3",
                "url": "https://www.chedong.com/phpMan.php/man/EVPKDF/3/json"
            },
            {
                "name": "EVPKDFCTXnew",
                "section": "3",
                "url": "https://www.chedong.com/phpMan.php/man/EVPKDFCTXnew/3/json"
            },
            {
                "name": "EVPKDFCTXfree",
                "section": "3",
                "url": "https://www.chedong.com/phpMan.php/man/EVPKDFCTXfree/3/json"
            },
            {
                "name": "EVPKDFCTXsetparams",
                "section": "3",
                "url": "https://www.chedong.com/phpMan.php/man/EVPKDFCTXsetparams/3/json"
            },
            {
                "name": "EVPKDFCTXgetkdfsize",
                "section": "3",
                "url": "https://www.chedong.com/phpMan.php/man/EVPKDFCTXgetkdfsize/3/json"
            },
            {
                "name": "EVPKDFderive",
                "section": "3",
                "url": "https://www.chedong.com/phpMan.php/man/EVPKDFderive/3/json"
            },
            {
                "name": "EVPKDF",
                "section": "3",
                "url": "https://www.chedong.com/phpMan.php/man/EVPKDF/3/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 4,
                "subsections": [
                    {
                        "name": "Identity",
                        "lines": 3
                    },
                    {
                        "name": "Supported parameters",
                        "lines": 12
                    }
                ]
            },
            {
                "name": "NOTES",
                "lines": 11,
                "subsections": []
            },
            {
                "name": "EXAMPLES",
                "lines": 24,
                "subsections": []
            },
            {
                "name": "CONFORMING TO",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "HISTORY",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "COPYRIGHT",
                "lines": 9,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "EVPKDF-X963 - The X9.63-2001 EVPKDF implementation\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "The EVPKDF-X963 algorithm implements the key derivation function (X963KDF).  X963KDF is used\nby Cryptographic Message Syntax (CMS) for EC KeyAgreement, to derive a key using input such\nas a shared secret key and shared info.\n",
                "subsections": [
                    {
                        "name": "Identity",
                        "content": "\"X963KDF\" is the name for this implementation; it can be used with the EVPKDFfetch()\nfunction.\n"
                    },
                    {
                        "name": "Supported parameters",
                        "content": "The supported parameters are:\n\n\"properties\" (OSSLKDFPARAMPROPERTIES) <UTF8 string>\n\"digest\" (OSSLKDFPARAMDIGEST) <UTF8 string>\nThese parameters work as described in \"PARAMETERS\" in EVPKDF(3).\n\n\"key\" (OSSLKDFPARAMKEY) <octet string>\nThe shared secret used for key derivation.  This parameter sets the secret.\n\n\"info\" (OSSLKDFPARAMINFO) <octet string>\nThis parameter specifies an optional value for shared info.\n"
                    }
                ]
            },
            "NOTES": {
                "content": "X963KDF is very similar to the SSKDF that uses a digest as the auxiliary function, X963KDF\nappends the counter to the secret, whereas SSKDF prepends the counter.\n\nA context for X963KDF can be obtained by calling:\n\nEVPKDF *kdf = EVPKDFfetch(NULL, \"X963KDF\", NULL);\nEVPKDFCTX *kctx = EVPKDFCTXnew(kdf);\n\nThe output length of an X963KDF is specified via the keylen parameter to the\nEVPKDFderive(3) function.\n",
                "subsections": []
            },
            "EXAMPLES": {
                "content": "This example derives 10 bytes, with the secret key \"secret\" and sharedinfo value \"label\":\n\nEVPKDF *kdf;\nEVPKDFCTX *kctx;\nunsigned char out[10];\nOSSLPARAM params[4], *p = params;\n\nkdf = EVPKDFfetch(NULL, \"X963KDF\", NULL);\nkctx = EVPKDFCTXnew(kdf);\nEVPKDFfree(kdf);\n\n*p++ = OSSLPARAMconstructutf8string(OSSLKDFPARAMDIGEST,\nSNsha256, strlen(SNsha256));\n*p++ = OSSLPARAMconstructoctetstring(OSSLKDFPARAMSECRET,\n\"secret\", (sizet)6);\n*p++ = OSSLPARAMconstructoctetstring(OSSLKDFPARAMINFO,\n\"label\", (sizet)5);\n*p = OSSLPARAMconstructend();\nif (EVPKDFderive(kctx, out, sizeof(out), params) <= 0) {\nerror(\"EVPKDFderive\");\n}\n\nEVPKDFCTXfree(kctx);\n",
                "subsections": []
            },
            "CONFORMING TO": {
                "content": "\"SEC 1: Elliptic Curve Cryptography\"\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "EVPKDF(3), EVPKDFCTXnew(3), EVPKDFCTXfree(3), EVPKDFCTXsetparams(3),\nEVPKDFCTXgetkdfsize(3), EVPKDFderive(3), \"PARAMETERS\" in EVPKDF(3)\n",
                "subsections": []
            },
            "HISTORY": {
                "content": "This functionality was added to OpenSSL 3.0.\n",
                "subsections": []
            },
            "COPYRIGHT": {
                "content": "Copyright 2019-2021 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                           EVPKDF-X963(7SSL)",
                "subsections": []
            }
        }
    }
}