/external/epid-sdk/epid/member/tiny/src/ |
D | setsigrl.c | 26 EpidStatus EPID_API EpidMemberSetSigRl(MemberCtx* ctx, SigRl const* sig_rl, in EpidMemberSetSigRl() argument 31 if (!ctx || !sig_rl) { in EpidMemberSetSigRl() 39 n2_in = be32toh(sig_rl->n2); in EpidMemberSetSigRl() 45 calculated_sig_rl_size = MIN_SIGRL_SIZE + n2_in * sizeof(sig_rl->bk[0]); in EpidMemberSetSigRl() 50 if (0 != memcmp(&ctx->pub_key.gid, &sig_rl->gid, sizeof(sig_rl->gid))) { in EpidMemberSetSigRl() 55 if (ctx->sig_rl) { in EpidMemberSetSigRl() 56 uint32_t current_ver = be32toh(ctx->sig_rl->version); in EpidMemberSetSigRl() 57 uint32_t incoming_ver = be32toh(sig_rl->version); in EpidMemberSetSigRl() 64 ctx->sig_rl = (SigRl*)sig_rl; in EpidMemberSetSigRl() 67 if (!ctx->sig_rl) { in EpidMemberSetSigRl() [all …]
|
D | sign.c | 32 size_t EPID_API EpidGetSigSize(SigRl const* sig_rl) { in EpidGetSigSize() argument 34 if (!sig_rl) { in EpidGetSigSize() 37 uint32_t n2 = be32toh(sig_rl->n2); in EpidGetSigSize() 67 if (EpidGetSigSize(ctx->sig_rl) > sig_len) { in EpidSign() 77 if (ctx->sig_rl) { in EpidSign() 88 sig->rl_ver = ctx->sig_rl->version; in EpidSign() 89 sig->n2 = ctx->sig_rl->n2; in EpidSign() 93 num_sig_rl = be32toh(ctx->sig_rl->n2); in EpidSign() 95 sts = EpidNrProve(ctx, msg, msg_len, &sigma0, &ctx->sig_rl->bk[i], in EpidSign()
|
/external/epid-sdk/epid/verifier/unittests/ |
D | nrverify-test.cc | 42 SigRl const* sig_rl = in TEST_F() local 46 this->kTest0.size(), &sig_rl->bk[0], in TEST_F() 50 this->kTest0.size(), &sig_rl->bk[0], in TEST_F() 55 this->kTest0.size(), &sig_rl->bk[0], in TEST_F() 65 this->kTest0.size(), &sig_rl->bk[0], nullptr)); in TEST_F() 77 SigRl const* sig_rl = in TEST_F() local 83 this->kTest0.size(), &sig_rl->bk[0], &nr_proof)); in TEST_F() 92 SigRl const* sig_rl = in TEST_F() local 98 this->kTest0.size(), &sig_rl->bk[0], &nr_proof)); in TEST_F() 107 SigRl const* sig_rl = in TEST_F() local [all …]
|
D | verify-test.cc | 694 auto& sig_rl = this->kGrpXSigRlVersion2; in TEST_F() local 699 THROW_ON_EPIDERR(EpidVerifierSetSigRl(verifier, (SigRl const*)sig_rl.data(), in TEST_F() 700 sig_rl.size())); in TEST_F() 713 auto* sig_rl = in TEST_F() local 718 sig->rl_ver = sig_rl->version; in TEST_F() 722 THROW_ON_EPIDERR(EpidVerifierSetSigRl(verifier, sig_rl, sig_rl_size)); in TEST_F() 736 auto& sig_rl = this->kGrpXSigRlMember0Sha256Bsn0Msg0OnlyEntry; in TEST_F() local 741 THROW_ON_EPIDERR(EpidVerifierSetSigRl(verifier, (SigRl const*)sig_rl.data(), in TEST_F() 742 sig_rl.size())); in TEST_F() 757 auto& sig_rl = this->kGrpXSigRlMember0Sha256Bsn0Msg0FirstEntry; in TEST_F() local [all …]
|
D | context-test.cc | 296 SigRl const* sig_rl = in TEST_F() local 299 EXPECT_EQ(kEpidNoErr, EpidVerifierSetSigRl(ctx, sig_rl, sig_rl_size)); in TEST_F() 305 SigRl const* sig_rl = reinterpret_cast<SigRl const*>(this->kSigRlIkgf.data()); in TEST_F() local 307 EXPECT_EQ(kEpidNoErr, EpidVerifierSetSigRl(ctx, sig_rl, sig_rl_size)); in TEST_F() 323 SigRl* sig_rl = reinterpret_cast<SigRl*>(sig_rl_data_n2_zero); in TEST_F() local 325 EXPECT_EQ(kEpidNoErr, EpidVerifierSetSigRl(verifier, sig_rl, sig_rl_size)); in TEST_F() 330 auto& sig_rl = this->kEmptySigRlIkgf; in TEST_F() local 332 EpidVerifierSetSigRl(verifier, (SigRl const*)sig_rl.data(), in TEST_F() 333 sig_rl.size())); in TEST_F() 359 SigRl* sig_rl = reinterpret_cast<SigRl*>(sig_rl_data_n2_one); in TEST_F() local [all …]
|
/external/epid-sdk/epid/member/unittests/ |
D | nr_prove-test.cc | 45 SigRl const* sig_rl = reinterpret_cast<const SigRl*>(this->kSigRlData.data()); in TEST_F() local 51 basic_sig, &sig_rl->bk[0], &proof)); in TEST_F() 54 basic_sig, &sig_rl->bk[0], &proof)); in TEST_F() 56 0, basic_sig, &sig_rl->bk[0], &proof)); in TEST_F() 59 basic_sig, &sig_rl->bk[0], &proof)); in TEST_F() 62 nullptr, &sig_rl->bk[0], &proof)); in TEST_F() 68 basic_sig, &sig_rl->bk[0], nullptr)); in TEST_F() 78 SigRl const* sig_rl = reinterpret_cast<const SigRl*>(this->kSigRlData.data()); in TEST_F() local 85 SigRlEntry sig_rl_enty_invalid_k = sig_rl->bk[0]; in TEST_F() 91 SigRlEntry sig_rl_enty_invalid_b = sig_rl->bk[0]; in TEST_F() [all …]
|
D | context-test.cc | 329 SigRl const* sig_rl = reinterpret_cast<SigRl const*>(this->kGrpXSigRl.data()); in TEST_F() local 332 EpidMemberSetSigRl(member_ctx, sig_rl, sig_rl_size)); in TEST_F() 352 SigRl const* sig_rl = reinterpret_cast<SigRl const*>(this->kGrpXSigRl.data()); in TEST_F() local 354 EXPECT_EQ(kEpidNoErr, EpidMemberSetSigRl(member_ctx, sig_rl, sig_rl_size)); in TEST_F() 362 std::vector<uint8_t> sig_data(EpidGetSigSize(sig_rl)); in TEST_F() 373 SigRl const* sig_rl = reinterpret_cast<SigRl const*>(this->kGrpXSigRl.data()); in TEST_F() local 375 EXPECT_EQ(kEpidNoErr, EpidMemberSetSigRl(member_ctx, sig_rl, sig_rl_size)); in TEST_F() 391 SigRl* sig_rl = reinterpret_cast<SigRl*>(sig_rl_data_n2_zero); in TEST_F() local 393 EXPECT_EQ(kEpidNoErr, EpidMemberSetSigRl(member_ctx, sig_rl, sig_rl_size)); in TEST_F() 399 SigRl const* sig_rl = in TEST_F() local [all …]
|
D | get_sigsize-test.cc | 90 SigRl const* sig_rl = reinterpret_cast<const SigRl*>(sigrl_bin.data()); in TEST_F() local 94 EXPECT_EQ(sig_size_3_entries, EpidGetSigSize(sig_rl)); in TEST_F()
|
/external/epid-sdk/epid/verifier/1.1/unittests/ |
D | nrverify-test.cc | 45 Epid11SigRl const* sig_rl = in TEST_F() local 49 this->kMsg0.size(), &sig_rl->bk[0], in TEST_F() 55 &sig_rl->bk[0], &epid_signature->sigma[0])); in TEST_F() 59 this->kMsg0.size(), &sig_rl->bk[0], in TEST_F() 70 this->kMsg0.size(), &sig_rl->bk[0], nullptr)); in TEST_F() 80 Epid11SigRl const* sig_rl = in TEST_F() local 88 &sig_rl->bk[0], &nr_proof)); in TEST_F() 92 &sig_rl->bk[0], &nr_proof)); in TEST_F() 101 Epid11SigRl const* sig_rl = in TEST_F() local 108 this->kMsg0.size(), &sig_rl->bk[0], &nr_proof)); in TEST_F() [all …]
|
D | verify-test.cc | 229 auto sig_rl = this->kGrpXSigRlMember0Bsn0Msg0SingleEntry; in TEST_F() local 230 auto sig_rl_size = sig_rl.size(); in TEST_F() 232 Epid11SigRl sig_rl_wrong_ver = *(Epid11SigRl const*)sig_rl.data(); in TEST_F() 247 auto* sig_rl = in TEST_F() local 252 sig->rl_ver = sig_rl->version; in TEST_F() 253 THROW_ON_EPIDERR(Epid11VerifierSetSigRl(verifier, sig_rl, sig_rl_size)); in TEST_F() 624 auto& sig_rl = this->kGrpXSigRlMember0Bsn0Msg0SingleEntry; in TEST_F() local 628 verifier, (Epid11SigRl const*)sig_rl.data(), sig_rl.size())); in TEST_F() 638 auto& sig_rl = this->kGrpXSigRlMember0Bsn0Msg0FirstEntry; in TEST_F() local 642 verifier, (Epid11SigRl const*)sig_rl.data(), sig_rl.size())); in TEST_F() [all …]
|
/external/epid-sdk/epid/member/tiny/unittests/internal/ |
D | nr_prove-test.cc | 42 SigRl const* sig_rl = reinterpret_cast<const SigRl*>(this->kSigRlData.data()); in TEST_F() local 46 &sig_rl->bk[0], &proof)); in TEST_F() 47 SigRlEntry sig_rl_enty_invalid_k = sig_rl->bk[0]; in TEST_F() 53 SigRlEntry sig_rl_enty_invalid_b = sig_rl->bk[0]; in TEST_F() 66 SigRl const* sig_rl = reinterpret_cast<const SigRl*>(this->kSigRlData.data()); in TEST_F() local 71 &sig_rl->bk[0], &proof)); in TEST_F() 77 &sig_rl->bk[0], &proof)); in TEST_F() 86 SigRl const* sig_rl = reinterpret_cast<const SigRl*>(this->kSigRlData.data()); in TEST_F() local 91 &sig_rl->bk[0], &proof)); in TEST_F() 97 EpidNrVerify(ctx, &basic_sig, nullptr, 0, &sig_rl->bk[0], &proof)); in TEST_F() [all …]
|
/external/epid-sdk/epid/common/src/ |
D | sigrlvalid.c | 27 bool IsSigRlValid(GroupId const* gid, SigRl const* sig_rl, size_t sig_rl_size) { in IsSigRlValid() argument 30 if (!gid || !sig_rl || kMinSigRlSize > sig_rl_size) { in IsSigRlValid() 33 if (ntohl(sig_rl->n2) > (SIZE_MAX - kMinSigRlSize) / sizeof(sig_rl->bk[0])) { in IsSigRlValid() 37 input_sig_rl_size = kMinSigRlSize + ntohl(sig_rl->n2) * sizeof(sig_rl->bk[0]); in IsSigRlValid() 42 if (0 != memcmp(gid, &sig_rl->gid, sizeof(*gid))) { in IsSigRlValid()
|
/external/epid-sdk/epid/verifier/1.1/src/ |
D | context.c | 65 bool Epid11IsSigRlValid(Epid11GroupId const* gid, Epid11SigRl const* sig_rl, in Epid11IsSigRlValid() argument 69 if (!gid || !sig_rl || kMinSigRlSize > sig_rl_size) { in Epid11IsSigRlValid() 72 if (ntohl(sig_rl->n2) > (SIZE_MAX - kMinSigRlSize) / sizeof(sig_rl->bk[0])) { in Epid11IsSigRlValid() 76 input_sig_rl_size = kMinSigRlSize + ntohl(sig_rl->n2) * sizeof(sig_rl->bk[0]); in Epid11IsSigRlValid() 81 if (0 != memcmp(gid, &sig_rl->gid, sizeof(*gid))) { in Epid11IsSigRlValid() 160 verifier_ctx->sig_rl = NULL; in Epid11VerifierCreate() 186 (*ctx)->sig_rl = NULL; in Epid11VerifierDelete() 251 Epid11SigRl const* sig_rl, in Epid11VerifierSetSigRl() argument 253 if (!ctx || !sig_rl || !ctx->pub_key) { in Epid11VerifierSetSigRl() 257 if (ctx->sig_rl) { in Epid11VerifierSetSigRl() [all …]
|
D | verify.c | 156 if (0 < rl_count && !ctx->sig_rl) { in Epid11Verify() 169 if (ctx->sig_rl) { in Epid11Verify() 170 if (0 != memcmp(&ctx->pub_key->gid, &ctx->sig_rl->gid, in Epid11Verify() 196 if (ctx->sig_rl) { in Epid11Verify() 197 size_t sigrl_count = Epid11GetSigRlCount(ctx->sig_rl); in Epid11Verify() 201 if (0 != memcmp(&ctx->sig_rl->version, &sig->rl_ver, in Epid11Verify() 202 sizeof(ctx->sig_rl->version))) { in Epid11Verify() 232 if (ctx->sig_rl) { in Epid11Verify() 233 size_t sigrl_count = Epid11GetSigRlCount(ctx->sig_rl); in Epid11Verify() 236 sts = Epid11NrVerify(ctx, &sig->sigma0, msg, msg_len, &ctx->sig_rl->bk[i], in Epid11Verify()
|
/external/epid-sdk/epid/member/src/ |
D | sign.c | 55 if (EpidGetSigSize(ctx->sig_rl) > sig_len) { in EpidSign() 66 if (!ctx->sig_rl) { in EpidSign() 83 sig->rl_ver = ctx->sig_rl->version; in EpidSign() 84 sig->n2 = ctx->sig_rl->n2; in EpidSign() 88 num_sig_rl = ntohl(ctx->sig_rl->n2); in EpidSign() 92 &sig->sigma0, &ctx->sig_rl->bk[i], &sig->sigma[i]); in EpidSign() 95 &sig->sigma0, &ctx->sig_rl->bk[i], &sig->sigma[i]); in EpidSign()
|
D | get_sigsize.c | 24 size_t EpidGetSigSize(SigRl const* sig_rl) { in EpidGetSigSize() argument 26 if (!sig_rl) { in EpidGetSigSize() 29 if (ntohl(sig_rl->n2) > (SIZE_MAX - kMinSigSize) / sizeof(NrProof)) { in EpidGetSigSize() 32 return kMinSigSize + ntohl(sig_rl->n2) * sizeof(NrProof); in EpidGetSigSize()
|
D | context.c | 69 ctx->sig_rl = NULL; in EpidMemberInit() 236 EpidStatus EpidMemberSetSigRl(MemberCtx* ctx, SigRl const* sig_rl, in EpidMemberSetSigRl() argument 238 if (!ctx || !sig_rl) { in EpidMemberSetSigRl() 244 if (!IsSigRlValid(&ctx->pub_key.gid, sig_rl, sig_rl_size)) { in EpidMemberSetSigRl() 248 if (ctx->sig_rl) { in EpidMemberSetSigRl() 251 current_ver = ntohl(ctx->sig_rl->version); in EpidMemberSetSigRl() 252 incoming_ver = ntohl(sig_rl->version); in EpidMemberSetSigRl() 257 ctx->sig_rl = sig_rl; in EpidMemberSetSigRl()
|
/external/epid-sdk/example/signmsg/src/ |
D | signmsg.c | 45 SigRl* sig_rl = NULL; in SignMsg() local 147 sig_rl = calloc(1, sig_rl_size); in SignMsg() 148 if (!sig_rl) { in SignMsg() 155 sig_rl, &sig_rl_size); in SignMsg() 164 sts = EpidMemberSetSigRl(member, sig_rl, sig_rl_size); in SignMsg() 172 *sig_len = EpidGetSigSize(sig_rl); in SignMsg() 193 if (sig_rl) free(sig_rl); in SignMsg()
|
/external/epid-sdk/example/verifysig/src/ |
D | verifysig11.c | 40 Epid11SigRl* sig_rl = NULL; in Verify11() local 118 sig_rl = calloc(1, sig_rl_size); in Verify11() 119 if (!sig_rl) { in Verify11() 126 sig_rl, &sig_rl_size); in Verify11() 132 result = Epid11VerifierSetSigRl(ctx, sig_rl, sig_rl_size); in Verify11() 177 if (sig_rl) free(sig_rl); in Verify11()
|
D | verifysig.c | 41 SigRl* sig_rl = NULL; in Verify() local 125 sig_rl = calloc(1, sig_rl_size); in Verify() 126 if (!sig_rl) { in Verify() 133 sig_rl, &sig_rl_size); in Verify() 139 result = EpidVerifierSetSigRl(ctx, sig_rl, sig_rl_size); in Verify() 192 if (sig_rl) free(sig_rl); in Verify()
|
/external/epid-sdk/epid/verifier/src/ |
D | verify.c | 136 if (ctx->sig_rl) { in EpidVerify() 137 size_t sigrl_count = EpidGetSigRlCount(ctx->sig_rl); in EpidVerify() 140 if (0 != memcmp(&ctx->pub_key->gid, &ctx->sig_rl->gid, in EpidVerify() 147 if (0 != memcmp(&ctx->sig_rl->version, &sig->rl_ver, in EpidVerify() 148 sizeof(ctx->sig_rl->version))) { in EpidVerify() 162 sts = EpidNrVerify(ctx, &sig->sigma0, msg, msg_len, &ctx->sig_rl->bk[i], in EpidVerify()
|
D | context.c | 182 verifier_ctx->sig_rl = NULL; in EpidVerifierCreate() 215 (*ctx)->sig_rl = NULL; in EpidVerifierDelete() 290 EpidStatus EpidVerifierSetSigRl(VerifierCtx* ctx, SigRl const* sig_rl, in EpidVerifierSetSigRl() argument 292 if (!ctx || !sig_rl || !ctx->pub_key) { in EpidVerifierSetSigRl() 295 if (!IsSigRlValid(&ctx->pub_key->gid, sig_rl, sig_rl_size)) { in EpidVerifierSetSigRl() 299 if (ctx->sig_rl) { in EpidVerifierSetSigRl() 302 current_ver = ntohl(ctx->sig_rl->version); in EpidVerifierSetSigRl() 303 incoming_ver = ntohl(sig_rl->version); in EpidVerifierSetSigRl() 308 ctx->sig_rl = sig_rl; in EpidVerifierSetSigRl()
|
/external/epid-sdk/epid/member/tiny/unittests/ |
D | context-test.cc | 286 SigRl const* sig_rl = reinterpret_cast<SigRl const*>(this->kGrpXSigRl.data()); in TEST_F() local 289 EpidMemberSetSigRl(member_ctx, sig_rl, sig_rl_size)); in TEST_F() 309 SigRl const* sig_rl = reinterpret_cast<SigRl const*>(this->kGrpXSigRl.data()); in TEST_F() local 311 EXPECT_EQ(kEpidNoErr, EpidMemberSetSigRl(member_ctx, sig_rl, sig_rl_size)); in TEST_F() 319 std::vector<uint8_t> sig_data(EpidGetSigSize(sig_rl)); in TEST_F() 330 SigRl const* sig_rl = &srl; in TEST_F() local 333 EpidMemberSetSigRl(member_ctx, sig_rl, sig_rl_size)); in TEST_F() 339 SigRl const* sig_rl = reinterpret_cast<SigRl const*>(this->kGrpXSigRl.data()); in TEST_F() local 341 EXPECT_EQ(kEpidNoErr, EpidMemberSetSigRl(member_ctx, sig_rl, sig_rl_size)); in TEST_F() 357 SigRl* sig_rl = reinterpret_cast<SigRl*>(sig_rl_data_n2_zero); in TEST_F() local [all …]
|
D | get_sigsize-test.cc | 87 SigRl const* sig_rl = reinterpret_cast<const SigRl*>(sigrl_bin.data()); in TEST_F() local 91 EXPECT_EQ(sig_size_3_entries, EpidGetSigSize(sig_rl)); in TEST_F()
|
/external/epid-sdk/epid/member/ |
D | api.h | 274 EpidStatus EPID_API EpidMemberSetSigRl(MemberCtx* ctx, SigRl const* sig_rl, 293 size_t EPID_API EpidGetSigSize(SigRl const* sig_rl);
|