Home
last modified time | relevance | path

Searched refs:sig_len (Results 1 – 25 of 73) sorted by relevance

123

/external/epid-sdk/epid/member/unittests/
Dsign-test.cc115 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/
Dsign-test.cc145 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/
Drsa-verify.c75 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/
Dlibkmod-signature.c95 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/
Dverify-test.cc279 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/
Decdsa_asn1.c70 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/
Dsign.cc70 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()
Dspeed.cc175 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/
Drsa.h54 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
Drsa-mod-exp.h39 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/
Devp_extra_test.cc385 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 …]
Dsign.c84 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()
Ddigestsign.c176 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()
Devp_ctx.c226 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/
Dverify_data.c52 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/
Dfsl_rsa.c18 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/
Drsa.c132 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/
Dsign.c122 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/
Dsignmsg.c41 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/
Dcavp_rsa2_siggen_test.cc80 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()
Dtest_fips.c186 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/
Drsa_verify_benchmark.c25 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/
Dmod_exp_uclass.c16 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()
Dmod_exp_sw.c12 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/
Djson_token.cc255 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()

123