1. /* test program for FORK-256 implementation.
  2. Compile:
  3. gcc fork.c testfork.c -o testfork
  4. */
  5.  
  6. #include <stdio.h>
  7.  
  8. void FORK256_compress(unsigned int CV[8], const unsigned int M[16]);
  9.  
  10. int main(void) {
  11. /*default IV */
  12. unsigned int IV[8] = {
  13. 0x6a09e667, 0xbb67ae85, 0x3c6ef372, 0xa54ff53a,
  14. 0x510e527f, 0x9b05688c, 0x1f83d9ab, 0x5be0cd19
  15. };
  16.  
  17. /*test message given in specification*/
  18. unsigned int M[16] = {
  19. 0x4105ba8c, 0xd8423ce8, 0xac484680, 0x07ee1d40,
  20. 0xbc18d07a, 0x89fc027c, 0x5ee37091, 0xcd1824f0,
  21. 0x878de230, 0xdbbaf0fc, 0xda7e4408, 0xc6c05bc0,
  22. 0x33065020, 0x7367cfc5, 0xf4aa5c78, 0xe1cbc780
  23. };
  24. int i;
  25. FORK256_compress(IV,M);
  26. for(i = 0; i<8; ++i) {
  27. printf("%08x ",IV[i]);
  28. }
  29. printf("\n");
  30. return 0;
  31. }
  32.