okv.h 743 B

12345678910111213141516171819202122232425262728293031323334
  1. #ifndef _OKV
  2. #define _OKV
  3. #include "dpf.h"
  4. typedef struct{
  5. EVP_CIPHER_CTX *rowKeyA;
  6. EVP_CIPHER_CTX *rowKeyB;
  7. uint128_t newKeyA;
  8. uint128_t newKeyB;
  9. int dataSize; //size of the data stored here
  10. uint8_t* mask; //current mask resulting from rerandomization
  11. uint8_t* data; //the actual data
  12. } vatRow;
  13. void initializeServer(int numThreads);
  14. void createDb(int isLeader, int dataSize);
  15. void xorIn(int i, uint8_t *data);
  16. void resetDb();
  17. void readData(int index, uint8_t *data);
  18. void readSeed(uint8_t *seedIn);
  19. uint128_t getUint128_t(int i);
  20. void decryptRow(int localIndex, uint8_t *out, uint8_t *dataA, uint8_t *dataB, uint8_t *seedA, uint8_t *seedB);
  21. void getCipher(int isLeader, int i, uint8_t *array);
  22. #endif