helper functions for sys_crypto_modes More...
helper functions for sys_crypto_modes
Definition in file helper.h.
|void||crypto_block_inc_ctr (uint8_t block, int L)|
|Increment a counter encoded in an 16 octet block. More...|
|int||crypto_equals (const uint8_t *a, const uint8_t *b, size_t len)|
|Compares two blocks of same size in deterministic time. More...|
|void||crypto_secure_wipe (void *buf, size_t len)|
|Secure wipe function. More...|
Increment a counter encoded in an 16 octet block.
The counter is encoded from the least significant bit in the following form: block[15-L..15])
|L||length of counter|
|int crypto_equals||(||const uint8_t *||a,|
|const uint8_t *||b,|
Compares two blocks of same size in deterministic time.
|len||size of both blocks|
|void crypto_secure_wipe||(||void *||buf,|
Secure wipe function.
This wipe function zeros the supplied buffer in a way that the compiler is not allowed to optimize. This can be used to erase secrets from memory.
Note that this function on its own could be insufficient against (data remanence) attacks. It is outside the scope of this function to thoroughly shred the memory area.
|[in]||buf||buffer to wipe|
|[in]||len||size of the buffer in bytes|