• 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 
17 /*!
18  * \file
19  * \brief Intel(R) EPID 1.1 pairing private interface.
20  */
21 
22 #ifndef EPID_COMMON_MATH_SRC_TATEPAIRING_INTERNAL_H_
23 #define EPID_COMMON_MATH_SRC_TATEPAIRING_INTERNAL_H_
24 
25 /// Pairing State
26 struct Epid11PairingState {
27   EcGroup* ga;                   ///< elliptic curve group G1
28   EcGroup* gb;                   ///< elliptic curve group G2
29   FiniteField* ff;               ///< finite field GT
30   BigNumStr p;                   ///< Intel(R) EPID 1.1 p parameter value
31   size_t p_bitsize;              ///< Length of p in bits
32   FfElement* a;                  ///< Intel(R) EPID 1.1 a parameter value
33   BigNum* final_exp_constant;    ///< (q^2 - q + 1)/p
34   FfElement* fq3_inv_constant;   ///< (inverse(qnr), 0) in Fq3
35   FfElement* fq3_inv2_constant;  ///< (inverse(qnr)^2, 0) in Fq3
36   FiniteField* Fq;               ///< Fq
37   FiniteField* Fq3;              ///< Fq3
38   FfElement* alpha_q[3];         ///< {t^(0*q), t^(1*q), t^(2*q)}
39 };
40 
41 #endif  // EPID_COMMON_MATH_SRC_TATEPAIRING_INTERNAL_H_
42