OpenSSL  1.0.1c
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros
Macros | Typedefs
seed_locl.h File Reference
#include "openssl/e_os2.h"
#include <openssl/seed.h>

Go to the source code of this file.

Macros

#define G_FUNC(v)
 
#define char2word(c, i)   (i) = ((((seed_word)(c)[0]) << 24) | (((seed_word)(c)[1]) << 16) | (((seed_word)(c)[2]) << 8) | ((seed_word)(c)[3]))
 
#define word2char(l, c)
 
#define KEYSCHEDULE_UPDATE0(T0, T1, X1, X2, X3, X4, KC)
 
#define KEYSCHEDULE_UPDATE1(T0, T1, X1, X2, X3, X4, KC)
 
#define KEYUPDATE_TEMP(T0, T1, K)
 
#define XOR_SEEDBLOCK(DST, SRC)
 
#define MOV_SEEDBLOCK(DST, SRC)
 
#define CHAR2WORD(C, I)
 
#define WORD2CHAR(I, C)
 
#define E_SEED(T0, T1, X1, X2, X3, X4, rbase)
 

Typedefs

typedef unsigned int seed_word
 

Macro Definition Documentation

#define char2word (   c,
 
)    (i) = ((((seed_word)(c)[0]) << 24) | (((seed_word)(c)[1]) << 16) | (((seed_word)(c)[2]) << 8) | ((seed_word)(c)[3]))

Definition at line 48 of file seed_locl.h.

#define CHAR2WORD (   C,
  I 
)
Value:
char2word((C), (I)[0]); \
char2word((C+4), (I)[1]); \
char2word((C+8), (I)[2]); \
char2word((C+12), (I)[3])

Definition at line 87 of file seed_locl.h.

#define E_SEED (   T0,
  T1,
  X1,
  X2,
  X3,
  X4,
  rbase 
)
Value:
(T0) = (X3) ^ (ks->data)[(rbase)]; \
(T1) = (X4) ^ (ks->data)[(rbase)+1]; \
(T1) ^= (T0); \
(T1) = G_FUNC((T1)); \
(T0) = ((T0) + (T1)) & 0xffffffff; \
(T0) = G_FUNC((T0)); \
(T1) = ((T1) + (T0)) & 0xffffffff; \
(T1) = G_FUNC((T1)); \
(T0) = ((T0) + (T1)) & 0xffffffff; \
(X1) ^= (T0); \
(X2) ^= (T1)

Definition at line 99 of file seed_locl.h.

#define G_FUNC (   v)
Value:
SS[0][(unsigned char) (v) & 0xff] ^ SS[1][(unsigned char) ((v)>>8) & 0xff] ^ \
SS[2][(unsigned char)((v)>>16) & 0xff] ^ SS[3][(unsigned char)((v)>>24) & 0xff]

Definition at line 44 of file seed_locl.h.

#define KEYSCHEDULE_UPDATE0 (   T0,
  T1,
  X1,
  X2,
  X3,
  X4,
  KC 
)
Value:
(T0) = (X3); \
(X3) = (((X3)<<8) ^ ((X4)>>24)) & 0xffffffff; \
(X4) = (((X4)<<8) ^ ((T0)>>24)) & 0xffffffff; \
(T0) = ((X1) + (X3) - (KC)) & 0xffffffff; \
(T1) = ((X2) + (KC) - (X4)) & 0xffffffff

Definition at line 57 of file seed_locl.h.

#define KEYSCHEDULE_UPDATE1 (   T0,
  T1,
  X1,
  X2,
  X3,
  X4,
  KC 
)
Value:
(T0) = (X1); \
(X1) = (((X1)>>8) ^ ((X2)<<24)) & 0xffffffff; \
(X2) = (((X2)>>8) ^ ((T0)<<24)) & 0xffffffff; \
(T0) = ((X1) + (X3) - (KC)) & 0xffffffff; \
(T1) = ((X2) + (KC) - (X4)) & 0xffffffff

Definition at line 64 of file seed_locl.h.

#define KEYUPDATE_TEMP (   T0,
  T1,
 
)
Value:
(K)[0] = G_FUNC((T0)); \
(K)[1] = G_FUNC((T1))

Definition at line 71 of file seed_locl.h.

#define MOV_SEEDBLOCK (   DST,
  SRC 
)
Value:
((DST))[0] = ((SRC))[0]; \
((DST))[1] = ((SRC))[1]; \
((DST))[2] = ((SRC))[2]; \
((DST))[3] = ((SRC))[3]

Definition at line 81 of file seed_locl.h.

#define word2char (   l,
  c 
)
Value:
*((c)+0) = (unsigned char)((l)>>24) & 0xff; \
*((c)+1) = (unsigned char)((l)>>16) & 0xff; \
*((c)+2) = (unsigned char)((l)>> 8) & 0xff; \
*((c)+3) = (unsigned char)((l)) & 0xff

Definition at line 51 of file seed_locl.h.

#define WORD2CHAR (   I,
 
)
Value:
word2char((I)[0], (C)); \
word2char((I)[1], (C+4)); \
word2char((I)[2], (C+8)); \
word2char((I)[3], (C+12))

Definition at line 93 of file seed_locl.h.

#define XOR_SEEDBLOCK (   DST,
  SRC 
)
Value:
((DST))[0] ^= ((SRC))[0]; \
((DST))[1] ^= ((SRC))[1]; \
((DST))[2] ^= ((SRC))[2]; \
((DST))[3] ^= ((SRC))[3]

Definition at line 75 of file seed_locl.h.

Typedef Documentation

typedef unsigned int seed_word

Definition at line 36 of file seed_locl.h.