timing_hash.h 662 Bytes
Newer Older
Enrico Pozzobon committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
#ifndef TIMING_AEAD_H
#define TIMING_AEAD_H
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <stdio.h>
#include <string.h>
#include "crypto_hash.h"
#include "api.h"

#ifdef _MSC_VER
unsigned long CurrentProcessorNumber(void);
__inline unsigned long long read_tsc(void);
#endif

#ifdef __GNUC__
inline unsigned long long read_tsc(void);
#endif

void setCPUaffinity();

void block_rndfill(unsigned char *buf, const size_t len);

int time_base(double *av, double *sig);

int time_enc16(double *av, double *sig, unsigned long long dataLengthInBytes);

double enc_cycles(unsigned long long dataLengthInBytes);

void timing();

#endif  //TIMING_AEAD_H