/external/epid-sdk/epid/member/unittests/ |
D | sign-test.cc | 115 size_t sig_len = sig_data.size() * sizeof(uint8_t); in TEST_F() local 117 EpidSign(member, msg.data(), msg.size(), nullptr, 0, sig, sig_len)); in TEST_F() 235 size_t sig_len = sig_data.size() * sizeof(uint8_t); in TEST_F() local 237 EpidSign(member, msg.data(), msg.size(), nullptr, 0, sig, sig_len)); in TEST_F() 240 EpidVerify(ctx, sig, sig_len, msg.data(), msg.size())); in TEST_F() 252 size_t sig_len = sig_data.size() * sizeof(uint8_t); in TEST_F() local 255 EpidSign(member, msg.data(), msg.size(), nullptr, 0, sig, sig_len)); in TEST_F() 259 EpidVerify(ctx, sig, sig_len, msg.data(), msg.size())); in TEST_F() 271 size_t sig_len = sig_data.size() * sizeof(uint8_t); in TEST_F() local 273 bsn.size(), sig, sig_len)); in TEST_F() [all …]
|
/external/epid-sdk/epid/member/tiny/unittests/ |
D | sign-test.cc | 145 size_t sig_len = sig_data.size() * sizeof(uint8_t); in TEST_F() local 147 EpidSign(member, msg.data(), msg.size(), nullptr, 0, sig, sig_len)); in TEST_F() 264 size_t sig_len = sig_data.size() * sizeof(uint8_t); in TEST_F() local 266 EpidSign(member, msg.data(), msg.size(), nullptr, 0, sig, sig_len)); in TEST_F() 269 EpidVerify(ctx, sig, sig_len, msg.data(), msg.size())); in TEST_F() 281 size_t sig_len = sig_data.size() * sizeof(uint8_t); in TEST_F() local 284 EpidSign(member, msg.data(), msg.size(), nullptr, 0, sig, sig_len)); in TEST_F() 288 EpidVerify(ctx, sig, sig_len, msg.data(), msg.size())); in TEST_F() 300 size_t sig_len = sig_data.size() * sizeof(uint8_t); in TEST_F() local 302 bsn.size(), sig, sig_len)); in TEST_F() [all …]
|
/external/u-boot/lib/rsa/ |
D | rsa-verify.c | 75 const uint32_t sig_len, const uint8_t *hash, in rsa_verify_key() argument 87 if (sig_len != (prop->num_bits / 8)) { in rsa_verify_key() 88 debug("Signature is of incorrect length %d\n", sig_len); in rsa_verify_key() 95 if (sig_len > RSA_MAX_SIG_BITS / 8) { in rsa_verify_key() 96 debug("Signature length %u exceeds maximum %d\n", sig_len, in rsa_verify_key() 101 uint8_t buf[sig_len]; in rsa_verify_key() 110 ret = rsa_mod_exp(mod_exp_dev, sig, sig_len, prop, buf); in rsa_verify_key() 112 ret = rsa_mod_exp_sw(sig, sig_len, prop, buf); in rsa_verify_key() 129 if (memcmp((uint8_t *)buf + pad_len, hash, sig_len - pad_len)) { in rsa_verify_key() 154 uint sig_len, int node) in rsa_verify_with_keynode() argument [all …]
|
/external/kmod/libkmod/ |
D | libkmod-signature.c | 95 uint32_t sig_len; /* Length of signature data (big endian) */ member 99 const struct module_signature *modsig, size_t sig_len, in fill_default() argument 102 size -= sig_len; in fill_default() 104 sig_info->sig_len = sig_len; in fill_default() 195 const struct module_signature *modsig, size_t sig_len, in fill_pkcs7() argument 217 size -= sig_len; in fill_pkcs7() 220 in = BIO_new_mem_buf(pkcs7_raw, sig_len); in fill_pkcs7() 249 sig_info->sig_len = ASN1_STRING_length(sig); in fill_pkcs7() 299 const struct module_signature *modsig, size_t sig_len, in fill_pkcs7() argument 327 size_t sig_len; in kmod_module_signature_info() local [all …]
|
/external/epid-sdk/epid/verifier/1.1/unittests/ |
D | verify-test.cc | 279 size_t sig_len = this->kSigGrpXMember0Sha256Bsn0Msg0.size(); in TEST_F() local 287 Epid11Verify(verifier, &sig, sig_len, msg.data(), msg.size())); in TEST_F() 299 size_t sig_len = this->kSigGrpXMember0Sha256RandbaseMsg0.size(); in TEST_F() local 305 Epid11Verify(verifier, &sig, sig_len, msg.data(), msg.size())); in TEST_F() 317 size_t sig_len = this->kSigGrpXMember0Sha256Bsn0Msg0.size(); in TEST_F() local 325 Epid11Verify(verifier, &sig, sig_len, msg.data(), msg.size())); in TEST_F() 337 size_t sig_len = this->kSigGrpXMember0Sha256RandbaseMsg0.size(); in TEST_F() local 343 Epid11Verify(verifier, &sig, sig_len, msg.data(), msg.size())); in TEST_F() 355 size_t sig_len = this->kSigGrpXMember0Sha256RandbaseMsg0.size(); in TEST_F() local 361 Epid11Verify(verifier, &sig, sig_len, msg.data(), msg.size())); in TEST_F() [all …]
|
/external/boringssl/src/crypto/ecdsa_extra/ |
D | ecdsa_asn1.c | 70 unsigned int *sig_len, const EC_KEY *eckey) { in ECDSA_sign() argument 72 return eckey->ecdsa_meth->sign(digest, digest_len, sig, sig_len, in ECDSA_sign() 79 *sig_len = 0; in ECDSA_sign() 91 *sig_len = 0; in ECDSA_sign() 94 *sig_len = (unsigned)len; in ECDSA_sign() 103 const uint8_t *sig, size_t sig_len, const EC_KEY *eckey) { in ECDSA_verify() argument 109 s = ECDSA_SIG_from_bytes(sig, sig_len); in ECDSA_verify() 117 der_len != sig_len || OPENSSL_memcmp(sig, der, sig_len) != 0) { in ECDSA_verify()
|
/external/boringssl/src/tool/ |
D | sign.cc | 70 size_t sig_len = EVP_PKEY_size(key.get()); in Sign() local 71 std::unique_ptr<uint8_t[]> sig(new uint8_t[sig_len]); in Sign() 72 if (!EVP_DigestSign(ctx.get(), sig.get(), &sig_len, data.data(), in Sign() 77 if (fwrite(sig.get(), 1, sig_len, stdout) != sig_len) { in Sign()
|
D | speed.cc | 175 unsigned sig_len; in SpeedRSA() local 179 [&key, &sig, &fake_sha256_hash, &sig_len]() -> bool { in SpeedRSA() 184 sig.get(), &sig_len, key.get()); in SpeedRSA() 193 [&key, &fake_sha256_hash, &sig, sig_len]() -> bool { in SpeedRSA() 196 sig.get(), sig_len, key.get()); in SpeedRSA() 205 [&key, &fake_sha256_hash, &sig, sig_len]() -> bool { in SpeedRSA() 222 sizeof(fake_sha256_hash), sig.get(), sig_len, in SpeedRSA() 590 unsigned sig_len; in SpeedECDSACurve() local 593 if (!TimeFunction(&results, [&key, &signature, &digest, &sig_len]() -> bool { in SpeedECDSACurve() 594 return ECDSA_sign(0, digest, sizeof(digest), signature, &sig_len, in SpeedECDSACurve() [all …]
|
/external/u-boot/include/u-boot/ |
D | rsa.h | 54 int region_count, uint8_t **sigp, uint *sig_len); 72 uint8_t **sigp, uint *sig_len) in rsa_sign() argument 99 uint8_t *sig, uint sig_len); 103 uint8_t *sig, uint sig_len) in rsa_verify() argument
|
D | rsa-mod-exp.h | 39 int rsa_mod_exp_sw(const uint8_t *sig, uint32_t sig_len, 42 int rsa_mod_exp(struct udevice *dev, const uint8_t *sig, uint32_t sig_len, 70 uint32_t sig_len, struct key_prop *node,
|
/external/boringssl/src/crypto/evp/ |
D | evp_extra_test.cc | 385 size_t sig_len = 0; in TEST() local 386 ASSERT_TRUE(EVP_DigestSignFinal(md_ctx.get(), NULL, &sig_len)); in TEST() 389 EXPECT_EQ(static_cast<size_t>(EVP_PKEY_size(pkey.get())), sig_len); in TEST() 392 sig.resize(sig_len); in TEST() 393 ASSERT_TRUE(EVP_DigestSignFinal(md_ctx.get(), sig.data(), &sig_len)); in TEST() 394 sig.resize(sig_len); in TEST() 401 ASSERT_TRUE(EVP_DigestVerifyFinal(md_ctx.get(), sig.data(), sig_len)); in TEST() 423 unsigned sig_len = sizeof(sig); in TEST() local 425 &sig_len, rsa.get())); in TEST() 433 EVP_PKEY_verify_recover(ctx.get(), nullptr, &out_len, sig, sig_len)); in TEST() [all …]
|
D | sign.c | 84 size_t sig_len = EVP_PKEY_size(pkey); in EVP_SignFinal() local 97 !EVP_PKEY_sign(pkctx, sig, &sig_len, m, m_len)) { in EVP_SignFinal() 100 *out_sig_len = sig_len; in EVP_SignFinal() 123 int EVP_VerifyFinal(EVP_MD_CTX *ctx, const uint8_t *sig, size_t sig_len, in EVP_VerifyFinal() argument 145 ret = EVP_PKEY_verify(pkctx, sig, sig_len, m, m_len); in EVP_VerifyFinal()
|
D | digestsign.c | 176 size_t sig_len) { in EVP_DigestVerifyFinal() argument 190 EVP_PKEY_verify(ctx->pctx, sig, sig_len, md, mdlen); in EVP_DigestVerifyFinal() 218 int EVP_DigestVerify(EVP_MD_CTX *ctx, const uint8_t *sig, size_t sig_len, in EVP_DigestVerify() argument 222 EVP_DigestVerifyFinal(ctx, sig, sig_len); in EVP_DigestVerify() 230 return ctx->pctx->pmeth->verify_message(ctx->pctx, sig, sig_len, data, len); in EVP_DigestVerify()
|
D | evp_ctx.c | 226 int EVP_PKEY_sign(EVP_PKEY_CTX *ctx, uint8_t *sig, size_t *sig_len, in EVP_PKEY_sign() argument 236 return ctx->pmeth->sign(ctx, sig, sig_len, digest, digest_len); in EVP_PKEY_sign() 249 int EVP_PKEY_verify(EVP_PKEY_CTX *ctx, const uint8_t *sig, size_t sig_len, in EVP_PKEY_verify() argument 259 return ctx->pmeth->verify(ctx, sig, sig_len, digest, digest_len); in EVP_PKEY_verify() 316 const uint8_t *sig, size_t sig_len) { in EVP_PKEY_verify_recover() argument 325 return ctx->pmeth->verify_recover(ctx, out, out_len, sig, sig_len); in EVP_PKEY_verify_recover()
|
/external/vboot_reference/utility/ |
D | verify_data.c | 52 int i, algorithm, sig_len; in main() local 74 sig_len = siglen_map[algorithm]; in main() 76 (signature = read_signature(argv[3], sig_len)) && in main() 78 if (RSAVerify(key, signature, sig_len, algorithm, digest)) { in main()
|
/external/u-boot/drivers/crypto/fsl/ |
D | fsl_rsa.c | 18 int fsl_mod_exp(struct udevice *dev, const uint8_t *sig, uint32_t sig_len, in fsl_mod_exp() argument 30 pkin.a_siz = sig_len; in fsl_mod_exp() 36 inline_cnstr_jobdesc_pkha_rsaexp(desc, &pkin, out, sig_len); in fsl_mod_exp()
|
/external/vboot_reference/firmware/lib/cryptolib/ |
D | rsa.c | 132 const uint32_t sig_len, in RSAVerify() argument 143 if (sig_len != (key->len * sizeof(uint32_t))) { in RSAVerify() 158 buf = (uint8_t*) VbExMalloc(sig_len); in RSAVerify() 161 Memcpy(buf, sig, sig_len); in RSAVerify() 179 if (SafeMemcmp(buf + padding_len, hash, sig_len - padding_len)) { in RSAVerify()
|
/external/fsverity-utils/ |
D | sign.c | 122 size_t pkcs7_data_len, sig_len; in sign_pkcs7() local 145 sig_len = EVP_PKEY_size(pkey); in sign_pkcs7() 146 sig = xmalloc(sig_len); in sign_pkcs7() 147 if (!EVP_DigestSign(&md_ctx, sig, &sig_len, data_to_sign, data_size)) { in sign_pkcs7() 195 !CBB_add_bytes(&signature, sig, sig_len) || in sign_pkcs7() 215 compare_fsverity_digest_pkcs7(const void *sig, size_t sig_len, in compare_fsverity_digest_pkcs7() argument 223 CBS_init(&in, sig, sig_len); in compare_fsverity_digest_pkcs7() 337 compare_fsverity_digest_pkcs7(const void *sig, size_t sig_len, in compare_fsverity_digest_pkcs7() argument 345 bio = new_mem_buf(sig, sig_len); in compare_fsverity_digest_pkcs7()
|
/external/epid-sdk/example/signmsg/src/ |
D | signmsg.c | 41 size_t* sig_len, EpidCaCertificate const* cacert) { in SignMsg() argument 172 *sig_len = EpidGetSigSize(sig_rl); in SignMsg() 174 *sig = calloc(1, *sig_len); in SignMsg() 182 EpidSign(member, msg, msg_len, basename, basename_len, *sig, *sig_len); in SignMsg()
|
/external/boringssl/src/fipstools/ |
D | cavp_rsa2_siggen_test.cc | 80 size_t sig_len; in TestRSA2SigGen() local 87 if (!RSA_sign_pss_mgf1(ctx->key.get(), &sig_len, sig.data(), sig.size(), in TestRSA2SigGen() 97 sig_len = sig_len_u; in TestRSA2SigGen() 101 EncodeHex(sig.data(), sig_len).c_str()); in TestRSA2SigGen()
|
D | test_fips.c | 186 unsigned sig_len; in main() local 190 &sig_len, rsa_key)) { in main() 195 hexdump(output, sig_len); in main() 199 hexdump(output, sig_len); in main() 201 output, sig_len, rsa_key)) { in main()
|
/external/vboot_reference/tests/ |
D | rsa_verify_benchmark.c | 25 uint64_t digest_len, sig_len; in SpeedTestAlgorithm() local 58 signature = BufferFromFile(file_name, &sig_len); in SpeedTestAlgorithm() 67 if (!RSAVerify(key, signature, sig_len, algorithm, digest)) in SpeedTestAlgorithm()
|
/external/u-boot/drivers/crypto/rsa_mod_exp/ |
D | mod_exp_uclass.c | 16 int rsa_mod_exp(struct udevice *dev, const uint8_t *sig, uint32_t sig_len, in rsa_mod_exp() argument 24 return ops->mod_exp(dev, sig, sig_len, node, out); in rsa_mod_exp()
|
D | mod_exp_sw.c | 12 int mod_exp_sw(struct udevice *dev, const uint8_t *sig, uint32_t sig_len, in mod_exp_sw() argument 17 ret = rsa_mod_exp_sw(sig, sig_len, prop, out); in mod_exp_sw()
|
/external/grpc-grpc/src/core/lib/security/credentials/jwt/ |
D | json_token.cc | 255 size_t sig_len = 0; in compute_and_encode_signature() local 273 if (EVP_DigestSignFinal(md_ctx, nullptr, &sig_len) != 1) { in compute_and_encode_signature() 277 sig = static_cast<unsigned char*>(gpr_malloc(sig_len)); in compute_and_encode_signature() 278 if (EVP_DigestSignFinal(md_ctx, sig, &sig_len) != 1) { in compute_and_encode_signature() 282 result = grpc_base64_encode(sig, sig_len, 1, 0); in compute_and_encode_signature()
|