Home
last modified time | relevance | path

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

123

/system/keymaster/
Dandroid_keymaster_test.cpp594 string signature; in TEST_P() local
595 SignMessage(message, &signature, KM_DIGEST_NONE, KM_PAD_NONE); in TEST_P()
608 string signature; in TEST_P() local
609 SignMessage(message, &signature, KM_DIGEST_SHA_2_256, KM_PAD_RSA_PSS); in TEST_P()
621 string signature; in TEST_P() local
638 string signature; in TEST_P() local
639 SignMessage(message, &signature, KM_DIGEST_SHA_2_256, KM_PAD_RSA_PKCS1_1_5_SIGN); in TEST_P()
651 string signature; in TEST_P() local
652 SignMessage(message, &signature, KM_DIGEST_NONE, KM_PAD_RSA_PKCS1_1_5_SIGN); in TEST_P()
672 string signature; in TEST_P() local
[all …]
Dandroid_keymaster_test_utils.cpp276 keymaster_error_t Keymaster1Test::FinishOperation(const string& signature, string* output) { in FinishOperation() argument
279 return FinishOperation(additional_params, signature, &output_params, output); in FinishOperation()
283 const string& signature, in FinishOperation() argument
285 keymaster_blob_t sig = {reinterpret_cast<const uint8_t*>(signature.c_str()), in FinishOperation()
286 signature.length()}; in FinishOperation()
337 const string& signature, const AuthorizationSet& begin_params, in ProcessMessage() argument
347 EXPECT_EQ(KM_ERROR_OK, FinishOperation(update_params, signature, &result)); in ProcessMessage()
352 const string& signature) { in ProcessMessage() argument
359 EXPECT_EQ(KM_ERROR_OK, FinishOperation(signature, &result)); in ProcessMessage()
363 void Keymaster1Test::SignMessage(const string& message, string* signature, in SignMessage() argument
[all …]
Dkeymaster0_engine.cpp267 unique_ptr<uint8_t[], Malloc_Delete>* signature, in Keymaster0Sign() argument
278 signature->reset(signed_data); in Keymaster0Sign()
316 unique_ptr<uint8_t[], Malloc_Delete> signature; in RsaPrivateTransform() local
318 if (!Keymaster0Sign(&sign_params, *key_blob, in, len, &signature, &signature_length)) { in RsaPrivateTransform()
328 Eraser eraser(signature.get(), signature_length); in RsaPrivateTransform()
335 memcpy(out, signature.get() + signature_length - len, len); in RsaPrivateTransform()
342 memcpy(out + len - signature_length, signature.get(), signature_length); in RsaPrivateTransform()
344 memcpy(out, signature.get(), len); in RsaPrivateTransform()
365 unique_ptr<uint8_t[], Malloc_Delete> signature; in EcdsaSign() local
367 if (!Keymaster0Sign(&sign_params, *key_blob, digest, digest_len, &signature, in EcdsaSign()
[all …]
Dandroid_keymaster_test_utils.h197 keymaster_error_t FinishOperation(const std::string& signature, std::string* output);
199 const std::string& signature, std::string* output) { in FinishOperation() argument
200 return FinishOperation(additional_params, signature, nullptr /* output_params */, output); in FinishOperation()
203 const std::string& signature, AuthorizationSet* output_params,
216 const std::string& signature, const AuthorizationSet& begin_params,
220 const std::string& signature);
222 void SignMessage(const std::string& message, std::string* signature, keymaster_digest_t digest);
223 void SignMessage(const std::string& message, std::string* signature, keymaster_digest_t digest,
225 void MacMessage(const std::string& message, std::string* signature, size_t mac_length);
227 void VerifyMessage(const std::string& message, const std::string& signature,
[all …]
Decdsa_operation.cpp200 const Buffer& signature, in Finish() argument
210 signature.peek_read(), signature.available_read(), ecdsa.get()); in Finish()
215 } else if (!EVP_DigestVerifyFinal(&digest_ctx_, signature.peek_read(), in Finish()
216 signature.available_read())) in Finish()
Drsa_operation.h98 keymaster_error_t Finish(const AuthorizationSet& additional_params, const Buffer& signature,
119 keymaster_error_t Finish(const AuthorizationSet& additional_params, const Buffer& signature,
123 keymaster_error_t VerifyUndigested(const Buffer& signature);
124 keymaster_error_t VerifyDigested(const Buffer& signature);
151 keymaster_error_t Finish(const AuthorizationSet& additional_params, const Buffer& signature,
162 keymaster_error_t Finish(const AuthorizationSet& additional_params, const Buffer& signature,
Drsa_operation.cpp405 const Buffer& signature, in Finish() argument
409 return VerifyUndigested(signature); in Finish()
411 return VerifyDigested(signature); in Finish()
414 keymaster_error_t RsaVerifyOperation::VerifyUndigested(const Buffer& signature) { in VerifyUndigested() argument
425 if (key_len != signature.available_read()) in VerifyUndigested()
444 int bytes_decrypted = RSA_public_decrypt(signature.available_read(), signature.peek_read(), in VerifyUndigested()
466 keymaster_error_t RsaVerifyOperation::VerifyDigested(const Buffer& signature) { in VerifyDigested() argument
467 if (!EVP_DigestVerifyFinal(&digest_ctx_, signature.peek_read(), signature.available_read())) in VerifyDigested()
Dhmac_operation.cpp164 const Buffer& signature, in Finish() argument
179 size_t siglen = signature.available_read(); in Finish()
184 if (CRYPTO_memcmp(signature.peek_read(), digest, siglen) != 0) in Finish()
Daes_operation.h71 keymaster_error_t Finish(const AuthorizationSet& additional_params, const Buffer& signature,
114 keymaster_error_t Finish(const AuthorizationSet& additional_params, const Buffer& signature,
135 keymaster_error_t Finish(const AuthorizationSet& additional_params, const Buffer& signature,
Decdsa_keymaster1_operation.h72 keymaster_error_t Finish(const AuthorizationSet& input_params, const Buffer& signature, in Finish() argument
77 error = super::Finish(input_params, signature, output_params, output); in Finish()
Decdsa_operation.h59 keymaster_error_t Finish(const AuthorizationSet& additional_params, const Buffer& signature,
72 keymaster_error_t Finish(const AuthorizationSet& additional_params, const Buffer& signature,
/system/extras/verity/
DKeystoreSigner.java89 private BootSignature signature; field in BootKeystore
120 v.add(signature); in toASN1Primitive()
140 signature = new BootSignature(sig.getEncoded()); in parse()
145 return Utils.verify(signature.getPublicKey(), innerKeystore, in verify()
146 signature.getSignature(), signature.getAlgorithmIdentifier()); in verify()
152 signature = new BootSignature("keystore", innerKeystore.length); in sign()
153 signature.setCertificate(certificate); in sign()
154 signature.setSignature(rawSignature, in sign()
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()
DBootSignature.java71 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()
174 return Utils.verify(publicKey, signable, signature.getOctets(), in verify()
184 v.add(signature); in toASN1Primitive()
264 byte[] signature = Arrays.copyOfRange(image, signableSize, image.length); in verifySignature()
265 BootSignature bootsig = new BootSignature(signature); in verifySignature()
Dbuild_verity_metadata.py23 def build_metadata_block(verity_table, signature): argument
25 block = struct.pack("II256sI", MAGIC_NUMBER, VERSION, signature, table_len)
57 signature = sign_verity_table(verity_table, signer_path, signing_key)
59 metadata_block = build_metadata_block(verity_table, signature)
Dverify_boot_signature.c60 ASN1_OCTET_STRING *signature; member
68 ASN1_SIMPLE(BootSignature, signature, ASN1_OCTET_STRING)
347 bs->signature->data, bs->signature->length, rsa)) { in verify_signature()
/system/core/gatekeeperd/
DSoftGateKeeper.h79 virtual void ComputePasswordSignature(uint8_t *signature, uint32_t signature_length, in ComputePasswordSignature() argument
82 if (signature == NULL) return; in ComputePasswordSignature()
84 sizeof(salt), N, r, p, signature, signature_length); in ComputePasswordSignature()
92 virtual void ComputeSignature(uint8_t *signature, uint32_t signature_length, in ComputeSignature() argument
94 if (signature == NULL) return; in ComputeSignature()
95 memset(signature, 0, signature_length); in ComputeSignature()
/system/core/libmincrypt/test/
Decdsa_test.c224 unsigned char* signature; in main() local
269 signature = parsehex(signature_##n, &slen); \ in main()
270 int result = dsa_sig_unpack(signature, slen, &r, &s); \ in main()
274 free(signature); \ in main()
Drsa_test.c804 unsigned char* signature; in main() local
810 signature = parsehex(signature_##n, &slen); \ in main()
811 int result = RSA_verify(&key_15, signature, slen, hash, sizeof(hash)); \ in main()
/system/core/fs_mgr/
Dfs_mgr_verity.c113 static int verify_table(char *signature, char *table, int table_length) in verify_table() argument
131 (uint8_t*) signature, in verify_table()
236 static int read_verity_metadata(uint64_t device_size, char *block_device, char **signature, in read_verity_metadata() argument
245 *signature = NULL; in read_verity_metadata()
294 *signature = (char*) malloc(RSANUMBYTES); in read_verity_metadata()
295 if (!*signature) { in read_verity_metadata()
299 if (TEMP_FAILURE_RETRY(read(device, *signature, RSANUMBYTES)) != RSANUMBYTES) { in read_verity_metadata()
336 free(*signature); in read_verity_metadata()
337 *signature = NULL; in read_verity_metadata()
711 char *signature = NULL; in compare_last_signature() local
[all …]
/system/security/softkeymaster/
Dkeymaster_openssl.cpp613 const uint8_t* signature, const size_t signatureLength) { in verify_dsa() argument
625 if (DSA_verify(0, signedData, signedDataLength, signature, signatureLength, dsa.get()) <= 0) { in verify_dsa()
635 const uint8_t* signature, const size_t signatureLength) { in verify_ec() argument
647 if (ECDSA_verify(0, signedData, signedDataLength, signature, signatureLength, eckey.get()) <= in verify_ec()
658 const uint8_t* signature, const size_t signatureLength) { in verify_rsa() argument
683 if (!RSA_public_decrypt(signatureLength, signature, tmp, rsa.get(), RSA_NO_PADDING)) { in verify_rsa()
699 const uint8_t* signature, const size_t signatureLength) { in openssl_verify_data() argument
700 if (signedData == NULL || signature == NULL) { in openssl_verify_data()
715 signedData, signedDataLength, signature, signatureLength); in openssl_verify_data()
720 signedData, signedDataLength, signature, signatureLength); in openssl_verify_data()
[all …]
/system/gatekeeper/
Dgatekeeper.cpp194 ComputePasswordSignature(password_handle->signature, sizeof(password_handle->signature), in CreatePasswordHandle()
211 return memcmp_s(generated_handle->signature, expected_handle->signature, in DoVerify()
212 sizeof(expected_handle->signature)) == 0; in DoVerify()
/system/gatekeeper/include/gatekeeper/
Dgatekeeper.h89 virtual void ComputePasswordSignature(uint8_t *signature, uint32_t signature_length,
106 virtual void ComputeSignature(uint8_t *signature, uint32_t signature_length,
Dpassword_handle.h41 uint8_t signature[32]; member
/system/core/include/mincrypt/
Drsa.h49 const uint8_t* signature,

123