Platform Services

libedhoc delegates platform-provided services to the application through a small callback interface. Binding it is mandatory: the message API does not run until a valid platform is bound with edhoc_bind_platform().

Header file: include/edhoc/platform.h
group EDHOC platform interface
struct edhoc_platform
#include <platform.h>

EDHOC platform services.

Services the library needs from the hosting platform. The application supplies them and binds them with edhoc_bind_platform. Every entry is mandatory, and the binding itself is mandatory: the message-processing API refuses to run until a complete platform is bound.

Public Members

void (*zeroize)(void *buffer, size_t length)

Securely wipe a memory region (mandatory, non-elidable).

Erases sensitive data from a buffer once it is no longer needed. The implementation MUST NOT be eliminated by the compiler even when buffer is never read again (dead-store elimination); e.g. explicit_bzero or C11 memset_s.

Param buffer:

[out] Memory region to wipe.

Param length:

Length of buffer in bytes.