epid_params-testhelper.h 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. /*############################################################################
  2. # Copyright 2016 Intel Corporation
  3. #
  4. # Licensed under the Apache License, Version 2.0 (the "License");
  5. # you may not use this file except in compliance with the License.
  6. # You may obtain a copy of the License at
  7. #
  8. # http://www.apache.org/licenses/LICENSE-2.0
  9. #
  10. # Unless required by applicable law or agreed to in writing, software
  11. # distributed under the License is distributed on an "AS IS" BASIS,
  12. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. # See the License for the specific language governing permissions and
  14. # limitations under the License.
  15. ############################################################################*/
  16. /*!
  17. * \file
  18. * \brief Intel(R) EPID 1.1 parameters C++ wrapper interface.
  19. */
  20. #ifndef EPID_COMMON_TESTHELPER_1_1_EPID_PARAMS_TESTHELPER_H_
  21. #define EPID_COMMON_TESTHELPER_1_1_EPID_PARAMS_TESTHELPER_H_
  22. #include <memory>
  23. #include <vector>
  24. extern "C" {
  25. #include "epid/common/math/bignum.h"
  26. #include "epid/common/math/finitefield.h"
  27. #include "epid/common/math/ecgroup.h"
  28. #include "epid/common/1.1/types.h"
  29. }
  30. #include "epid/common-testhelper/ffelement_wrapper-testhelper.h"
  31. #include "epid/common-testhelper/finite_field_wrapper-testhelper.h"
  32. #include "epid/common-testhelper/ecgroup_wrapper-testhelper.h"
  33. #include "epid/common-testhelper/ecpoint_wrapper-testhelper.h"
  34. class Epid11ParamsObj {
  35. public:
  36. Epid11ParamsObj();
  37. // This class instances are not meant to be copied.
  38. // Explicitly delete copy constructor and assignment operator.
  39. Epid11ParamsObj(const Epid11ParamsObj&) = delete;
  40. Epid11ParamsObj& operator=(const Epid11ParamsObj&) = delete;
  41. virtual ~Epid11ParamsObj() {}
  42. FiniteFieldObj GT;
  43. EcGroupObj G1;
  44. EcGroupObj G2;
  45. EcGroupObj G3;
  46. private:
  47. static const BigNumStr p_str_;
  48. static const BigNumStr q_str_;
  49. static const std::vector<uint8_t> h_str_;
  50. static const FqElemStr a_str_;
  51. static const FqElemStr b_str_;
  52. static const BigNumStr coeffs_str_[3];
  53. static const FqElemStr qnr_str;
  54. static const std::vector<uint8_t> orderG2_str;
  55. static const BigNumStr p1_str_;
  56. static const BigNumStr q1_str_;
  57. static const std::vector<uint8_t> h1_str_;
  58. static const FqElemStr a1_str_;
  59. static const FqElemStr b1_str_;
  60. static const Epid11G1ElemStr g1_str_;
  61. static const Fq3ElemStr g2x_str_;
  62. static const Fq3ElemStr g2y_str_;
  63. static const Epid11G3ElemStr g3_str_;
  64. };
  65. #endif // EPID_COMMON_TESTHELPER_1_1_EPID_PARAMS_TESTHELPER_H_