KeccakTools

genKATShortMsg.cpp File Reference

#include <sstream>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <string>
#include <time.h>
#include <ctype.h>
#include "duplex.h"
#include "Keccak.h"
Include dependency graph for genKATShortMsg.cpp:

Defines

#define MAX_MARKER_LEN   50
#define SUBMITTER_INFO_LEN   128
#define SqueezingOutputLength   4096

Typedefs

typedef unsigned char BitSequence

Enumerations

enum  STATUS_CODES {
  KAT_SUCCESS = 0, KAT_FILE_OPEN_ERROR = 1, KAT_HEADER_ERROR = 2, KAT_DATA_ERROR = 3,
  KAT_HASH_ERROR = 4
}

Functions

STATUS_CODES genShortMsg (unsigned int rate, unsigned int capacity, int outputLength, const std::string &suffix, bool fixedOutputLength=false)
int FindMarker (FILE *infile, const char *marker)
int ReadHex (FILE *infile, BitSequence *A, int Length, char *str)
void fprintBstr (FILE *fp, char *S, BitSequence *A, int L)
void genKATShortMsg_main ()
STATUS_CODES genSpongeKAT (Sponge &sponge, const std::string &suffix)
void genSpongeKAT ()
STATUS_CODES genDuplexKAT (Duplex &duplex, const std::string &suffix)
void genDuplexKAT ()
void fromNISTConventionToInternalConvention (BitSequence *Msg, int msglen)

Define Documentation

#define MAX_MARKER_LEN   50
#define SqueezingOutputLength   4096
#define SUBMITTER_INFO_LEN   128

Typedef Documentation

typedef unsigned char BitSequence

Enumeration Type Documentation

Enumerator:
KAT_SUCCESS 
KAT_FILE_OPEN_ERROR 
KAT_HEADER_ERROR 
KAT_DATA_ERROR 
KAT_HASH_ERROR 

Function Documentation

int FindMarker ( FILE *  infile,
const char *  marker 
)
void fprintBstr ( FILE *  fp,
char *  S,
BitSequence A,
int  L 
)
void fromNISTConventionToInternalConvention ( BitSequence Msg,
int  msglen 
)
void genDuplexKAT ( )
STATUS_CODES genDuplexKAT ( Duplex duplex,
const std::string &  suffix 
)
void genKATShortMsg_main ( )
STATUS_CODES genShortMsg ( unsigned int  rate,
unsigned int  capacity,
int  outputLength,
const std::string &  suffix,
bool  fixedOutputLength = false 
)
void genSpongeKAT ( )
STATUS_CODES genSpongeKAT ( Sponge sponge,
const std::string &  suffix 
)
int ReadHex ( FILE *  infile,
BitSequence A,
int  Length,
char *  str 
)