{
    "mode": "man",
    "parameter": "life_cycle-rand",
    "section": "7ssl",
    "url": "https://www.chedong.com/phpMan.php/man/life_cycle-rand/7ssl/json",
    "generated": "2026-10-08T16:25:48Z",
    "sections": {
        "NAME": {
            "content": "lifecycle-rand - The RAND algorithm life-cycle\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "All random number generator (RANDs) go through a number of stages in their life-cycle:\n\nstart\nThis  state  represents  the RAND before it has been allocated.  It is the starting state\nfor any life-cycle transitions.\n\nnewed\nThis state represents the RAND after it has been allocated but  unable  to  generate  any\noutput.\n\ninstantiated\nThis state represents the RAND when it is set up and capable of generating output.\n\nuninstantiated\nThis  state  represents the RAND when it has been shutdown and it is no longer capable of\ngenerating output.\n\nfreed\nThis state is entered when the RAND is freed.  It is the terminal  state  for  all  life-\ncycle transitions.\n",
            "subsections": [
                {
                    "name": "State Transition Diagram",
                    "content": "The usual life-cycle of a RAND is illustrated:\n+-------------------------+\n|          start          |\n+-------------------------+\n|\n| EVPRANDCTXnew\nv\n+-------------------------+\n|          newed          |\n+-------------------------+\n|\n| EVPRANDinstantiate\nv\nEVPRANDgenerate   +-------------------------+\n+-------------------- |                         |\n|                     |      instantiated       |\n+-------------------> |                         | <+\n+-------------------------+  '\n|                          '\n| EVPRANDuninstantiate   ' EVPRANDinstantiate\nv                          '\n+-------------------------+  '\n|     uninstantiated      | -+\n+-------------------------+\n|\n| EVPRANDCTXfree\nv\n+-------------------------+\n|          freed          |\n+-------------------------+\n"
                },
                {
                    "name": "Formal State Transitions",
                    "content": "This section defines all of the legal state transitions.  This is the canonical list.\nFunction Call              ------------------ Current State ------------------\nstart   newed   instantiated  uninstantiated  freed\nEVPRANDCTXnew           newed\nEVPRANDinstantiate            instantiated\nEVPRANDgenerate                          instantiated\nEVPRANDuninstantiate                    uninstantiated\nEVPRANDCTXfree          freed   freed      freed          freed\nEVPRANDCTXgetparams            newed   instantiated  uninstantiated  freed\nEVPRANDCTXsetparams            newed   instantiated  uninstantiated  freed\nEVPRANDCTXgettableparams       newed   instantiated  uninstantiated  freed\nEVPRANDCTXsettableparams       newed   instantiated  uninstantiated  freed\n"
                }
            ]
        },
        "NOTES": {
            "content": "At some point the EVP layer will begin enforcing the transitions described herein.\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "provider-rand(7), EVPRAND(3).\n",
            "subsections": []
        },
        "HISTORY": {
            "content": "The provider RAND interface was introduced in OpenSSL 3.0.\n",
            "subsections": []
        },
        "COPYRIGHT": {
            "content": "Copyright 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\n3.0.13                                       2026-07-29                        LIFECYCLE-RAND(7SSL)",
            "subsections": []
        }
    },
    "summary": "lifecycle-rand - The RAND algorithm life-cycle",
    "flags": [],
    "examples": [],
    "see_also": [
        {
            "name": "provider-rand",
            "section": "7",
            "url": "https://www.chedong.com/phpMan.php/man/provider-rand/7/json"
        },
        {
            "name": "EVPRAND",
            "section": "3",
            "url": "https://www.chedong.com/phpMan.php/man/EVPRAND/3/json"
        }
    ]
}