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 /// Non-sensitive member context APIs 17 /*! \file */ 18 19 #ifndef EPID_MEMBER_SRC_VALIDATEKEY_H_ 20 #define EPID_MEMBER_SRC_VALIDATEKEY_H_ 21 22 #include "epid/common/errors.h" 23 #include "epid/common/stdtypes.h" 24 25 /// \cond 26 typedef struct MemberCtx MemberCtx; 27 typedef struct G1ElemStr G1ElemStr; 28 typedef struct G2ElemStr G2ElemStr; 29 typedef struct FpElemStr FpElemStr; 30 /// \endcond 31 32 /// Checks if provided parameters result in a valid key 33 /*! 34 35 36 \param[in,out] ctx 37 The member context. 38 39 \param[in] A_str 40 The A value of the member private key. 41 42 \param[in] x_str 43 The x value of the member private key. 44 45 \param[in] h1_str 46 The h1 value of the group public key. 47 48 \param[in] w_str 49 The w value of the group public key. 50 51 \retval true 52 if the input values would result in a valid member private key 53 54 \retval false 55 if the input values would result in an invalid member private key 56 57 \see MemberCreate 58 59 */ 60 bool EpidMemberIsKeyValid(MemberCtx* ctx, G1ElemStr const* A_str, 61 FpElemStr const* x_str, G1ElemStr const* h1_str, 62 G2ElemStr const* w_str); 63 64 #endif // EPID_MEMBER_SRC_VALIDATEKEY_H_ 65