Embedded SDK
Embedded SDK
|
#include "lcx_common.h"
#include "errors.h"
#include "exceptions.h"
#include <stddef.h>
#include <stdint.h>
Go to the source code of this file.
Macros | |
#define | _CX_INLINE_U32 |
#define | cx_rotl(x, n) (((x) << (n)) | ((x) >> (32 - (n)))) |
#define | cx_rotr(x, n) (((x) >> (n)) | ((x) << (32 - (n)))) |
#define | cx_shr(x, n) ((x) >> (n)) |
#define | htole32(value) ((uint32_t) (value)) |
#define | _64BITS(h, l) |
#define | CLR64(x) |
#define | ADD64(x, y) cx_add_64(&(x), &(y)) |
#define | ASSIGN64(r, x) |
Functions | |
uint32_t | cx_swap_uint32 (uint32_t v) |
void | cx_swap_buffer32 (uint32_t *v, size_t len) |
void | cx_rotr64 (uint64bits_t *x, unsigned char n) |
void | cx_shr64 (uint64bits_t *x, unsigned char n) |
void | cx_add_64 (uint64bits_t *a, uint64bits_t *b) |
void | cx_swap_uint64 (uint64bits_t *v) |
void | cx_swap_buffer64 (uint64bits_t *v, int len) |
void | cx_memxor (uint8_t *buf1, const uint8_t *buf2, size_t len) |
uint8_t | cx_constant_time_eq (const uint8_t *buf1, uint8_t *buf2, size_t len) |
#define _64BITS | ( | h, | |
l | |||
) |
Definition at line 53 of file cx_utils.h.
#define _CX_INLINE_U32 |
Definition at line 34 of file cx_utils.h.
#define ADD64 | ( | x, | |
y | |||
) | cx_add_64(&(x), &(y)) |
Definition at line 62 of file cx_utils.h.
#define ASSIGN64 | ( | r, | |
x | |||
) |
Definition at line 63 of file cx_utils.h.
#define CLR64 | ( | x | ) |
Definition at line 59 of file cx_utils.h.
#define cx_rotl | ( | x, | |
n | |||
) | (((x) << (n)) | ((x) >> (32 - (n)))) |
Definition at line 35 of file cx_utils.h.
#define cx_rotr | ( | x, | |
n | |||
) | (((x) >> (n)) | ((x) << (32 - (n)))) |
Definition at line 36 of file cx_utils.h.
#define cx_shr | ( | x, | |
n | |||
) | ((x) >> (n)) |
Definition at line 37 of file cx_utils.h.
#define htole32 | ( | value | ) | ((uint32_t) (value)) |
Definition at line 39 of file cx_utils.h.
void cx_add_64 | ( | uint64bits_t * | a, |
uint64bits_t * | b | ||
) |
Definition at line 156 of file cx_utils.c.
Definition at line 181 of file cx_utils.c.
Definition at line 173 of file cx_utils.c.
void cx_rotr64 | ( | uint64bits_t * | x, |
unsigned char | n | ||
) |
void cx_shr64 | ( | uint64bits_t * | x, |
unsigned char | n | ||
) |
Definition at line 83 of file cx_utils.c.
void cx_swap_buffer32 | ( | uint32_t * | v, |
size_t | len | ||
) |
Definition at line 47 of file cx_utils.c.
void cx_swap_buffer64 | ( | uint64bits_t * | v, |
int | len | ||
) |
Definition at line 140 of file cx_utils.c.
uint32_t cx_swap_uint32 | ( | uint32_t | v | ) |
Definition at line 41 of file cx_utils.c.
void cx_swap_uint64 | ( | uint64bits_t * | v | ) |
Definition at line 118 of file cx_utils.c.