• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 /// EpidNrProve interface.
17 /*! \file */
18 #ifndef EPID_MEMBER_TINY_SRC_NRPROVE_H_
19 #define EPID_MEMBER_TINY_SRC_NRPROVE_H_
20 
21 #include <stddef.h>
22 #include "epid/common/errors.h"
23 
24 /// \cond
25 typedef struct MemberCtx MemberCtx;
26 typedef struct NativeBasicSignature NativeBasicSignature;
27 typedef struct SigRlEntry SigRlEntry;
28 typedef struct NrProof NrProof;
29 /// \endcond
30 
31 /// Calculates a non-revoked proof for a single signature based revocation
32 /// list entry.
33 /*!
34  Used in constrained environments where, due to limited memory, it may not
35  be possible to process through a large and potentially unbounded revocation
36  list.
37 
38  \param[in] ctx
39  The member context.
40  \param[in] msg
41  The message.
42  \param[in] msg_len
43  The length of message in bytes.
44  \param[in] sig
45  The basic signature.
46  \param[in] sigrl_entry
47  The signature based revocation list entry.
48  \param[out] proof
49  The generated non-revoked proof.
50 
51  \returns ::EpidStatus
52 
53  \note
54  This function should be used in conjunction with EpidSignBasic().
55 
56  \note
57  If the result is not ::kEpidNoErr, the content of proof is undefined.
58 
59  \see EpidMemberInit
60  \see EpidSignBasic
61  */
62 EpidStatus EpidNrProve(MemberCtx const* ctx, void const* msg, size_t msg_len,
63                        NativeBasicSignature const* sig,
64                        SigRlEntry const* sigrl_entry, NrProof* proof);
65 
66 #endif  // EPID_MEMBER_TINY_SRC_NRPROVE_H_
67