/home/dko/projects/mobilec/trunk/src/security/xyssl-0.7/library/havege.c File Reference

#include <string.h>
#include <time.h>
#include "xyssl/timing.h"
#include "xyssl/havege.h"

Go to the source code of this file.

Defines

#define _CRT_SECURE_NO_DEPRECATE   1
#define SWAP(X, Y)   { int *T = X; X = Y; Y = T; }
#define TST1_ENTER   if( PTEST & 1 ) { PTEST ^= 3; PTEST >>= 1;
#define TST2_ENTER   if( PTEST & 1 ) { PTEST ^= 3; PTEST >>= 1;
#define TST1_LEAVE   U1++; }
#define TST2_LEAVE   U2++; }
#define ONE_ITERATION

Functions

static void havege_fill (havege_state *hs)
void havege_init (havege_state *hs)
 HAVEGE initialization.
int havege_rand (void *rng_d)
 HAVEGE rand function.

Variables

static const char _havege_src [] = "_havege_src"


Define Documentation

#define _CRT_SECURE_NO_DEPRECATE   1

Definition at line 29 of file havege.c.

#define ONE_ITERATION

Definition at line 60 of file havege.c.

Referenced by havege_fill().

#define SWAP ( X,
 )     { int *T = X; X = Y; Y = T; }

Definition at line 52 of file havege.c.

#define TST1_ENTER   if( PTEST & 1 ) { PTEST ^= 3; PTEST >>= 1;

Definition at line 54 of file havege.c.

#define TST1_LEAVE   U1++; }

Definition at line 57 of file havege.c.

#define TST2_ENTER   if( PTEST & 1 ) { PTEST ^= 3; PTEST >>= 1;

Definition at line 55 of file havege.c.

#define TST2_LEAVE   U2++; }

Definition at line 58 of file havege.c.


Function Documentation

static void havege_fill ( havege_state hs  )  [static]

Definition at line 154 of file havege.c.

References COLLECT_SIZE, havege_state::offset, ONE_ITERATION, havege_state::PT1, havege_state::PT2, and havege_state::WALK.

Referenced by havege_init(), and havege_rand().

void havege_init ( havege_state hs  ) 

HAVEGE initialization.

Parameters:
hs HAVEGE state to be initialized

Definition at line 188 of file havege.c.

References havege_fill().

Referenced by main().

int havege_rand ( void *  rng_d  ) 

HAVEGE rand function.

Parameters:
rng_st points to an HAVEGE state
Returns:
A random int

Definition at line 198 of file havege.c.

References COLLECT_SIZE, havege_fill(), havege_state::offset, and havege_state::pool.

Referenced by main().


Variable Documentation

const char _havege_src[] = "_havege_src" [static]

Definition at line 209 of file havege.c.


Generated on Fri May 16 14:49:56 2008 for Mobile-C by  doxygen 1.5.4