Home
last modified time | relevance | path

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

12

/external/boringssl/src/crypto/evp/
Devp_extra_test.cc463 size_t sig_len = 0; in TestEVP_DigestSignInit() local
464 if (!EVP_DigestSignFinal(md_ctx.get(), NULL, &sig_len)) { in TestEVP_DigestSignInit()
468 if (sig_len != (size_t)EVP_PKEY_size(pkey.get())) { in TestEVP_DigestSignInit()
474 sig.resize(sig_len); in TestEVP_DigestSignInit()
475 if (!EVP_DigestSignFinal(md_ctx.get(), sig.data(), &sig_len)) { in TestEVP_DigestSignInit()
478 sig.resize(sig_len); in TestEVP_DigestSignInit()
485 !EVP_DigestVerifyFinal(md_ctx.get(), sig.data(), sig_len)) { in TestEVP_DigestSignInit()
520 size_t sig_len = 0; in TestAlgorithmRoundtrip() local
521 if (!EVP_DigestSignFinal(md_ctx, NULL, &sig_len)) { in TestAlgorithmRoundtrip()
525 if (sig_len != (size_t)EVP_PKEY_size(pkey)) { in TestAlgorithmRoundtrip()
[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.c146 size_t sig_len) { in EVP_DigestVerifyFinal() argument
155 EVP_PKEY_verify(ctx->pctx, sig, sig_len, md, mdlen); in EVP_DigestVerifyFinal()
Devp_ctx.c244 int EVP_PKEY_sign(EVP_PKEY_CTX *ctx, uint8_t *sig, size_t *sig_len, in EVP_PKEY_sign() argument
254 return ctx->pmeth->sign(ctx, sig, sig_len, data, data_len); in EVP_PKEY_sign()
274 int EVP_PKEY_verify(EVP_PKEY_CTX *ctx, const uint8_t *sig, size_t sig_len, in EVP_PKEY_verify() argument
284 return ctx->pmeth->verify(ctx, sig, sig_len, data, data_len); in EVP_PKEY_verify()
/external/dbus/dbus/
Ddbus-marshal-byteswap.c147 dbus_uint32_t sig_len; in byteswap_body_helper() local
149 sig_len = *p; in byteswap_body_helper()
151 p += (sig_len + 2); /* +2 for len and nul */ in byteswap_body_helper()
160 dbus_uint32_t sig_len; in byteswap_body_helper() local
165 sig_len = *p; in byteswap_body_helper()
168 _dbus_string_init_const_len (&sig, p, sig_len); in byteswap_body_helper()
170 p += (sig_len + 1); /* 1 for nul */ in byteswap_body_helper()
Ddbus-marshal-recursive.c277 int sig_len; in variant_reader_recurse() local
286 sig_len = _dbus_string_get_byte (sub->value_str, sub->value_pos); in variant_reader_recurse()
291 sub->value_pos = sub->type_pos + sig_len + 1; in variant_reader_recurse()
2461 int sig_len; in writer_write_reader_helper() local
2496 &sig_start, &sig_len); in writer_write_reader_helper()
2513 sig_str, sig_start, sig_len, in writer_write_reader_helper()
Ddbus-marshal-recursive-util.c1154 int sig_len; in run_test_values_only_write() local
1162 sig_len = _dbus_string_get_length (nid->signature); in run_test_values_only_write()
1185 _dbus_assert (sig_len == _dbus_string_get_length (nid->signature)); in run_test_values_only_write()
/external/boringssl/src/crypto/ecdsa/
Decdsa.c67 unsigned int *sig_len, EC_KEY *eckey) { in ECDSA_sign() argument
69 return eckey->ecdsa_meth->sign(digest, digest_len, sig, sig_len, eckey); in ECDSA_sign()
72 return ECDSA_sign_ex(type, digest, digest_len, sig, sig_len, NULL, NULL, in ECDSA_sign()
77 const uint8_t *sig, size_t sig_len, EC_KEY *eckey) { in ECDSA_verify() argument
83 return eckey->ecdsa_meth->verify(digest, digest_len, sig, sig_len, eckey); in ECDSA_verify()
87 s = ECDSA_SIG_from_bytes(sig, sig_len); in ECDSA_verify()
95 der_len != sig_len || memcmp(sig, der, sig_len) != 0) { in ECDSA_verify()
462 uint8_t *sig, unsigned int *sig_len, const BIGNUM *kinv, in ECDSA_sign_ex() argument
469 *sig_len = 0; in ECDSA_sign_ex()
475 *sig_len = 0; in ECDSA_sign_ex()
[all …]
Decdsa_test.cc214 unsigned sig_len = ECDSA_size(eckey.get()); in TestBuiltin() local
215 std::vector<uint8_t> signature(sig_len); in TestBuiltin()
216 if (!ECDSA_sign(0, digest, 20, signature.data(), &sig_len, eckey.get())) { in TestBuiltin()
220 signature.resize(sig_len); in TestBuiltin()
/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/boringssl/src/tool/
Dspeed.cc141 unsigned sig_len; in SpeedRSA() local
145 [key, &sig, &fake_sha256_hash, &sig_len]() -> bool { in SpeedRSA()
147 sig.get(), &sig_len, key); in SpeedRSA()
156 [key, &fake_sha256_hash, &sig, sig_len]() -> bool { in SpeedRSA()
158 sizeof(fake_sha256_hash), sig.get(), sig_len, key); in SpeedRSA()
363 unsigned sig_len; in SpeedECDSACurve() local
366 if (!TimeFunction(&results, [&key, &signature, &digest, &sig_len]() -> bool { in SpeedECDSACurve()
367 return ECDSA_sign(0, digest, sizeof(digest), signature, &sig_len, in SpeedECDSACurve()
375 if (!TimeFunction(&results, [&key, &signature, &digest, sig_len]() -> bool { in SpeedECDSACurve()
376 return ECDSA_verify(0, digest, sizeof(digest), signature, sig_len, in SpeedECDSACurve()
/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/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()
Drsa_utility_tests.c31 const uint32_t sig_len, in RSAVerify() argument
/external/boringssl/src/include/openssl/
Decdsa.h78 unsigned int *sig_len, EC_KEY *key);
86 size_t sig_len, EC_KEY *key);
145 unsigned int *sig_len, const BIGNUM *kinv,
Devp.h295 size_t sig_len);
362 size_t sig_len, EVP_PKEY *pkey);
456 size_t *sig_len, const uint8_t *data,
470 size_t sig_len, const uint8_t *data,
Dec_key.h260 unsigned int *sig_len, EC_KEY *eckey);
264 size_t sig_len, EC_KEY *eckey);
Ddsa.h202 size_t sig_len, const DSA *dsa);
212 size_t sig_len, const DSA *dsa);
Drsa.h219 const uint8_t *sig, size_t sig_len, RSA *rsa);
/external/boringssl/src/crypto/dsa/
Ddsa.c704 const uint8_t *sig, size_t sig_len, const DSA *dsa) { in DSA_verify() argument
706 if (!DSA_check_signature(&valid, digest, digest_len, sig, sig_len, dsa)) { in DSA_verify()
713 size_t digest_len, const uint8_t *sig, size_t sig_len, in DSA_check_signature() argument
725 if (d2i_DSA_SIG(&s, &sigp, sig_len) == NULL || sigp != sig + sig_len) { in DSA_check_signature()
731 if (der_len < 0 || (size_t)der_len != sig_len || memcmp(sig, der, sig_len)) { in DSA_check_signature()
Ddsa_test.c257 static int test_verify(const uint8_t *sig, size_t sig_len, int expect) { in test_verify() argument
264 int ret = DSA_verify(0, fips_digest, sizeof(fips_digest), sig, sig_len, dsa); in test_verify()
/external/vboot_reference/firmware/lib/cryptolib/include/
Drsa.h38 const uint32_t sig_len,
/external/boringssl/src/crypto/rsa/
Drsa.c475 const uint8_t *sig, size_t sig_len, RSA *rsa) { in RSA_verify() argument
484 return rsa->meth->verify(hash_nid, msg, msg_len, sig, sig_len, rsa); in RSA_verify()
487 if (sig_len != rsa_size) { in RSA_verify()
503 if (!RSA_verify_raw(rsa, &len, buf, rsa_size, sig, sig_len, in RSA_verify()
/external/boringssl/src/ssl/
Ds3_srvr.c1296 size_t sig_len; in ssl3_send_server_key_exchange() local
1339 sign_result = ssl_private_key_sign(ssl, ptr, &sig_len, max_sig_len, md, in ssl3_send_server_key_exchange()
1351 ssl_private_key_sign_complete(ssl, ptr, &sig_len, max_sig_len); in ssl3_send_server_key_exchange()
1357 if (!CBB_did_write(&child, sig_len)) { in ssl3_send_server_key_exchange()
Ds3_clnt.c1792 size_t sig_len; in ssl3_send_cert_verify() local
1823 sign_result = ssl_private_key_sign(ssl, ptr, &sig_len, max_sig_len, md, in ssl3_send_cert_verify()
1837 ssl_private_key_sign_complete(ssl, ptr, &sig_len, max_sig_len); in ssl3_send_cert_verify()
1854 if (!CBB_did_write(&child, sig_len) || in ssl3_send_cert_verify()

12