epid_params-testhelper.h 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  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 2.0 parameters C++ wrapper interface.
  19. */
  20. #ifndef EPID_COMMON_TESTHELPER_EPID_PARAMS_TESTHELPER_H_
  21. #define EPID_COMMON_TESTHELPER_EPID_PARAMS_TESTHELPER_H_
  22. #include <memory>
  23. #include "epid/common/types.h"
  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. }
  29. #include "epid/common-testhelper/ffelement_wrapper-testhelper.h"
  30. #include "epid/common-testhelper/finite_field_wrapper-testhelper.h"
  31. #include "epid/common-testhelper/ecgroup_wrapper-testhelper.h"
  32. #include "epid/common-testhelper/ecpoint_wrapper-testhelper.h"
  33. #include "epid/common-testhelper/bignum_wrapper-testhelper.h"
  34. class Epid20Params {
  35. public:
  36. Epid20Params();
  37. // This class instances are not meant to be copied.
  38. // Explicitly delete copy constructor and assignment operator.
  39. Epid20Params(const Epid20Params&) = delete;
  40. Epid20Params& operator=(const Epid20Params&) = delete;
  41. virtual ~Epid20Params() {}
  42. FiniteFieldObj GT;
  43. EcGroupObj G1;
  44. EcGroupObj G2;
  45. private:
  46. static const BigNumStr q_str_;
  47. static const FqElemStr beta_str_;
  48. static const Fq6ElemStr v_str_;
  49. static const BigNumStr p_str_;
  50. static const FqElemStr b_str_;
  51. static const FqElemStr h_str_;
  52. static const G1ElemStr g1_str_;
  53. static const Fq2ElemStr xi_str_;
  54. static const G2ElemStr g2_str_;
  55. FiniteFieldObj fq;
  56. FiniteFieldObj fq2;
  57. FiniteFieldObj fq6;
  58. };
  59. #endif // EPID_COMMON_TESTHELPER_EPID_PARAMS_TESTHELPER_H_