• Home
  • History
  • Annotate
  • 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_SRC_NRPROVE_H_
19 #define EPID_MEMBER_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 BasicSignature BasicSignature;
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] basename
45  The basename used in EpidSignBasic.
46  \param[in] basename_len
47  The length of the basename.
48  \param[in] sig
49  The basic signature.
50  \param[in] sigrl_entry
51  The signature based revocation list entry.
52  \param[out] proof
53  The generated non-revoked proof.
54 
55  \returns ::EpidStatus
56 
57  \note
58  This function should be used in conjunction with EpidSignBasic().
59 
60  \note
61  If the result is not ::kEpidNoErr, the content of proof is undefined.
62 
63  \see EpidMemberInit
64  \see EpidSignBasic
65  */
66 EpidStatus EpidNrProve(MemberCtx const* ctx, void const* msg, size_t msg_len,
67                        void const* basename, size_t basename_len,
68                        BasicSignature const* sig, SigRlEntry const* sigrl_entry,
69                        NrProof* proof);
70 
71 #endif  // EPID_MEMBER_SRC_NRPROVE_H_
72