Lines Matching full:entropy
203 …). Separately, transparent and opaque drivers can have [entropy collection entry points](#entropy-…
818 ### Entropy collection entry point
820 A driver can declare an entropy source by providing a `"get_entropy"` entry point. This entry point…
831 * `flags`: a bit-mask of [entropy collection flags](#entropy-collection-flags).
832 …entropy that is present in the `output` buffer, in bits. This must be at least `1` on success. The…
833 …entropy of at least `*estimate_bits` bits. When the entropy is coming from a hardware peripheral, …
834 …ta with a low density of entropy; for example a peripheral that returns eight bytes of data with a…
836 …entropy may be located anywhere in the buffer, so the driver may write less than `output_size` byt…
840 * `PSA_SUCCESS`: success. The output buffer contains some entropy.
841 …entropy is available without blocking. This is only permitted if the `PSA_DRIVER_GET_ENTROPY_BLOCK…
842 * Other error codes indicate a transient or permanent failure of the entropy source.
846 #### Entropy collection flags
848 …ock until it has at least one bit of entropy. If this flag is clear, the driver should avoid block…
849 …OPY_KEEPALIVE`: This flag is intended to help with energy management for entropy-generating periph…
851 #### Entropy collection and blocking
853 …entropy-collection-flags) is to support drivers for TRNG (True Random Number Generator, i.e. an en…
855 Here is a suggested call sequence for entropy collection that leverages these flags:
858 …d round of calls with the `BLOCK` flag set and the `KEEPALIVE` flag clear to gather needed entropy.
859 …d round does not collect enough entropy, the core makes more similar rounds, until the total amoun…
918 … distribution. Therefore, if the random generator includes an entropy source, this entropy source …
919 … fast. (If a device can provide entropy but is slow at generating random data, declare it as an [e…
920 …entropy provided by an outside source. If it isn't, the random generator can only be used if it's …
921 …ys returns the same data when given the same entropy inputs) or non-deterministic (including its o…
929 …entropy](#entropy-injection). This entry point is optional if the driver is for a peripheral that …
931 … entropy that the core must supply before the driver can output random data. This can be `0` if th…
932 …entropy that the core should supply via [`"add_entropy"`](#entropy-injection) when the driver runs…
948 #### Entropy injection
954 const uint8_t *entropy,
961 * `entropy`: a buffer containing full-entropy data to seed the random generator. “Full-entropy” mea…
962 …entropy` buffer in bytes. It is guaranteed to be at least `1`, but it may be smaller than the amou…
964 …entropy to the driver. The driver must mix this entropy into its internal state. The driver must m…
968 … first call to the `"get_random"` entry point, to supply `"initial_entropy_size"` bytes of entropy.
969 …an the required amount of random data, to supply at least `"reseed_entropy_size"` bytes of entropy.
971 …iver requires entropy, the core can supply it with one or more successive calls to the `"add_entro…
973 #### Combining entropy sources with a random generation driver
975 This section provides guidance on combining one or more [entropy sources](#entropy-collection-entry…
977 …f entropy that is in general less than the buffer size. The core must apply a mixing algorithm to …
979 …entropy in bytes (typically the random driver's `"initial_entropy_size"` property for the initial …
983 #### Random generator drivers without entropy injection
985 … inject additional entropy through the `"add_entropy"` entry point. This ensures that the random g…
989 * the integration of PSA Cryptography includes an entropy source that is outside the driver; or
1005 …at least once with a total of at least `"initial_entropy_size"` bytes of entropy before it calls `…
1008 …t_size`, but the driver is allowed to return less data if it runs out of entropy as described belo…
1012 …add_entropy"` method to supply at least `"reseed_entropy_size"` bytes of entropy before calling `"…
1013 * `PSA_ERROR_INSUFFICIENT_ENTROPY`: the core must supply additional entropy by calling the `"add_en…
1436 …ry point](#entropy-injection) be a full-entropy buffer (with data from all entropy sources already…
1438 …w data: drivers must implement entropy mixing. `"add_entropy"` needs an extra parameter to indicat…
1439 …Choice: drivers must implement entropy mixing. `"add_entropy"` needs an extra parameter to indicat…
1440 * Full entropy: drivers don't need to do entropy mixing.
1444 Are the [entropy collection flags](#entropy-collection-flags) well-chosen?