/* idea.h */
// adapted AL 1997

#ifndef _IDEAP_DOT_H
#define _IDEAP_DOT_H

#define IDEAKEYSIZE 16
#define IDEABLOCKSIZE 8

#define word32 unsigned long int
#define ROUNDS	8
#define KEYLEN	52

#define low16(x) ((x) & 0xffff)
#define MUL(x,y) (x=mul(low16(x),y))

typedef unsigned short uint16;
typedef word16 IDEAkey[KEYLEN];

/*IDEA Algorithm functions */
void en_key_idea(word16 *userkey, IDEAkey Z);
void de_key_idea(IDEAkey Z, IDEAkey DK);
void cipher_idea(word16 *in,word16 *out, IDEAkey Z);
uint16 inv(uint16 x);
uint16 mul(uint16 a, uint16 b);

#endif /* _IDEAP_DOT_H */




