nrprove.h 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  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. #include <stddef.h>
  21. #include "epid/common/errors.h"
  22. /// \cond
  23. typedef struct MemberCtx MemberCtx;
  24. typedef struct BasicSignature BasicSignature;
  25. typedef struct SigRlEntry SigRlEntry;
  26. typedef struct NrProof NrProof;
  27. /// \endcond
  28. /// Calculates a non-revoked proof for a single signature based revocation
  29. /// list entry.
  30. /*!
  31. Used in constrained environments where, due to limited memory, it may not
  32. be possible to process through a large and potentially unbounded revocation
  33. list.
  34. \param[in] ctx
  35. The member context.
  36. \param[in] msg
  37. The message.
  38. \param[in] msg_len
  39. The length of message in bytes.
  40. \param[in] basename
  41. The basename used in EpidSignBasic.
  42. \param[in] basename_len
  43. The length of the basename.
  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. \returns ::EpidStatus
  51. \note
  52. This function should be used in conjunction with EpidSignBasic().
  53. \note
  54. If the result is not ::kEpidNoErr, the content of proof is undefined.
  55. \see EpidMemberInit
  56. \see EpidSignBasic
  57. */
  58. EpidStatus EpidNrProve(MemberCtx const* ctx, void const* msg, size_t msg_len,
  59. void const* basename, size_t basename_len,
  60. BasicSignature const* sig, SigRlEntry const* sigrl_entry,
  61. NrProof* proof);
  62. #endif // EPID_MEMBER_SRC_NRPROVE_H_