rijndael-alg-fst.h
上传用户:sun1608
上传日期:2007-02-02
资源大小:6116k
文件大小:1k
源码类别:

流媒体/Mpeg4/MP4

开发平台:

Visual C++

  1. /*
  2.  * rijndael-alg-fst.h   v2.4   April '2000
  3.  *
  4.  * Optimised ANSI C code
  5.  *
  6.  * #define INTERMEDIATE_VALUE_KAT to generate the Intermediate Value Known Answer Test.
  7.  */
  8. #ifndef __RIJNDAEL_ALG_FST_H
  9. #define __RIJNDAEL_ALG_FST_H
  10. #define BINARY_KEY_MATERIAL
  11. #define MAXKC (256/32)
  12. #define MAXROUNDS 14
  13. #ifndef USUAL_TYPES
  14. #define USUAL_TYPES
  15. typedef unsigned char byte;
  16. typedef unsigned char word8;
  17. typedef unsigned short word16;
  18. typedef unsigned int word32;
  19. #endif /* USUAL_TYPES */
  20. int rijndaelKeySched(word8 k[MAXKC][4], word8 rk[MAXROUNDS+1][4][4], int ROUNDS);
  21. int rijndaelKeyEncToDec(word8 W[MAXROUNDS+1][4][4], int ROUNDS);
  22. int rijndaelEncrypt(word8 a[16], word8 b[16], word8 rk[MAXROUNDS+1][4][4], int ROUNDS);
  23. #ifdef INTERMEDIATE_VALUE_KAT
  24. int rijndaelEncryptRound(word8 a[4][4], word8 rk[MAXROUNDS+1][4][4], int ROUNDS, int rounds);
  25. #endif /* INTERMEDIATE_VALUE_KAT */
  26. int rijndaelDecrypt(word8 a[16], word8 b[16], word8 rk[MAXROUNDS+1][4][4], int ROUNDS);
  27. #ifdef INTERMEDIATE_VALUE_KAT
  28. int rijndaelDecryptRound(word8 a[4][4], word8 rk[MAXROUNDS+1][4][4], int ROUNDS, int rounds);
  29. #endif /* INTERMEDIATE_VALUE_KAT */
  30. #endif /* __RIJNDAEL_ALG_FST_H */