Changeset View
Changeset View
Standalone View
Standalone View
sys/crypto/skein/skein_debug.h
#ifndef _SKEIN_DEBUG_H_ | #ifndef _SKEIN_DEBUG_H_ | ||||
#define _SKEIN_DEBUG_H_ | #define _SKEIN_DEBUG_H_ | ||||
/*********************************************************************** | /*********************************************************************** | ||||
** | ** | ||||
** Interface definitions for Skein hashing debug output. | ** Interface definitions for Skein hashing debug output. | ||||
** | ** | ||||
** Source code author: Doug Whiting, 2008. | ** Source code author: Doug Whiting, 2008. | ||||
** | ** | ||||
** This algorithm and source code is released to the public domain. | ** This algorithm and source code is released to the public domain. | ||||
** | ** | ||||
************************************************************************/ | ************************************************************************/ | ||||
#ifdef SKEIN_DEBUG | #ifdef SKEIN_DEBUG | ||||
/* callout functions used inside Skein code */ | /* callout functions used inside Skein code */ | ||||
void Skein_Show_Block(uint_t bits,const Skein_Ctxt_Hdr_t *h,const u64b_t *X,const u08b_t *blkPtr, | void Skein_Show_Block(u_int bits, const Skein_Ctxt_Hdr_t *h, | ||||
const u64b_t *wPtr,const u64b_t *ksPtr,const u64b_t *tsPtr); | const u_int64_t *X, const u_int8_t *blkPtr, | ||||
void Skein_Show_Round(uint_t bits,const Skein_Ctxt_Hdr_t *h,size_t r,const u64b_t *X); | const u_int64_t *wPtr, const u_int64_t *ksPtr, | ||||
void Skein_Show_R_Ptr(uint_t bits,const Skein_Ctxt_Hdr_t *h,size_t r,const u64b_t *X_ptr[]); | const u_int64_t *tsPtr); | ||||
void Skein_Show_Final(uint_t bits,const Skein_Ctxt_Hdr_t *h,size_t cnt,const u08b_t *outPtr); | void Skein_Show_Round(u_int bits, const Skein_Ctxt_Hdr_t *h, size_t r, | ||||
void Skein_Show_Key (uint_t bits,const Skein_Ctxt_Hdr_t *h,const u08b_t *key,size_t keyBytes); | const u_int64_t *X); | ||||
void Skein_Show_R_Ptr(u_int bits, const Skein_Ctxt_Hdr_t *h, size_t r, | |||||
const u_int64_t *X_ptr[]); | |||||
void Skein_Show_Final(u_int bits, const Skein_Ctxt_Hdr_t *h, size_t cnt, | |||||
const u_int8_t *outPtr); | |||||
void Skein_Show_Key (u_int bits, const Skein_Ctxt_Hdr_t *h, | |||||
const u_int8_t *key, size_t keyBytes); | |||||
extern uint_t skein_DebugFlag; /* flags to control debug output (0 --> none) */ | extern u_int skein_DebugFlag; /* flags to control debug output (0 --> none) */ | ||||
#define SKEIN_RND_SPECIAL (1000u) | #define SKEIN_RND_SPECIAL (1000u) | ||||
#define SKEIN_RND_KEY_INITIAL (SKEIN_RND_SPECIAL+0u) | #define SKEIN_RND_KEY_INITIAL (SKEIN_RND_SPECIAL+0u) | ||||
#define SKEIN_RND_KEY_INJECT (SKEIN_RND_SPECIAL+1u) | #define SKEIN_RND_KEY_INJECT (SKEIN_RND_SPECIAL+1u) | ||||
#define SKEIN_RND_FEED_FWD (SKEIN_RND_SPECIAL+2u) | #define SKEIN_RND_FEED_FWD (SKEIN_RND_SPECIAL+2u) | ||||
/* flag bits: skein_DebugFlag */ | /* flag bits: skein_DebugFlag */ | ||||
#define SKEIN_DEBUG_KEY (1u << 1) /* show MAC key */ | #define SKEIN_DEBUG_KEY (1u << 1) /* show MAC key */ | ||||
Show All 18 Lines |