rdpf.hpp 821 B

12345678910111213141516171819202122232425262728
  1. #ifndef __RDPF_HPP__
  2. #define __RDPF_HPP__
  3. #include <vector>
  4. #include "mpcio.hpp"
  5. #include "coroutine.hpp"
  6. #include "types.hpp"
  7. struct RDPF {
  8. // The 128-bit seed
  9. DPFnode seed;
  10. // correction words; the depth of the DPF is the length of this
  11. // vector
  12. std::vector<DPFnode> cw;
  13. // correction flag bits: the one for level i is bit i of this word
  14. value_t cfbits;
  15. // Construct a DPF with the given (XOR-shared) target location, and
  16. // of the given depth, to be used for random-access memory reads and
  17. // writes. The DPF is construction collaboratively by P0 and P1,
  18. // with the server P2 helping by providing various kinds of
  19. // correlated randomness, such as MultTriples and AndTriples.
  20. RDPF(MPCTIO &tio, yield_t &yield,
  21. RegXS target, nbits_t depth);
  22. };
  23. #endif