Newer
Older
AESLearning / secure_types.h
@Takayuki Takayuki on 25 Mar 2015 681 bytes can compile version
#ifndef __SECURE_TYPES__
#define __SECURE_TYPES__

typedef unsigned int   uint32;
typedef unsigned short uint16;
typedef unsigned char  uint8;

typedef unsigned int   uint;

typedef union u256 {
    uint8    uc[32];
    uint16   us[16];
    uint32   ul[8];
} u256;

typedef union u128 {
    uint8    uc[16];
    uint16   us[8];
    uint32   ul[4];
} u128;

typedef struct {
	u128 key;
	int counter;
	int key_flag;
	u128 M1;
	u256 M2;
	u128 M3;
} KEY_TABLE;

typedef uint32 IDATNUM;
typedef uint8  KEY_ID;
typedef u128 IDAT;
typedef u128 IV;
typedef u128 ODAT;
typedef u128 KEY;
typedef u128 KEY128;
typedef uint32 AUTHKEY_ID;
typedef uint8 UID[120/8];

#endif/*__SECURE_TYPES__*/