signature.c File Reference

#include "wizard/studio.h"
#include "wizard/exception.h"
#include "wizard/exception-private.h"
#include "wizard/memory_.h"
#include "wizard/signature.h"
#include "wizard/string_.h"
Include dependency graph for signature.c:

Go to the source code of this file.

Defines

#define Trunc32(x)   ((x) & 0xffffffffUL)
#define Ch(x, y, z)   (((x) & (y)) ^ (~(x) & (z)))
#define Maj(x, y, z)   (((x) & (y)) ^ ((x) & (z)) ^ ((y) & (z)))
#define RotateRight(x, n)   Trunc32((((x) >> (n)) | ((x) << (32-(n)))))
#define Sigma0(x)   (RotateRight(x,7) ^ RotateRight(x,18) ^ Trunc32((x) >> 3))
#define Sigma1(x)   (RotateRight(x,17) ^ RotateRight(x,19) ^ Trunc32((x) >> 10))
#define Suma0(x)   (RotateRight(x,2) ^ RotateRight(x,13) ^ RotateRight(x,22))
#define Suma1(x)   (RotateRight(x,6) ^ RotateRight(x,11) ^ RotateRight(x,25))

Functions

static void TransformSignature (SignatureInfo *)
WizardExport void FinalizeSignature (SignatureInfo *signature_info)
WizardExport void GetSignatureInfo (SignatureInfo *signature_info)
WizardExport void UpdateSignature (SignatureInfo *signature_info, const unsigned char *message, const size_t length)

Define Documentation

#define Ch ( x,
y,
 )     (((x) & (y)) ^ (~(x) & (z)))
#define Maj ( x,
y,
 )     (((x) & (y)) ^ ((x) & (z)) ^ ((y) & (z)))
#define RotateRight ( x,
 )     Trunc32((((x) >> (n)) | ((x) << (32-(n)))))

Referenced by RotateRight(), and SetAESKey().

#define Sigma0 (  )     (RotateRight(x,7) ^ RotateRight(x,18) ^ Trunc32((x) >> 3))
#define Sigma1 (  )     (RotateRight(x,17) ^ RotateRight(x,19) ^ Trunc32((x) >> 10))
#define Suma0 (  )     (RotateRight(x,2) ^ RotateRight(x,13) ^ RotateRight(x,22))
#define Suma1 (  )     (RotateRight(x,6) ^ RotateRight(x,11) ^ RotateRight(x,25))
#define Trunc32 (  )     ((x) & 0xffffffffUL)

Function Documentation

WizardExport void FinalizeSignature ( SignatureInfo signature_info  ) 
WizardExport void GetSignatureInfo ( SignatureInfo signature_info  ) 
static void TransformSignature ( SignatureInfo signature_info  )  [static]
WizardExport void UpdateSignature ( SignatureInfo signature_info,
const unsigned char *  message,
const size_t  length 
)
Generated by  doxygen 1.6.2-20100208