/home/dko/Projects/mobilec/src/security/xyssl-0.9/library/havege.c File Reference

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

Go to the source code of this file.

Defines

#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 *p_rng)
 HAVEGE rand function.

Define Documentation

#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]
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 generate_AES_key(), generate_RSA_keys_ciphertext(), generate_RSA_keys_plaintext(), initiate_migration_process(), main(), and ssl_test().

int havege_rand ( void *  p_rng  ) 

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 generate_AES_key(), generate_RSA_keys_ciphertext(), generate_RSA_keys_plaintext(), initiate_migration_process(), main(), and ssl_test().

Generated on Tue Dec 28 15:15:29 2010 for Mobile-C by  doxygen 1.6.3