The friendly Operating System for the Internet of Things
helper.h File Reference

helper functions for sys_crypto_modes More...

Detailed Description

Author
Freie Universitaet Berlin, Computer Systems & Telematics
Nico von Geyso nico..nosp@m.geys.nosp@m.o@fu-.nosp@m.berl.nosp@m.in.de

Definition in file helper.h.

#include <stddef.h>
#include <stdint.h>
+ Include dependency graph for helper.h:

Go to the source code of this file.

Functions

void crypto_block_inc_ctr (uint8_t block[16], int L)
 Increment a counter encoded in an 16 octet block. More...
 
int crypto_equals (uint8_t *a, uint8_t *b, size_t len)
 Compares two blocks of same size in deterministic time. More...
 

Function Documentation

void crypto_block_inc_ctr ( uint8_t  block[16],
int  L 
)

The counter is encoded from the least significant bit in the following form: block[15-L..15])

Parameters
blockencoded block
Llength of counter
int crypto_equals ( uint8_t *  a,
uint8_t *  b,
size_t  len 
)
Parameters
ablock a
bblock b
lensize of both blocks
Returns
0 iff the blocks are non-equal.