codewords.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536
  1. /**
  2. \file codewords.h
  3. \author michael.zohner@ec-spride.de
  4. \copyright ABY - A Framework for Efficient Mixed-protocol Secure Two-party Computation
  5. Copyright (C) 2019 ENCRYPTO Group, TU Darmstadt
  6. This program is free software: you can redistribute it and/or modify
  7. it under the terms of the GNU Lesser General Public License as published
  8. by the Free Software Foundation, either version 3 of the License, or
  9. (at your option) any later version.
  10. ABY is distributed in the hope that it will be useful,
  11. but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. GNU Lesser General Public License for more details.
  14. You should have received a copy of the GNU Lesser General Public License
  15. along with this program. If not, see <http://www.gnu.org/licenses/>.
  16. \brief A hard-coded Welsh-Hadamard code for up to 8-bit words and resulting 256-bit codewords
  17. */
  18. #ifndef __CODEWORDS_H_
  19. #define __CODEWORDS_H_
  20. #include <cstdint>
  21. #include <cstdlib>
  22. const uint32_t m_nCodewords = 256;
  23. const uint32_t m_nCWIntlen = 8;
  24. const uint32_t m_nCodeWordBits = 256;
  25. const uint32_t m_nCodeWordBytes = m_nCodeWordBits/8;
  26. extern const uint32_t CODE_MATRIX[m_nCodewords][m_nCWIntlen];
  27. void readCodeWords(uint64_t** codewords);
  28. void InitAndReadCodeWord(uint64_t*** codewords);
  29. #endif //CODEWORDS_H_