cryptlib  3.4.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Macros
Macros | Functions
rmdlocl.h File Reference
#include <stdlib.h>
#include <string.h>
#include "crypt/osconfig.h"
#include "crypt/ripemd.h"
#include "crypt/md32com.h"
#include "crypt/rmdconst.h"

Go to the source code of this file.

Macros

#define RIPEMD160_LONG_LOG2   2 /* default to 32 bits */
 
#define DATA_ORDER_IS_LITTLE_ENDIAN
 
#define HASH_LONG   RIPEMD160_LONG
 
#define HASH_LONG_LOG2   RIPEMD160_LONG_LOG2
 
#define HASH_CTX   RIPEMD160_CTX
 
#define HASH_CBLOCK   RIPEMD160_CBLOCK
 
#define HASH_LBLOCK   RIPEMD160_LBLOCK
 
#define HASH_UPDATE   RIPEMD160_Update
 
#define HASH_TRANSFORM   RIPEMD160_Transform
 
#define HASH_FINAL   RIPEMD160_Final
 
#define HASH_BLOCK_HOST_ORDER   ripemd160_block_host_order
 
#define HASH_MAKE_STRING(c, s)
 
#define HASH_BLOCK_DATA_ORDER   ripemd160_block_data_order
 
#define F1(x, y, z)   ((x) ^ (y) ^ (z))
 
#define F2(x, y, z)   ((((y) ^ (z)) & (x)) ^ (z))
 
#define F3(x, y, z)   (((~(y)) | (x)) ^ (z))
 
#define F4(x, y, z)   ((((x) ^ (y)) & (z)) ^ (y))
 
#define F5(x, y, z)   (((~(z)) | (y)) ^ (x))
 
#define RIPEMD160_A   0x67452301L
 
#define RIPEMD160_B   0xEFCDAB89L
 
#define RIPEMD160_C   0x98BADCFEL
 
#define RIPEMD160_D   0x10325476L
 
#define RIPEMD160_E   0xC3D2E1F0L
 
#define RIP1(a, b, c, d, e, w, s)
 
#define RIP2(a, b, c, d, e, w, s, K)
 
#define RIP3(a, b, c, d, e, w, s, K)
 
#define RIP4(a, b, c, d, e, w, s, K)
 
#define RIP5(a, b, c, d, e, w, s, K)
 

Functions

void ripemd160_block_host_order (RIPEMD160_CTX *c, const void *p, int num)
 
void ripemd160_block_data_order (RIPEMD160_CTX *c, const void *p, int num)
 

Macro Definition Documentation

#define DATA_ORDER_IS_LITTLE_ENDIAN

Definition at line 91 of file rmdlocl.h.

#define F1 (   x,
  y,
 
)    ((x) ^ (y) ^ (z))

Definition at line 130 of file rmdlocl.h.

#define F2 (   x,
  y,
 
)    ((((y) ^ (z)) & (x)) ^ (z))

Definition at line 131 of file rmdlocl.h.

#define F3 (   x,
  y,
 
)    (((~(y)) | (x)) ^ (z))

Definition at line 132 of file rmdlocl.h.

#define F4 (   x,
  y,
 
)    ((((x) ^ (y)) & (z)) ^ (y))

Definition at line 133 of file rmdlocl.h.

#define F5 (   x,
  y,
 
)    (((~(z)) | (y)) ^ (x))

Definition at line 134 of file rmdlocl.h.

#define HASH_BLOCK_DATA_ORDER   ripemd160_block_data_order

Definition at line 111 of file rmdlocl.h.

#define HASH_BLOCK_HOST_ORDER   ripemd160_block_host_order

Definition at line 101 of file rmdlocl.h.

#define HASH_CBLOCK   RIPEMD160_CBLOCK

Definition at line 96 of file rmdlocl.h.

#define HASH_CTX   RIPEMD160_CTX

Definition at line 95 of file rmdlocl.h.

#define HASH_FINAL   RIPEMD160_Final

Definition at line 100 of file rmdlocl.h.

#define HASH_LBLOCK   RIPEMD160_LBLOCK

Definition at line 97 of file rmdlocl.h.

#define HASH_LONG   RIPEMD160_LONG

Definition at line 93 of file rmdlocl.h.

#define HASH_LONG_LOG2   RIPEMD160_LONG_LOG2

Definition at line 94 of file rmdlocl.h.

#define HASH_MAKE_STRING (   c,
  s 
)
Value:
do { \
unsigned long ll; \
ll=(c)->A; HOST_l2c(ll,(s)); \
ll=(c)->B; HOST_l2c(ll,(s)); \
ll=(c)->C; HOST_l2c(ll,(s)); \
ll=(c)->D; HOST_l2c(ll,(s)); \
ll=(c)->E; HOST_l2c(ll,(s)); \
} while (0)

Definition at line 102 of file rmdlocl.h.

#define HASH_TRANSFORM   RIPEMD160_Transform

Definition at line 99 of file rmdlocl.h.

#define HASH_UPDATE   RIPEMD160_Update

Definition at line 98 of file rmdlocl.h.

#define RIP1 (   a,
  b,
  c,
  d,
  e,
  w,
  s 
)
Value:
{ \
a+=F1(b,c,d)+X(w); \
a=ROTATE(a,s)+e; \
c=ROTATE(c,10); }

Definition at line 149 of file rmdlocl.h.

#define RIP2 (   a,
  b,
  c,
  d,
  e,
  w,
  s,
 
)
Value:
{ \
a+=F2(b,c,d)+X(w)+K; \
a=ROTATE(a,s)+e; \
c=ROTATE(c,10); }

Definition at line 154 of file rmdlocl.h.

#define RIP3 (   a,
  b,
  c,
  d,
  e,
  w,
  s,
 
)
Value:
{ \
a+=F3(b,c,d)+X(w)+K; \
a=ROTATE(a,s)+e; \
c=ROTATE(c,10); }

Definition at line 159 of file rmdlocl.h.

#define RIP4 (   a,
  b,
  c,
  d,
  e,
  w,
  s,
 
)
Value:
{ \
a+=F4(b,c,d)+X(w)+K; \
a=ROTATE(a,s)+e; \
c=ROTATE(c,10); }

Definition at line 164 of file rmdlocl.h.

#define RIP5 (   a,
  b,
  c,
  d,
  e,
  w,
  s,
 
)
Value:
{ \
a+=F5(b,c,d)+X(w)+K; \
a=ROTATE(a,s)+e; \
c=ROTATE(c,10); }

Definition at line 169 of file rmdlocl.h.

#define RIPEMD160_A   0x67452301L

Definition at line 137 of file rmdlocl.h.

#define RIPEMD160_B   0xEFCDAB89L

Definition at line 138 of file rmdlocl.h.

#define RIPEMD160_C   0x98BADCFEL

Definition at line 139 of file rmdlocl.h.

#define RIPEMD160_D   0x10325476L

Definition at line 140 of file rmdlocl.h.

#define RIPEMD160_E   0xC3D2E1F0L

Definition at line 141 of file rmdlocl.h.

#define RIPEMD160_LONG_LOG2   2 /* default to 32 bits */

Definition at line 70 of file rmdlocl.h.

Function Documentation

void ripemd160_block_data_order ( RIPEMD160_CTX c,
const void *  p,
int  num 
)

Definition at line 292 of file rmddgst.c.

void ripemd160_block_host_order ( RIPEMD160_CTX c,
const void *  p,
int  num 
)

Definition at line 92 of file rmddgst.c.