From 390c5a2c6fa8aa1a332ba9d48cf8ac946b673366 Mon Sep 17 00:00:00 2001 From: Gilles Peskine Date: Fri, 13 Nov 2020 14:27:43 +0100 Subject: [PATCH] It is not meaningful for reseed_entropy_size to be 0 Signed-off-by: Gilles Peskine --- docs/proposed/psa-driver-interface.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/proposed/psa-driver-interface.md b/docs/proposed/psa-driver-interface.md index c80b406be..cc1f45529 100644 --- a/docs/proposed/psa-driver-interface.md +++ b/docs/proposed/psa-driver-interface.md @@ -483,11 +483,11 @@ If no driver implements the random generation entry point family, the core provi This operation family requires the following type, entry points and parameters (TODO: where exactly are the parameters in the JSON structure?): * Type `"random_context_t"`: the type of a random generation context. -* `"init_random"` (optional): if this function is present, [the core calls it once](#random-generator-initialization) after allocating a `"random_context_t"` object. -* `"add_entropy"` (entry point): the core calls this function to [inject entropy](#entropy-injection). -* `"get_random"` (entry point): the core calls this function whenever it needs to [obtain random data](#the-get_random-entry-point). -* `"initial_entropy_size"` (integer): the minimum number of bytes of entropy that the core must supply before the driver can output random data. This can be `0` if the driver includes an entropy source of its own. -* `"reseed_entropy_size"` (integer): the minimum number of bytes of entropy that the core must supply when the driver runs out of entropy. This can be `0` if the driver includes an entropy source of its own. +* `"init_random"` (entry point, optional): if this function is present, [the core calls it once](#random-generator-initialization) after allocating a `"random_context_t"` object. +* `"add_entropy"` (entry point, mandatory): the core calls this function to [inject entropy](#entropy-injection). +* `"get_random"` (entry point, mandatory): the core calls this function whenever it needs to [obtain random data](#the-get_random-entry-point). +* `"initial_entropy_size"` (integer, optional): the minimum number of bytes of entropy that the core must supply before the driver can output random data. This can be `0` if the driver includes an entropy source of its own. If omitted, the value is `0`. +* `"reseed_entropy_size"` (integer, optional): the minimum number of bytes of entropy that the core must supply when the driver runs out of entropy. This value is also a hint for the size to supply if the core makes additional calls to `"add_entropy"`, for example to enforce prediction resistance. If omitted, the core chooses a value which is at least the expected security strength of the device. Random generation is not parametrized by an algorithm. The choice of algorithm is up to the driver.