CONFIG.h 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. // ************************************************************************** //
  2. // Global parameters:
  3. // Use Pseudorandom bytes instead of Random bytes
  4. // (Instead of sgx_read_rand we pull random bytes from a sgx_read_rand seeded AES_CTR
  5. // of buffer size PRB_BUFFER_SIZE)
  6. #define USE_PRB
  7. #define PRB_BUFFER_SIZE 100000
  8. // Debugging flag to use inputs [1,N]:
  9. #define RANDOMIZE_INPUTS 1
  10. //#define SHOW_INPUT_KEYS 1
  11. // ************************************************************************** //
  12. // Bucket Oblivious Random Permutation (BORP) / Bucket Oblivious Sort (BOS) parameters:
  13. // Output verbose timings
  14. //#define VERBOSE_TIMINGS_BORP
  15. // Store the real packets buffer after completing the ORP phase
  16. // in memory outside the PRM
  17. // TODO 1: This is not really useful. Remove BOS_OUTSIDE_PRM_STORAGE completely from the rest of the source
  18. // and then take it out of here
  19. // #define BOS_OUTSIDE_PRM_STORAGE 1
  20. // Multi-Threading Flags
  21. // TODO 2: BORP/BOS used to have a multi-threaded implementation. Since we no longer maintain it we should
  22. // remove it all out of the rest of the source.
  23. #define MULTITHREADED
  24. // When running Single threaded, set NUM_THREADS to 1
  25. // TODO 3: When handling TODO 2, this NUM_THREADS should go away as well.
  26. #define COUNT_OSWAPS
  27. // To print BRN configuration
  28. // #define PRINT_BRN_CONFIGURATION
  29. // To time all the individual components of BORP/BOS
  30. // Namely ProcessPacketsThroughBRN, FlushBuffers, RemoveFakes_TC,
  31. // #define DETAILED_BOS_TIMING 1
  32. // Useful for debugging reals packets in removeFakes_TC of BORP
  33. // #define DEBUG_RFTC
  34. // To print a log line whenever BORP evicts incorrectly
  35. #define DEBUG_BORP_FAILURE
  36. // ************************************************************************** //
  37. // Sorting network parameters:
  38. //data/packet size in bytes
  39. //#define SN_DATA_SIZE 8
  40. #define SN_KEY_SIZE 8
  41. //#define SN_PACKET_SIZE (SN_DATA_SIZE + SN_KEY_SIZE)
  42. // ************************************************************************** //
  43. // Waksman network options:
  44. // #define TEST_WN_DJB 1
  45. // #define TEST_WN_OA 1
  46. // ************************************************************************** //
  47. // Recursive shuffle parameters:
  48. //data/packet size in bytes
  49. #define RS_PACKET_SIZE 16
  50. #define RS_INTERNAL 1
  51. // RS_M2
  52. #define RS_M2_MEM_OPT1 1
  53. // #define RS_RB_BUFFER_SIZE 1000000
  54. // ************************************************************************** //
  55. // Tight compaction parameters
  56. #define TC_PRECOMPUTE_COUNTS 1
  57. #define TC_OPT_SWAP_FLAG 1
  58. // ************************************************************************** //