Home
last modified time | relevance | path

Searched refs:sig (Results 1 – 25 of 42) sorted by relevance

12

/system/libziparchive/incfs_support/
Dsignal_handling.cpp54 void SignalHandler::handler(int sig, siginfo_t* info, void* ucontext) { in handler() argument
55 if (sig != SIGBUS) { in handler()
56 LOG_FATAL("SIGBUS handler called for unexpected signal %d", sig); in handler()
65 signal(sig, SIG_DFL); in handler()
66 raise(sig); in handler()
75 mOldSigaction.sa_sigaction(sig, info, ucontext); in handler()
77 mOldSigaction.sa_handler(sig); in handler()
/system/security/identity/util/test/java/com/android/security/identity/internal/
DUtilUnitTests.java339 byte[] sig = Util.coseSign1Sign(keyPair.getPrivate(), data, detachedContent, null); in coseSignAndVerify()
340 assertTrue(Util.coseSign1CheckSignature(sig, detachedContent, keyPair.getPublic())); in coseSignAndVerify()
341 assertArrayEquals(data, Util.coseSign1GetData(sig)); in coseSignAndVerify()
342 assertEquals(new ArrayList() {}, Util.coseSign1GetX5Chain(sig)); in coseSignAndVerify()
350 byte[] sig = Util.coseSign1Sign(keyPair.getPrivate(), data, detachedContent, null); in coseSignAndVerifyDetachedContent()
351 assertTrue(Util.coseSign1CheckSignature(sig, detachedContent, keyPair.getPublic())); in coseSignAndVerifyDetachedContent()
352 assertArrayEquals(data, Util.coseSign1GetData(sig)); in coseSignAndVerifyDetachedContent()
353 assertEquals(new ArrayList() {}, Util.coseSign1GetX5Chain(sig)); in coseSignAndVerifyDetachedContent()
363 byte[] sig = Util.coseSign1Sign(keyPair.getPrivate(), data, detachedContent, certs); in coseSignAndVerifySingleCertificate()
364 assertTrue(Util.coseSign1CheckSignature(sig, detachedContent, keyPair.getPublic())); in coseSignAndVerifySingleCertificate()
[all …]
/system/keymint/common/src/crypto/
Dec.rs501 pub fn to_cose_signature(curve: EcCurve, sig: Vec<u8>) -> Result<Vec<u8>, Error> { in to_cose_signature()
505 let der_sig = NistSignature::from_der(&sig) in to_cose_signature()
511 let mut sig = vec_try![0; 2 * l]?; in to_cose_signature() localVariable
516 sig[r_offset..r_offset + r.len()].copy_from_slice(r); in to_cose_signature()
517 sig[s_offset..s_offset + s.len()].copy_from_slice(s); in to_cose_signature()
518 Ok(sig) in to_cose_signature()
522 Ok(sig) in to_cose_signature()
528 pub fn from_cose_signature(curve: EcCurve, sig: &[u8]) -> Result<Vec<u8>, Error> { in from_cose_signature()
534 if sig.len() != 2 * l { in from_cose_signature()
538 sig.len(), in from_cose_signature()
[all …]
/system/security/keystore/
Dkeystore_attestation_id.cpp53 std::vector<uint8_t> signature2SHA256(const security::keystore::Signature& sig) { in signature2SHA256() argument
55 SHA256(sig.data.data(), sig.data.size(), digest_buffer.data()); in signature2SHA256()
238 for (auto sig = pinfo.signatures.begin(); sig != pinfo.signatures.end(); ++sig) { in build_attestation_application_id() local
239 signature_digests.push_back(signature2SHA256(*sig)); in build_attestation_application_id()
/system/incremental_delivery/incfs/incfsdump/
Ddump.cpp380 auto& sig = mdBuf.signature; in dumpMd() local
381 sig = readAt<decltype(sig)>(offset); in dumpMd()
382 out() << "signature size: " << sig.sg_sig_size; in dumpMd()
383 out() << "signature offset: " << hex(sig.sg_sig_offset); in dumpMd()
384 out() << "hash tree size: " << sig.sg_hash_tree_size; in dumpMd()
385 out() << "hash tree offset: " << hex(sig.sg_hash_tree_offset); in dumpMd()
386 dumpTree(sig.sg_hash_tree_offset, sig.sg_hash_tree_size); in dumpMd()
/system/keymaster/legacy_support/
Dkeymaster_passthrough_operation.cpp67 keymaster_blob_t sig{signature.peek_read(), signature.available_read()}; in Finish() local
69 rc = km_device_->finish(km_device_, operation_handle_, &mutable_input_params, &sig, &out_params, in Finish()
99 keymaster_blob_t sig{signature.peek_read(), signature.available_read()}; in Finish() local
103 rc = km_device_->finish(km_device_, operation_handle_, &input_params, &in, &sig, &out_params, in Finish()
/system/libbase/
Dthreads.cpp51 int tgkill(int tgid, int tid, int sig) { in tgkill() argument
52 return syscall(__NR_tgkill, tgid, tid, sig); in tgkill()
/system/authgraph/boringssl/src/
Dec.rs117 let sig = ossl!(signer.sign_oneshot_to_vec(data))?; in sign() localVariable
119 EcSignKey::Ed25519(_) => Ok(sig), in sign()
122 EcSignKey::P256(_) => ec_der_signature_to_cose(32, &sig), in sign()
123 EcSignKey::P384(_) => ec_der_signature_to_cose(48, &sig), in sign()
188 let mut sig = ossl!(signature.r().to_vec_padded(coord_len))?; in ec_der_signature_to_cose() localVariable
189 sig.extend_from_slice(&ossl!(signature.s().to_vec_padded(coord_len))?); in ec_der_signature_to_cose()
190 Ok(sig) in ec_der_signature_to_cose()
485 let sig = hex::decode(der_sig).unwrap(); in test_signature_convert() localVariable
486 let got = ec_der_signature_to_cose(coord_len, &sig).unwrap(); in test_signature_convert()
554 let sig = hex::decode(der_sig).unwrap(); in test_der_signature_convert_fail() localVariable
[all …]
/system/update_engine/scripts/update_payload/
Dtest_utils.py105 sig, _ = sign_process.communicate(input=data_sha256_hash)
109 return sig
125 sig = self.sigs.signatures.add()
127 sig.version = version
129 sig.data = data
351 sig = SignSha256(temp_payload_file.getvalue(), privkey_file_name)
353 sigs_gen.AddSig(1, sig)
/system/security/keystore2/tests/
Dkeystore2_client_test_utils.rs193 let sig = op.finish(None, None)?; in perform_sample_sign_operation() localVariable
194 assert!(sig.is_some()); in perform_sample_sign_operation()
217 let sig = op.finish(None, None).unwrap(); in perform_sample_hmac_sign_verify_op() localVariable
218 assert!(sig.is_some()); in perform_sample_hmac_sign_verify_op()
220 let sig = sig.unwrap(); in perform_sample_hmac_sign_verify_op() localVariable
233 let result = op.finish(Some(b"my message"), Some(&sig)).unwrap(); in perform_sample_hmac_sign_verify_op()
281 let sig = op.finish(None, None).unwrap(); in perform_sample_asym_sign_verify_op() localVariable
282 assert!(sig.is_some()); in perform_sample_asym_sign_verify_op()
284 let sig = sig.unwrap(); in perform_sample_asym_sign_verify_op() localVariable
293 assert!(verifier.verify(&sig).unwrap()); in perform_sample_asym_sign_verify_op()
/system/keymaster/cppcose/
Dcppcose.cpp73 auto sig = ECDSA_SIG_Ptr(ECDSA_do_sign(data.data(), data.size(), ec_key.get())); in signP256Digest() local
74 if (sig == nullptr) { in signP256Digest()
77 size_t len = i2d_ECDSA_SIG(sig.get(), nullptr); in signP256Digest()
80 i2d_ECDSA_SIG(sig.get(), &p); in signP256Digest()
160 ECDSA_SIG sig; in ecdsaCoseSignatureToDer() local
161 sig.r = rBn.get(); in ecdsaCoseSignatureToDer()
162 sig.s = sBn.get(); in ecdsaCoseSignatureToDer()
164 size_t len = i2d_ECDSA_SIG(&sig, nullptr); in ecdsaCoseSignatureToDer()
167 i2d_ECDSA_SIG(&sig, &p); in ecdsaCoseSignatureToDer()
173 auto sig = ECDSA_SIG_Ptr(d2i_ECDSA_SIG(nullptr, &p, ecdsaSignature.size())); in ecdsaDerSignatureToCose() local
[all …]
/system/security/mls/mls-rs-crypto-boringssl/src/
Deddsa.rs218 let sig = ed25519.sign(&private_key, &data).unwrap(); in sign_verify() localVariable
219 assert_eq!(sig, expected_sig); in sign_verify()
222 assert!(ed25519.verify(&public_key, &sig, &data).is_ok()); in sign_verify()
241 …let sig = decode_hex::<64>("6291d657deec24024827e69c3abe01a30ce548a284743a445e3680d7db5ac3ac18ff9b… in verify_invalid_key() localVariable
246 ed25519.verify(&public_key_short, &sig, &data), in verify_invalid_key()
/system/extras/simpleperf/
DIOEventLoop.cpp122 bool IOEventLoop::AddSignalEvent(int sig, const std::function<bool()>& callback, in AddSignalEvent() argument
124 return AddEvent(sig, EV_SIGNAL | EV_PERSIST, nullptr, callback, priority) != nullptr; in AddSignalEvent()
129 for (auto sig : sigs) { in AddSignalEvents() local
130 if (!AddSignalEvent(sig, callback, priority)) { in AddSignalEvents()
DIOEventLoop.h62 bool AddSignalEvent(int sig, const std::function<bool()>& callback,
/system/keymint/boringssl/src/
Dec.rs243 let mut sig = vec_try![0; ffi::X25519_SHARED_KEY_LEN as usize]?; in finish() localVariable
247 ffi::X25519(sig.as_mut_ptr(), &key.0 as *const u8, peer_key_data.as_ptr()) in finish()
250 Ok(sig) in finish()
383 let sig = ossl!(openssl::ecdsa::EcdsaSig::sign(&self.pending_input, &self.ec_key))?; in finish() localVariable
384 let sig = ossl!(sig.to_der())?; in finish() localVariable
385 Ok(sig) in finish()
421 let sig = ossl!(signer.sign_oneshot_to_vec(&self.pending_input))?; in finish() localVariable
422 Ok(sig) in finish()
/system/core/debuggerd/libdebuggerd/
Dtombstone_proto.cpp758 Signal sig; in engrave_tombstone_proto() local
759 sig.set_number(target_thread.signo); in engrave_tombstone_proto()
760 sig.set_name(get_signame(target_thread.siginfo)); in engrave_tombstone_proto()
761 sig.set_code(target_thread.siginfo->si_code); in engrave_tombstone_proto()
762 sig.set_code_name(get_sigcode(target_thread.siginfo)); in engrave_tombstone_proto()
765 sig.set_has_sender(true); in engrave_tombstone_proto()
766 sig.set_sender_uid(target_thread.siginfo->si_uid); in engrave_tombstone_proto()
767 sig.set_sender_pid(target_thread.siginfo->si_pid); in engrave_tombstone_proto()
771 sig.set_has_fault_address(true); in engrave_tombstone_proto()
773 sig.set_fault_address(fault_addr); in engrave_tombstone_proto()
[all …]
/system/chre/platform/linux/
Dinit.cc51 extern "C" void signalHandler(int sig) { in signalHandler() argument
52 (void)sig; in signalHandler()
/system/libbase/include/android-base/
Dthreads.h29 extern "C" int tgkill(int tgid, int tid, int sig);
/system/update_engine/payload_generator/
Dpayload_properties.cc117 for (const auto& sig : metadata_signatures.signatures()) { in LoadFromPayload() local
119 brillo::data_encoding::Base64Encode(sig.data())); in LoadFromPayload()
Dpayload_signer_unittest.cc112 const Signatures::Signature& sig = signatures.signatures(0); in TEST_F() local
113 const string& sig_data = sig.data(); in TEST_F()
/system/memory/libmemunreachable/tests/
DThreadCapture_test.cpp283 const int sig = SIGUSR1; in TEST_F() local
303 sigaction(sig, &act, NULL); in TEST_F()
306 sigaddset(&set, sig); in TEST_F()
324 tgkill(child, tid, sig); in TEST_F()
/system/authgraph/tests/src/
Dlib.rs302 sig: &'static str, // hex in test_ecdsa() field
309sig: "657c1492402ab5ce03e2c3a7f0384d051b9cf3570f1207fc78c1bcc98c281c2bf0cf5b3a289976458a1be6277a50… in test_ecdsa()
316sig: "2ba3a8be6b94d5ec80a6d9d1190a436effe50d85a1eee859b8cc6af9bd5c2e18b329f479a2bbd0a5c384ee1493b1… in test_ecdsa()
323sig: "12b30abef6b5476fe6b612ae557c0425661e26b44b1bfe19daf2ca28e3113083ba8e4ae4cc45a0320abd3394f1c5… in test_ecdsa()
328 let sig = hex::decode(test.sig).unwrap(); in test_ecdsa() localVariable
331 assert!(ecdsa.verify_signature(&test.key, &msg, &sig).is_ok(), "failed for case {i}"); in test_ecdsa()
337 ecdsa.verify_signature(&test.key, &bad_msg, &sig).is_err(), in test_ecdsa()
342 let mut bad_sig = sig; in test_ecdsa()
446 let sig = ecdsa.sign(sign_key, msg).unwrap(); in test_ecdsa_round_trip() localVariable
448 assert!(ecdsa.verify_signature(verify_key, msg, &sig).is_ok()); in test_ecdsa_round_trip()
[all …]
/system/unwinding/libunwindstack/include/unwindstack/
DUcontextArm64.h44 uint64_t sig; // unsigned long member
DUcontextRiscv64.h66 uint64_t sig; // unsigned long member
/system/libziparchive/incfs_support/include/incfs_support/
Dsignal_handling.h189 static void handler(int sig, siginfo_t* info, void* ucontext);

12