context.h 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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. #ifndef EPID_VERIFIER_SRC_CONTEXT_H_
  17. #define EPID_VERIFIER_SRC_CONTEXT_H_
  18. /*!
  19. * \file
  20. * \brief Verifier context interface.
  21. */
  22. #include "epid/common/math/ecgroup.h"
  23. #include "epid/common/math/finitefield.h"
  24. #include "epid/common/src/commitment.h"
  25. #include "epid/common/src/epid2params.h"
  26. #include "epid/common/src/grouppubkey.h"
  27. /// Verifier context definition
  28. struct VerifierCtx {
  29. GroupPubKey_* pub_key; ///< group public key
  30. FfElement* e12; ///< an element in GT
  31. FfElement* e22; ///< an element in GT
  32. FfElement* e2w; ///< an element in GT
  33. FfElement* eg12; ///< an element in GT
  34. PrivRl const* priv_rl; ///< Private key based revocation list - not owned
  35. SigRl const* sig_rl; ///< Signature based revocation list - not owned
  36. GroupRl const* group_rl; ///< Group revocation list - not owned
  37. VerifierRl* verifier_rl; ///< Verifier revocation list
  38. bool was_verifier_rl_updated; ///< Indicates if blacklist was updated
  39. Epid2Params_* epid2_params; ///< Intel(R) EPID 2.0 params
  40. CommitValues commit_values; ///< Values that are hashed to create commitment
  41. HashAlg hash_alg; ///< Hash algorithm to use
  42. EcPoint* basename_hash; ///< EcHash of the basename (NULL = random base)
  43. uint8_t* basename; ///< Basename to use
  44. size_t basename_len; ///< Number of bytes in basename
  45. };
  46. #endif // EPID_VERIFIER_SRC_CONTEXT_H_