helper.h

helper functions for sys_crypto_modes

void crypto_block_inc_ctr(uint8_t block, int L)

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])

Parameters

block:encoded block
L:length of counter

int crypto_equals(const uint8_t * a, const uint8_t * b, msp430_types.h::size_t len)

Compares two blocks of same size in deterministic time.

Parameters

a:block a
b:block b
len:size of both blocks

Return values

  • 0 iff the blocks are non-equal.