/system/core/trusty/keymaster/ |
D | trusty_keymaster_device_test.cpp | 185 uint8_t* signature; in TEST_F() local 188 &signature, &siglen)); in TEST_F() 189 Malloc_Delete sig_deleter(signature); in TEST_F() 204 uint8_t* signature; in TEST_F() local 207 message_len, &signature, &siglen)); in TEST_F() 221 uint8_t* signature; in TEST_F() local 224 message_len, &signature, &siglen)); in TEST_F() 237 uint8_t* signature; in TEST_F() local 240 array_size(message) - 1, &signature, &siglen)); in TEST_F() 241 Malloc_Delete sig_deleter(signature); in TEST_F() [all …]
|
D | trusty_keymaster_main.cpp | 140 keymaster_blob_t* signature, keymaster_blob_t* output) { in do_operation() argument 164 error = device->finish(op_handle, nullptr, nullptr, signature, nullptr, output); in do_operation() 191 keymaster_blob_t input = {message.get(), message_len}, signature; in test_import_rsa() local 193 if (!do_operation(device, KM_PURPOSE_SIGN, &key, &input, nullptr, &signature)) { in test_import_rsa() 197 std::unique_ptr<const uint8_t[]> signature_deleter(signature.data); in test_import_rsa() 200 if (!do_operation(device, KM_PURPOSE_VERIFY, &key, &input, &signature, nullptr)) { in test_import_rsa() 227 keymaster_blob_t input = {message.get(), message_len}, signature; in test_rsa() local 229 if (!do_operation(device, KM_PURPOSE_SIGN, &key, &input, nullptr, &signature)) { in test_rsa() 233 std::unique_ptr<const uint8_t[]> signature_deleter(signature.data); in test_rsa() 236 if (!do_operation(device, KM_PURPOSE_VERIFY, &key, &input, &signature, nullptr)) { in test_rsa() [all …]
|
/system/keymaster/ |
D | android_keymaster_test.cpp | 512 string signature; in TEST_P() local 513 SignMessage(message, &signature, KM_DIGEST_NONE, KM_PAD_NONE); in TEST_P() 526 string signature; in TEST_P() local 527 SignMessage(message, &signature, KM_DIGEST_SHA_2_256, KM_PAD_RSA_PSS); in TEST_P() 539 string signature; in TEST_P() local 556 string signature; in TEST_P() local 557 SignMessage(message, &signature, KM_DIGEST_SHA_2_256, KM_PAD_RSA_PKCS1_1_5_SIGN); in TEST_P() 569 string signature; in TEST_P() local 570 SignMessage(message, &signature, KM_DIGEST_NONE, KM_PAD_RSA_PKCS1_1_5_SIGN); in TEST_P() 588 string signature; in TEST_P() local [all …]
|
D | keymaster0_engine.cpp | 262 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 …]
|
D | android_keymaster_test_utils.cpp | 301 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 …]
|
D | android_keymaster_test_utils.h | 208 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 …]
|
D | ecdsa_operation.cpp | 204 const Buffer& input, const Buffer& signature, in Finish() argument 218 signature.peek_read(), signature.available_read(), ecdsa.get()); in Finish() 223 } else if (!EVP_DigestVerifyFinal(&digest_ctx_, signature.peek_read(), in Finish() 224 signature.available_read())) in Finish()
|
D | rsa_operation.h | 99 const Buffer& signature, AuthorizationSet* output_params, 121 const Buffer& signature, AuthorizationSet* output_params, 125 keymaster_error_t VerifyUndigested(const Buffer& signature); 126 keymaster_error_t VerifyDigested(const Buffer& signature); 154 const Buffer& signature, AuthorizationSet* output_params, 166 const Buffer& signature, AuthorizationSet* output_params,
|
D | rsa_operation.cpp | 416 const Buffer& input, const Buffer& signature, in Finish() argument 424 return VerifyUndigested(signature); in Finish() 426 return VerifyDigested(signature); in Finish() 429 keymaster_error_t RsaVerifyOperation::VerifyUndigested(const Buffer& signature) { in VerifyUndigested() argument 440 if (key_len != signature.available_read()) in VerifyUndigested() 459 int bytes_decrypted = RSA_public_decrypt(signature.available_read(), signature.peek_read(), in VerifyUndigested() 481 keymaster_error_t RsaVerifyOperation::VerifyDigested(const Buffer& signature) { in VerifyDigested() argument 482 if (!EVP_DigestVerifyFinal(&digest_ctx_, signature.peek_read(), signature.available_read())) in VerifyDigested()
|
D | hmac_operation.cpp | 164 const Buffer& input, const Buffer& signature, in Finish() argument 183 size_t siglen = signature.available_read(); in Finish() 188 if (CRYPTO_memcmp(signature.peek_read(), digest, siglen) != 0) in Finish()
|
/system/extras/verity/ |
D | VeritySigner.java | 48 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()
|
D | verity_verifier.cpp | 52 static int verify_table(const char* key_path, const uint8_t* signature, size_t signature_size, in verify_table() argument 66 if (!RSA_verify(NID_sha256, hash_buf, sizeof(hash_buf), signature, signature_size, key.get())) { in verify_table() 114 int ret = verify_table(argv[3], verity.signature, sizeof(verity.signature), in main()
|
D | BootSignature.java | 71 private DEROctetString signature; field in BootSignature 91 public BootSignature(byte[] signature) in BootSignature() argument 93 ASN1InputStream stream = new ASN1InputStream(signature); in BootSignature() 117 this.signature = (DEROctetString) sequence.getObjectAt(4); in BootSignature() 140 return signature.getOctets(); in getSignature() 145 signature = new DEROctetString(sig); in setSignature() 175 return Utils.verify(publicKey, signable, signature.getOctets(), in verify() 185 v.add(signature); in toASN1Primitive() 265 byte[] signature = Arrays.copyOfRange(image, signableSize, image.length); in verifySignature() 266 BootSignature bootsig = new BootSignature(signature); in verifySignature()
|
D | build_verity_metadata.py | 40 def build_metadata_block(verity_table, signature): argument 42 block = struct.pack("II256sI", MAGIC_NUMBER, VERSION, signature, table_len) 78 signature = sign_verity_table(verity_table, signer_path, signing_key, signer_args) 80 metadata_block = build_metadata_block(verity_table, signature)
|
D | verify_boot_signature.c | 61 ASN1_OCTET_STRING *signature; member 69 ASN1_SIMPLE(BootSignature, signature, ASN1_OCTET_STRING) 345 bs->signature->data, bs->signature->length, rsa_bs)) { in verify_signature() 362 bs->signature->data, bs->signature->length, rsa_pkey)) { in verify_signature()
|
/system/core/gatekeeperd/ |
D | SoftGateKeeper.h | 74 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/update_engine/payload_generator/ |
D | payload_signer.cc | 59 for (const brillo::Blob& signature : signatures) { in ConvertSignatureToProtobufBlob() local 63 sig_message->set_data(signature.data(), signature.size()); in ConvertSignatureToProtobufBlob() 365 brillo::Blob signature(RSA_size(rsa)); in SignHash() local 368 signature.data(), in SignHash() 378 signature.size()); in SignHash() 379 out_signature->swap(signature); in SignHash() 388 brillo::Blob signature; in SignHashWithKeys() local 389 TEST_AND_RETURN_FALSE(SignHash(hash_data, path, &signature)); in SignHashWithKeys() 390 signatures.push_back(signature); in SignHashWithKeys() 511 brillo::Blob signature; in GetMetadataSignature() local [all …]
|
/system/update_engine/payload_consumer/ |
D | payload_verifier.cc | 105 const Signatures_Signature& signature = signatures.signatures(i); in VerifySignature() local 106 brillo::Blob sig_data(signature.data().begin(), signature.data().end()); in VerifySignature()
|
/system/tpm/trunks/ |
D | mock_tpm.cc | 94 TPMT_SIGNATURE* signature, in CertifyCreationSync() argument 98 creation_ticket, certify_info, signature, authorization_delegate); in CertifyCreationSync() 110 TPMT_SIGNATURE* signature, in GetSessionAuditDigestSync() argument 114 in_scheme, audit_info, signature, authorization_delegate); in GetSessionAuditDigestSync() 238 TPMT_SIGNATURE* signature, in NV_CertifySync() argument 242 certify_info, signature, authorization_delegate); in NV_CertifySync()
|
D | tpm_utility_test.cc | 711 signature_out.signature.rsassa.sig.size = 2; in TEST_F() 712 signature_out.signature.rsassa.sig.buffer[0] = 'h'; in TEST_F() 713 signature_out.signature.rsassa.sig.buffer[1] = 'i'; in TEST_F() 714 std::string signature; in TEST_F() local 728 &mock_authorization_delegate_, &signature)); in TEST_F() 729 EXPECT_EQ(0, signature.compare("hi")); in TEST_F() 736 std::string signature; in TEST_F() local 749 &mock_authorization_delegate_, &signature)); in TEST_F() 756 std::string signature; in TEST_F() local 765 &mock_authorization_delegate_, &signature)); in TEST_F() [all …]
|
/system/tpm/attestation/common/ |
D | common.proto | 55 // The quote; a signature generated with the AIK. 80 // The wrapper message of any data and its signature. 84 // The signature of the data field. 85 optional bytes signature = 2; field
|
/system/security/softkeymaster/ |
D | keymaster_openssl.cpp | 607 const uint8_t* signature, const size_t signatureLength) { in verify_dsa() argument 619 if (DSA_verify(0, signedData, signedDataLength, signature, signatureLength, dsa.get()) <= 0) { in verify_dsa() 629 const uint8_t* signature, const size_t signatureLength) { in verify_ec() argument 641 if (ECDSA_verify(0, signedData, signedDataLength, signature, signatureLength, eckey.get()) <= in verify_ec() 652 const uint8_t* signature, const size_t signatureLength) { in verify_rsa() argument 677 if (!RSA_public_decrypt(signatureLength, signature, tmp, rsa.get(), RSA_NO_PADDING)) { in verify_rsa() 693 const uint8_t* signature, const size_t signatureLength) { in openssl_verify_data() argument 694 if (signedData == NULL || signature == NULL) { in openssl_verify_data() 709 signedData, signedDataLength, signature, signatureLength); in openssl_verify_data() 714 signedData, signedDataLength, signature, signatureLength); in openssl_verify_data() [all …]
|
/system/tpm/attestation/client/ |
D | main.cc | 237 std::string signature; in ScheduleCommand() local 239 if (!base::ReadFileToString(filename2, &signature)) { in ScheduleCommand() 246 command_line->GetSwitchValueASCII("user"), input, signature); in ScheduleCommand() 428 WriteOutput(reply.signature()); in OnSignComplete() 436 const std::string& signature) { in VerifySignature() argument 442 weak_factory_.GetWeakPtr(), input, signature)); in VerifySignature() 446 const std::string& signature, in VerifySignature2() argument 449 if (crypto.VerifySignature(key_info.public_key(), input, signature)) { in VerifySignature2()
|
/system/gatekeeper/ |
D | gatekeeper.cpp | 202 ComputePasswordSignature(password_handle->signature, sizeof(password_handle->signature), in CreatePasswordHandle() 219 return memcmp_s(generated_handle->signature, expected_handle->signature, in DoVerify() 220 sizeof(expected_handle->signature)) == 0; in DoVerify()
|
/system/vold/tests/ |
D | CryptfsScryptHidlizationEquivalence_test.cpp | 234 unsigned char **signature, in keymaster_sign_object_old() argument 293 signature, in keymaster_sign_object_old() 348 *signature = (uint8_t*)tmp_sig.data; in keymaster_sign_object_old() 398 unsigned char **signature, in keymaster_sign_object_new() argument 435 KEYMASTER_CRYPTFS_RATE_LIMIT, to_sign, to_sign_size, signature, signature_size); in keymaster_sign_object_new()
|