Home
last modified time | relevance | path

Searched refs:signature (Results 1 – 25 of 83) sorted by relevance

1234

/system/core/trusty/keymaster/legacy/
Dtrusty_keymaster_device_test.cpp184 uint8_t* signature; in TEST_F() local
187 &signature, &siglen)); in TEST_F()
188 Malloc_Delete sig_deleter(signature); in TEST_F()
203 uint8_t* signature; in TEST_F() local
206 message_len, &signature, &siglen)); in TEST_F()
220 uint8_t* signature; in TEST_F() local
223 message_len, &signature, &siglen)); in TEST_F()
236 uint8_t* signature; in TEST_F() local
239 array_size(message) - 1, &signature, &siglen)); in TEST_F()
240 Malloc_Delete sig_deleter(signature); in TEST_F()
[all …]
Dtrusty_keymaster_main.cpp146 keymaster_blob_t* signature, keymaster_blob_t* output) { in do_operation() argument
170 error = device->finish(op_handle, nullptr, nullptr, signature, nullptr, output); in do_operation()
198 keymaster_blob_t input = {message.get(), message_len}, signature; in test_import_rsa() local
200 if (!do_operation(device, KM_PURPOSE_SIGN, &key, &input, nullptr, &signature)) { in test_import_rsa()
204 std::unique_ptr<const uint8_t[]> signature_deleter(signature.data); in test_import_rsa()
207 if (!do_operation(device, KM_PURPOSE_VERIFY, &key, &input, &signature, nullptr)) { in test_import_rsa()
234 keymaster_blob_t input = {message.get(), message_len}, signature; in test_rsa() local
236 if (!do_operation(device, KM_PURPOSE_SIGN, &key, &input, nullptr, &signature)) { in test_rsa()
240 std::unique_ptr<const uint8_t[]> signature_deleter(signature.data); in test_rsa()
243 if (!do_operation(device, KM_PURPOSE_VERIFY, &key, &input, &signature, nullptr)) { in test_rsa()
[all …]
/system/tools/aidl/
Dgenerate_aidl_mappings.cpp38 std::stringstream signature; in generate_mappings() local
39 signature << interface->GetCanonicalName() << "|"; in generate_mappings()
40 signature << method->GetName() << "|"; in generate_mappings()
42 signature << arg->GetType().ToString() << ","; in generate_mappings()
44 signature << "|"; in generate_mappings()
45 signature << method->GetType().GetLanguageType<java::Type>()->JavaType(); in generate_mappings()
46 mappings[signature.str()] = dump_location(*method); in generate_mappings()
/system/update_engine/payload_generator/
Dpayload_signer_unittest.cc110 string signature; in TEST_F() local
111 SignSampleData(&signature, {GetBuildArtifactsPath(kUnittestPrivateKeyPath)}); in TEST_F()
115 EXPECT_TRUE(signatures.ParseFromString(signature)); in TEST_F()
127 string signature; in TEST_F() local
128 SignSampleData(&signature, in TEST_F()
138 PayloadVerifier::VerifySignature(signature, public_key, hash_data_)); in TEST_F()
142 PayloadVerifier::VerifySignature(signature, public_key, hash_data_)); in TEST_F()
146 PayloadVerifier::VerifySignature(signature, public_key, hash_data_)); in TEST_F()
150 string signature; in TEST_F() local
151 SignSampleData(&signature, {GetBuildArtifactsPath(kUnittestPrivateKeyPath)}); in TEST_F()
[all …]
Dpayload_signer.cc61 for (const brillo::Blob& signature : signatures) { in ConvertSignaturesToProtobuf() local
65 sig_message->set_data(signature.data(), signature.size()); in ConvertSignaturesToProtobuf()
254 string signature(payload.begin() + signatures_offset, payload.end()); in VerifySignedPayload() local
259 PayloadVerifier::VerifySignature(signature, public_key, payload_hash)); in VerifySignedPayload()
261 signature.assign(payload.begin() + metadata_size, in VerifySignedPayload()
265 PayloadVerifier::VerifySignature(signature, public_key, metadata_hash)); in VerifySignedPayload()
290 brillo::Blob signature(RSA_size(rsa)); in SignHash() local
293 signature.data(), in SignHash()
303 signature.size()); in SignHash()
304 out_signature->swap(signature); in SignHash()
[all …]
/system/keymaster/legacy_support/
Dkeymaster_passthrough_operation.cpp28 const Buffer& signature, AuthorizationSet* output_params, in Finish() argument
67 keymaster_blob_t sig{ signature.peek_read(), signature.available_read() }; in Finish()
96 const Buffer& signature, AuthorizationSet* output_params, in Finish() argument
99 keymaster_blob_t sig{ signature.peek_read(), signature.available_read() }; in Finish()
Dkeymaster0_engine.cpp262 unique_ptr<uint8_t[], Malloc_Delete>* signature, in Keymaster0Sign() argument
273 signature->reset(signed_data); in Keymaster0Sign()
308 unique_ptr<uint8_t[], Malloc_Delete> signature; in RsaPrivateTransform() local
310 if (!Keymaster0Sign(&sign_params, *key_blob, in, len, &signature, &signature_length)) { in RsaPrivateTransform()
320 Eraser eraser(signature.get(), signature_length); in RsaPrivateTransform()
327 memcpy(out, signature.get() + signature_length - len, len); in RsaPrivateTransform()
334 memcpy(out + len - signature_length, signature.get(), signature_length); in RsaPrivateTransform()
336 memcpy(out, signature.get(), len); in RsaPrivateTransform()
357 unique_ptr<uint8_t[], Malloc_Delete> signature; in EcdsaSign() local
359 if (!Keymaster0Sign(&sign_params, *key_blob, digest, digest_len, &signature, in EcdsaSign()
[all …]
Dkeymaster_passthrough_operation.h74 const Buffer& signature, AuthorizationSet* output_params,
85 const AuthorizationSet& input_params, const Buffer& input, const Buffer& signature,
89 const AuthorizationSet& input_params, const Buffer& input, const Buffer& signature,
/system/extras/verity/
DVeritySigner.java48 byte[] signature = Utils.read(args[2]); in main()
51 if (Utils.verify(publicKey, content, signature, in main()
65 byte[] signature = Utils.sign(privateKey, content); in main()
66 Utils.write(signature, args[2]); in main()
Dverity_verifier.cpp51 static int verify_table(const char* key_path, const uint8_t* signature, size_t signature_size, in verify_table() argument
65 if (!RSA_verify(NID_sha256, hash_buf, sizeof(hash_buf), signature, signature_size, key.get())) { in verify_table()
113 int ret = verify_table(argv[3], verity.signature, sizeof(verity.signature), in main()
DBootSignature.java71 private DEROctetString signature; field in BootSignature
102 public BootSignature(byte[] signature) in BootSignature() argument
104 ASN1InputStream stream = new ASN1InputStream(signature); in BootSignature()
128 this.signature = (DEROctetString) sequence.getObjectAt(4); in BootSignature()
151 return signature.getOctets(); in getSignature()
156 signature = new DEROctetString(sig); in setSignature()
186 return Utils.verify(publicKey, signable, signature.getOctets(), in verify()
196 v.add(signature); in toASN1Primitive()
296 byte[] signature = Arrays.copyOfRange(image, signableSize, image.length); in verifySignature()
297 BootSignature bootsig = new BootSignature(signature); in verifySignature()
Dbuild_verity_metadata.py41 def build_metadata_block(verity_table, signature, verity_disable=False): argument
44 block = struct.pack("II256sI", magic, VERSION, signature, table_len)
81 signature = sign_verity_table(verity_table, signer_path, signing_key, signer_args)
83 metadata_block = build_metadata_block(verity_table, signature, verity_disable)
/system/keymaster/tests/
Dandroid_keymaster_test.cpp463 string signature; in TEST_P() local
464 SignMessage(message, &signature, KM_DIGEST_NONE, KM_PAD_NONE); in TEST_P()
477 string signature; in TEST_P() local
478 SignMessage(message, &signature, KM_DIGEST_SHA_2_256, KM_PAD_RSA_PSS); in TEST_P()
490 string signature; in TEST_P() local
507 string signature; in TEST_P() local
508 SignMessage(message, &signature, KM_DIGEST_SHA_2_256, KM_PAD_RSA_PKCS1_1_5_SIGN); in TEST_P()
520 string signature; in TEST_P() local
521 SignMessage(message, &signature, KM_DIGEST_NONE, KM_PAD_RSA_PKCS1_1_5_SIGN); in TEST_P()
539 string signature; in TEST_P() local
[all …]
Dandroid_keymaster_test_utils.cpp301 keymaster_error_t Keymaster2Test::FinishOperation(const string& input, const string& signature, in FinishOperation() argument
305 return FinishOperation(additional_params, input, signature, &output_params, output); in FinishOperation()
309 const string& input, const string& signature, in FinishOperation() argument
312 keymaster_blob_t sig = {reinterpret_cast<const uint8_t*>(signature.c_str()), in FinishOperation()
313 signature.length()}; in FinishOperation()
381 const string& signature, const AuthorizationSet& begin_params, in ProcessMessage() argument
387 EXPECT_EQ(KM_ERROR_OK, FinishOperation(update_params, message, signature, &result)); in ProcessMessage()
392 const string& signature) { in ProcessMessage() argument
396 EXPECT_EQ(KM_ERROR_OK, FinishOperation(message, signature, &result)); in ProcessMessage()
400 void Keymaster2Test::SignMessage(const string& message, string* signature, in SignMessage() argument
[all …]
Dandroid_keymaster_test_utils.h208 keymaster_error_t FinishOperation(const std::string& input, const std::string& signature,
211 const std::string& input, const std::string& signature, in FinishOperation() argument
213 return FinishOperation(additional_params, input, signature, nullptr /* output_params */, in FinishOperation()
217 const std::string& input, const std::string& signature,
234 const std::string& signature, const AuthorizationSet& begin_params,
238 const std::string& signature);
240 void SignMessage(const std::string& message, std::string* signature, keymaster_digest_t digest);
241 void SignMessage(const std::string& message, std::string* signature, keymaster_digest_t digest,
243 void MacMessage(const std::string& message, std::string* signature, size_t mac_length);
245 void VerifyMessage(const std::string& message, const std::string& signature,
[all …]
/system/core/gatekeeperd/
DSoftGateKeeper.h74 virtual void ComputePasswordSignature(uint8_t *signature, uint32_t signature_length, in ComputePasswordSignature() argument
77 if (signature == NULL) return; in ComputePasswordSignature()
79 sizeof(salt), N, r, p, signature, signature_length); in ComputePasswordSignature()
87 virtual void ComputeSignature(uint8_t *signature, uint32_t signature_length, in ComputeSignature() argument
89 if (signature == NULL) return; in ComputeSignature()
90 memset(signature, 0, signature_length); in ComputeSignature()
/system/keymaster/km_openssl/
Decdsa_operation.cpp206 const Buffer& input, const Buffer& signature, in Finish() argument
220 signature.peek_read(), signature.available_read(), ecdsa.get()); in Finish()
225 } else if (!EVP_DigestVerifyFinal(&digest_ctx_, signature.peek_read(), in Finish()
226 signature.available_read())) in Finish()
Drsa_operation.cpp417 const Buffer& input, const Buffer& signature, in Finish() argument
425 return VerifyUndigested(signature); in Finish()
427 return VerifyDigested(signature); in Finish()
430 keymaster_error_t RsaVerifyOperation::VerifyUndigested(const Buffer& signature) { in VerifyUndigested() argument
441 if (key_len != signature.available_read()) in VerifyUndigested()
460 int bytes_decrypted = RSA_public_decrypt(signature.available_read(), signature.peek_read(), in VerifyUndigested()
482 keymaster_error_t RsaVerifyOperation::VerifyDigested(const Buffer& signature) { in VerifyDigested() argument
483 if (!EVP_DigestVerifyFinal(&digest_ctx_, signature.peek_read(), signature.available_read())) in VerifyDigested()
Dhmac_operation.cpp165 const Buffer& input, const Buffer& signature, in Finish() argument
181 size_t siglen = signature.available_read(); in Finish()
185 if (CRYPTO_memcmp(signature.peek_read(), digest, siglen) != 0) in Finish()
/system/update_engine/payload_consumer/
Dpayload_verifier.cc69 const Signatures::Signature& signature = signatures.signatures(i); in VerifySignature() local
70 brillo::Blob sig_data(signature.data().begin(), signature.data().end()); in VerifySignature()
/system/update_engine/scripts/
Dpayload_info.py119 for signature in signatures.signatures:
121 (signature.version if signature.HasField('version') else None,
122 len(signature.data)))
123 DisplayHexData(signature.data, indent=4)
/system/keymaster/include/keymaster/km_openssl/
Drsa_operation.h103 const Buffer& signature, AuthorizationSet* output_params,
127 const Buffer& signature, AuthorizationSet* output_params,
131 keymaster_error_t VerifyUndigested(const Buffer& signature);
132 keymaster_error_t VerifyDigested(const Buffer& signature);
163 const Buffer& signature, AuthorizationSet* output_params,
177 const Buffer& signature, AuthorizationSet* output_params,
/system/gatekeeper/
Dgatekeeper.cpp211 ComputePasswordSignature(password_handle->signature, sizeof(password_handle->signature), in CreatePasswordHandle()
228 return memcmp_s(generated_handle->signature, expected_handle->signature, in DoVerify()
229 sizeof(expected_handle->signature)) == 0; in DoVerify()
/system/vold/tests/
DCryptfsScryptHidlizationEquivalence_test.cpp223 const size_t object_size, unsigned char** signature, in keymaster_sign_object_old() argument
276 ftr->keymaster_blob_size, to_sign, to_sign_size, signature, in keymaster_sign_object_old()
327 *signature = (uint8_t*)tmp_sig.data; in keymaster_sign_object_old()
373 const size_t object_size, unsigned char** signature, in keymaster_sign_object_new() argument
410 to_sign_size, signature, signature_size) != KeymasterSignResult::ok) in keymaster_sign_object_new()
/system/bt/stack/crypto_toolbox/
Dcrypto_toolbox.h52 Octet16 signature = aes_cmac(key, message, length); in aes_cmac() local
54 uint8_t* p_mac = signature.data() + (OCTET16_LEN - tlen); in aes_cmac()

1234