LIFE_CYCLE-RAND(7ossl)
π NAME π
LIFE_CYCLE-RAND(7ossl) β okay bestie, this is the OpenSSL manual page for life_cycle-rand, and it's literally The RAND algorithm life-cycle. No cap, that's the whole vibe. π
β¨ DESCRIPTION β¨
All random number generator (RANDs) go through a number of stages in their life-cycle β and the way that works is giving main character energy, so let's break it down:
startβ this state represents the RAND before it has been allocated. It is the starting state for any life-cycle transitions. Periodt. π±newedβ this state represents the RAND after it has been allocated but unable to generate any output. It's new here, okay? π£instantiatedβ this state represents the RAND when it is set up and capable of generating output. Slay, it's functional. β¨uninstantiatedβ this state represents the RAND when it has been shutdown and it is no longer capable of generating output. Not it being retired, but okay. π€freedβ this state is entered when the RAND is freed. It is the terminal state for all life-cycle transitions. The final boss, fr fr. π
π¦ State Transition Diagram π¦
The usual life-cycle of a RAND is illustrated like this β stare at it, it's iconic:
+-------------------------+
| start |
+-------------------------+
|
| EVP_RAND_CTX_new
v
+-------------------------+
| newed |
+-------------------------+
|
| EVP_RAND_instantiate
v
EVP_RAND_generate +-------------------------+
+-------------------- | |
| | instantiated |
+-------------------> | | <+
+-------------------------+ '
| '
| EVP_RAND_uninstantiate '
EVP_RAND_instantiate
v '
+-------------------------+ '
| uninstantiated | -+
+-------------------------+
|
| EVP_RAND_CTX_free
v
+-------------------------+
| freed |
+-------------------------+
π Formal State Transitions π
This section defines all of the legal state transitions. This is the canonical list β no cap, every row matters. The current-state columns are start, newed, instantiated, uninstantiated, and freed:
Function Call ------------------ Current State
------------------
start newed instantiated uninstantiated
freed
EVP_RAND_CTX_new newed
EVP_RAND_instantiate instantiated
EVP_RAND_generate instantiated
EVP_RAND_uninstantiate uninstantiated
EVP_RAND_CTX_free freed freed freed freed
EVP_RAND_CTX_get_params newed instantiated uninstantiated
freed
EVP_RAND_CTX_set_params newed instantiated uninstantiated
freed
EVP_RAND_CTX_gettable_params newed instantiated uninstantiated
freed
EVP_RAND_CTX_settable_params newed instantiated uninstantiated
freed
π NOTES π
At some point the EVP layer will begin enforcing the transitions described herein. So bestie, don't try any illegal transitions; the vibe check is coming. π
π₯ SEE ALSO π₯
π HISTORY π
The provider RAND interface was introduced in OpenSSL 3.0. That's the origin story. π«Ά
π COPYRIGHT π
Copyright 2021 The OpenSSL Project Authors. All Rights Reserved. Licensed under the Apache License 2.0 (the "License"). You may not use this file except in compliance with the License. You can obtain a copy in the fileLICENSEin the source distribution or at<https://www.openssl.org/source/license.html>.
Okay bestie, that's the whole page! π This OpenSSL 3.5.9 glow-up is dated 2026-09-29, and the manual page is LIFE_CYCLE-RAND(7ossl). Mwah! π
π¦ where this page comes from
- alpine 3.23: openssl-doc 3.5.9-r0 Β· Apache-2.0
- alpine 3.24: openssl-doc 3.5.9-r0 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms