CHERIoT RTOS
A compartmentalised RTOS for CHERIoT hardware
Loading...
Searching...
No Matches
randombytes.h File Reference

API for accessing a shared entropy source in the randombytes compartment. More...

#include <cdefs.h>
#include <stddef.h>
#include <stdint.h>

Go to the source code of this file.

Functions

 __cheriot_compartment ("randombytes") int randombytes(uint8_t *output
 Populate output with n bytes of entropy from the system's entropy source.

Variables

size_t n

Detailed Description

API for accessing a shared entropy source in the randombytes compartment.

Definition in file randombytes.h.

Function Documentation

◆ __cheriot_compartment()

__cheriot_compartment ( "randombytes" )

Populate output with n bytes of entropy from the system's entropy source.

This will be cryptographically secure entropy if and only if the system entropy source is cryptographically secure.

Returns 0 on success.

Variable Documentation

◆ n

size_t n

Definition at line 23 of file randombytes.h.