Skip to content

Commit 3866395

Browse files
committed
[crypto/doc] Docoument otcrypto_eval_exit
Signed-off-by: Pascal Nasahl <nasahlpa@lowrisc.org>
1 parent 436af97 commit 3866395

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

doc/security/cryptolib/cryptolib_api.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,14 @@ Please note that this function only can be called from the machine (M) mode priv
4545

4646
{{#header-snippet sw/device/lib/crypto/include/config.h otcrypto_init }}
4747

48+
## Cryptolib Exit
49+
50+
Before returning to the caller, the cryptolib invokes `otcrypto_eval_exit` with the status returned by the cryptolib operation.
51+
This function checks whether any security alert was fired during the operation and returns an error if so.
52+
Moreover, the function also checks the entropy complex health test and alert configurations.
53+
54+
{{#header-snippet sw/device/lib/crypto/include/config.h otcrypto_eval_exit }}
55+
4856
## Cryptolib Usage Examples
4957

5058
Examples of how to use the cryptolib API are provided in the [cryptolib test directory][crypto-tests].

sw/device/lib/crypto/include/config.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ otcrypto_status_t otcrypto_init(otcrypto_key_security_level_t security_level);
107107
*
108108
* This function checks whether any alert or sensor was fired.
109109
*
110-
* @param security_level Security level of the used key.
110+
* @param status The status returned by the cryptolib operation.
111111
* @returns OK when the security check passed.
112112
*/
113113
OT_WARN_UNUSED_RESULT

0 commit comments

Comments
 (0)