1 /*############################################################################ 2 # Copyright 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 /// Member pre-computation API 17 /*! \file */ 18 #ifndef EPID_MEMBER_SRC_PRECOMP_H_ 19 #define EPID_MEMBER_SRC_PRECOMP_H_ 20 21 #include "epid/common/errors.h" 22 23 /// \cond 24 typedef struct Epid2Params_ Epid2Params_; 25 typedef struct GroupPubKey GroupPubKey; 26 typedef struct G1ElemStr G1ElemStr; 27 typedef struct MemberPrecomp MemberPrecomp; 28 /// \endcond 29 30 /// Precomputes pairing values for member 31 /*! 32 33 The the result of the expensive pairing operations can be 34 pre-computed. The pre-computation result can be saved for future 35 sign operations using the same group and private key. 36 37 \param[in] epid2_params 38 The field and group parameters. 39 40 \param[in] pub_key 41 The public key of the group. 42 43 \param[in] A_str 44 The A value of the member private key. 45 46 \param[out] precomp 47 The member pre-computed data. 48 49 \returns ::EpidStatus 50 51 \see CreateEpid2Params 52 53 */ 54 EpidStatus PrecomputeMemberPairing(Epid2Params_ const* epid2_params, 55 GroupPubKey const* pub_key, 56 G1ElemStr const* A_str, 57 MemberPrecomp* precomp); 58 59 #endif // EPID_MEMBER_SRC_PRECOMP_H_ 60