Turnstone Operating System
Loading...
Searching...
No Matches
siphash.64.c File Reference

sip hash interface implementation More...

#include <siphash.h>
#include <utils.h>

Macros

#define SIPHASH128_0   0x736f6d6570736575ULL
 
#define SIPHASH128_1   0x646f72616e646f6dULL
 
#define SIPHASH128_2   0x6c7967656e657261ULL
 
#define SIPHASH128_3   0x7465646279746573ULL
 
#define SIPROUND
 

Functions

 MODULE ("turnstone.lib")
 
uint128_t siphash128_internal (const void *data, uint64_t len, boolean_t full, uint128_t seed)
 
uint128_t siphash128 (const void *data, uint64_t len, uint128_t seed)
 
uint64_t siphash64 (const void *data, uint64_t len, uint64_t seed)
 

Detailed Description

sip hash interface implementation

This work is licensed under TURNSTONE OS Public License. Please read and understand latest version of Licence.

Macro Definition Documentation

◆ SIPROUND

#define SIPROUND
Value:
{ \
v0 += v1; \
v1 = ROTLEFT64(v1, 13); \
v1 ^= v0; \
v0 = ROTLEFT64(v0, 32); \
v2 += v3; \
v3 = ROTLEFT64(v3, 16); \
v3 ^= v2; \
v0 += v3; \
v3 = ROTLEFT64(v3, 21); \
v3 ^= v0; \
v2 += v1; \
v1 = ROTLEFT64(v1, 17); \
v1 ^= v2; \
v2 = ROTLEFT64(v2, 32); \
}