epid_params-testhelper.h 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. /*############################################################################
  2. # Copyright 2016-2017 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/ecgroup.h"
  27. #include "epid/common/math/finitefield.h"
  28. }
  29. #include "epid/common-testhelper/bignum_wrapper-testhelper.h"
  30. #include "epid/common-testhelper/ecgroup_wrapper-testhelper.h"
  31. #include "epid/common-testhelper/ecpoint_wrapper-testhelper.h"
  32. #include "epid/common-testhelper/ffelement_wrapper-testhelper.h"
  33. #include "epid/common-testhelper/finite_field_wrapper-testhelper.h"
  34. typedef struct Epid2Params_ Epid2Params_;
  35. class Epid20Params {
  36. public:
  37. Epid20Params();
  38. // This class instances are not meant to be copied.
  39. // Explicitly delete copy constructor and assignment operator.
  40. Epid20Params(const Epid20Params&) = delete;
  41. Epid20Params& operator=(const Epid20Params&) = delete;
  42. virtual ~Epid20Params() {}
  43. FiniteFieldObj GT;
  44. EcGroupObj G1;
  45. EcGroupObj G2;
  46. FiniteFieldObj fq;
  47. FiniteFieldObj fp;
  48. private:
  49. static const BigNumStr q_str_;
  50. static const FqElemStr beta_str_;
  51. static const Fq6ElemStr v_str_;
  52. static const BigNumStr p_str_;
  53. static const FqElemStr b_str_;
  54. static const FqElemStr h_str_;
  55. static const G1ElemStr g1_str_;
  56. static const Fq2ElemStr xi_str_;
  57. static const G2ElemStr g2_str_;
  58. FiniteFieldObj fq2;
  59. FiniteFieldObj fq6;
  60. };
  61. #endif // EPID_COMMON_TESTHELPER_EPID_PARAMS_TESTHELPER_H_