• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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_1_1_SRC_CONTEXT_H_
17 #define EPID_VERIFIER_1_1_SRC_CONTEXT_H_
18 /*!
19  * \file
20  * \brief Intel(R) EPID 1.1 Verifier context interface.
21  */
22 #include "epid/common/1.1/src/commitment.h"
23 #include "epid/common/1.1/src/epid11params.h"
24 #include "epid/common/1.1/src/grouppubkey.h"
25 #include "epid/common/math/ecgroup.h"
26 #include "epid/common/math/finitefield.h"
27 
28 /// Verifier context definition
29 struct Epid11VerifierCtx {
30   Epid11GroupPubKey_* pub_key;  ///< Group public key
31   /// Verifier pre-computation
32   FfElement* e12;  ///< an element in GT
33   FfElement* e22;  ///< an element in GT
34   FfElement* e2w;  ///< an element in GT
35   /// Revocation lists
36   Epid11PrivRl const* priv_rl;    ///< Private key based RL - not owned
37   Epid11SigRl const* sig_rl;      ///< Signature based RL - not owned
38   Epid11GroupRl const* group_rl;  ///< Group RL - not owned
39 
40   Epid11Params_* epid11_params;      ///< Intel(R) EPID 1.1 params
41   Epid11CommitValues commit_values;  ///< Hashed values to create commitment
42   uint8_t* basename;                 ///< Basename to use - NULL for random base
43   size_t basename_len;               ///< Number of bytes in basename
44   EcPoint* basename_hash;            ///< Epid11EcHash of the basename
45 };
46 
47 #endif  // EPID_VERIFIER_1_1_SRC_CONTEXT_H_
48