home *** CD-ROM | disk | FTP | other *** search
/ Hacks & Cracks / Hacks_and_Cracks.iso / hackersguides-&-software / hdsk41.zip / SOURCE.ZIP / IDEA.HPP < prev    next >
C/C++ Source or Header  |  1994-04-20  |  736b  |  41 lines

  1. /* idea.h */
  2.  
  3. #ifndef _IDEA_DOT_H
  4. #define _IDEA_DOT_H
  5.  
  6. #include <stdio.h>
  7. #include <time.h>
  8. #include <process.h>
  9. #include <io.h>
  10. #include <string.h>
  11. #include <conio.h>
  12.  
  13. #define IDEAKEYSIZE 16
  14. #define IDEABLOCKSIZE 8
  15. #define word16 unsigned int
  16. #define word32 unsigned long int
  17. #define ROUNDS    8
  18. #define KEYLEN    (6*ROUNDS+4)
  19. #define tempfilename "tempfile.Σnc"
  20.  
  21.  
  22.  
  23. #define low16(x) ((x) & 0xffff)
  24.  
  25. typedef unsigned int uint16;
  26. typedef word16 IDEAkey[KEYLEN];
  27.  
  28. /*IDEA Algorithm functions */
  29. void en_key_idea(word16 userkey[8],IDEAkey Z);
  30. void de_key_idea(IDEAkey Z, IDEAkey DK);
  31. void cipher_idea(word16 in[4],word16 out[4],IDEAkey Z);
  32. uint16 inv(uint16 x);
  33. uint16 mul(uint16 a,uint16 b);
  34.  
  35.  
  36. #endif
  37.  
  38.  
  39.  
  40.  
  41.