Monero
Loading...
Searching...
No Matches
groestl.c File Reference
#include <stddef.h>
#include "groestl.h"
#include "groestl_tables.h"
Include dependency graph for groestl.c:

Macros

#define P_TYPE   0
#define Q_TYPE   1
#define ROTATE_COLUMN_DOWN(v1, v2, amount_bytes, temp_var)
#define COLUMN(x, y, i, c0, c1, c2, c3, c4, c5, c6, c7, tv1, tv2, tu, tl, t)
#define BILB   ctx->bits_in_last_byte

Functions

static void RND512P (uint8_t *x, uint32_t *y, uint32_t r)
static void RND512Q (uint8_t *x, uint32_t *y, uint32_t r)
static void F512 (uint32_t *h, const uint32_t *m)
static void Transform (hashState *ctx, const uint8_t *input, int msglen)
static void OutputTransformation (hashState *ctx)
static void Init (hashState *ctx)
static void Update (hashState *ctx, const BitSequence *input, DataLength databitlen)
static void Final (hashState *ctx, BitSequence *output)
void groestl (const BitSequence *data, DataLength databitlen, BitSequence *hashval)

Variables

const uint8_t shift_Values [2][8] = {{0,1,2,3,4,5,6,7},{1,3,5,7,0,2,4,6}}
const uint8_t indices_cyclic [15] = {0,1,2,3,4,5,6,7,0,1,2,3,4,5,6}

Macro Definition Documentation

◆ BILB

#define BILB   ctx->bits_in_last_byte

◆ COLUMN

#define COLUMN ( x,
y,
i,
c0,
c1,
c2,
c3,
c4,
c5,
c6,
c7,
tv1,
tv2,
tu,
tl,
t )

◆ P_TYPE

#define P_TYPE   0

◆ Q_TYPE

#define Q_TYPE   1

◆ ROTATE_COLUMN_DOWN

#define ROTATE_COLUMN_DOWN ( v1,
v2,
amount_bytes,
temp_var )
Value:
{temp_var = (v1<<(8*amount_bytes))|(v2>>(8*(4-amount_bytes))); \
v2 = (v2<<(8*amount_bytes))|(v1>>(8*(4-amount_bytes))); \
v1 = temp_var;}
#define v1(p)
Definition aesb.c:117
#define v2(p)
Definition aesb.c:118

Function Documentation

◆ F512()

void F512 ( uint32_t * h,
const uint32_t * m )
static

◆ Final()

void Final ( hashState * ctx,
BitSequence * output )
static

◆ groestl()

void groestl ( const BitSequence * data,
DataLength databitlen,
BitSequence * hashval )

◆ Init()

void Init ( hashState * ctx)
static

◆ OutputTransformation()

void OutputTransformation ( hashState * ctx)
static

◆ RND512P()

void RND512P ( uint8_t * x,
uint32_t * y,
uint32_t r )
static

◆ RND512Q()

void RND512Q ( uint8_t * x,
uint32_t * y,
uint32_t r )
static

◆ Transform()

void Transform ( hashState * ctx,
const uint8_t * input,
int msglen )
static

◆ Update()

void Update ( hashState * ctx,
const BitSequence * input,
DataLength databitlen )
static

Variable Documentation

◆ indices_cyclic

const uint8_t indices_cyclic[15] = {0,1,2,3,4,5,6,7,0,1,2,3,4,5,6}

◆ shift_Values

const uint8_t shift_Values[2][8] = {{0,1,2,3,4,5,6,7},{1,3,5,7,0,2,4,6}}