Home
last modified time | relevance | path

Searched refs:private_key (Results 1 – 25 of 41) sorted by relevance

12

/system/security/diced/open_dice/src/
Dops.rs70 let mut private_key = PrivateKey::default(); localVariable
78 private_key.as_mut_ptr(),
81 Ok((public_key, private_key))
85 pub fn sign(message: &[u8], private_key: &[u8; PRIVATE_KEY_SIZE]) -> Result<Signature> { in sign()
94 private_key.as_ptr(),
/system/keymint/common/src/crypto/
Dec.rs393 (EcCurve::P224, Key::P224(NistKey(try_to_vec(key_info.private_key)?))) in import_pkcs8_key_impl()
396 (EcCurve::P256, Key::P256(NistKey(try_to_vec(key_info.private_key)?))) in import_pkcs8_key_impl()
399 (EcCurve::P384, Key::P384(NistKey(try_to_vec(key_info.private_key)?))) in import_pkcs8_key_impl()
402 (EcCurve::P521, Key::P521(NistKey(try_to_vec(key_info.private_key)?))) in import_pkcs8_key_impl()
421 if key_info.private_key.len() != 2 + CURVE25519_PRIV_KEY_LEN in import_pkcs8_key_impl()
422 || key_info.private_key[0] != 0x04 in import_pkcs8_key_impl()
423 || key_info.private_key[1] != 0x20 in import_pkcs8_key_impl()
427 import_raw_ed25519_key(&key_info.private_key[2..]) in import_pkcs8_key_impl()
437 if key_info.private_key.len() != 2 + CURVE25519_PRIV_KEY_LEN in import_pkcs8_key_impl()
438 || key_info.private_key[0] != 0x04 in import_pkcs8_key_impl()
[all …]
Drsa.rs192 import_pkcs1_key(key_info.private_key) in import_pkcs8_key()
197 private_key: &[u8], in import_pkcs1_key()
199 let key = Key(try_to_vec(private_key)?); in import_pkcs1_key()
202 let parsed_key = pkcs1::RsaPrivateKey::try_from(private_key) in import_pkcs1_key()
/system/keymaster/include/keymaster/km_openssl/
Dkem.h47 virtual bool Decrypt(EC_KEY* private_key, const Buffer& encrypted_key, Buffer* output_key) = 0;
48 virtual bool Decrypt(EC_KEY* private_key, const uint8_t* encrypted_key,
Dnist_curve_key_exchange.h41 NistCurveKeyExchange(EC_KEY* private_key, keymaster_error_t* error);
58 EC_KEY* private_key() { return private_key_.release(); } in private_key() function
Decies_kem.h47 bool Decrypt(EC_KEY* private_key, const Buffer& encrypted_key, Buffer* output_key) override;
48 bool Decrypt(EC_KEY* private_key, const uint8_t* encrypted_key, size_t encrypted_key_len,
/system/keymaster/km_openssl/
Decies_kem.cpp129 bool EciesKem::Decrypt(EC_KEY* private_key, const Buffer& encrypted_key, Buffer* output_key) { in Decrypt() argument
130 return Decrypt(private_key, encrypted_key.peek_read(), encrypted_key.available_read(), in Decrypt()
135 bool EciesKem::Decrypt(EC_KEY* private_key, const uint8_t* encrypted_key, size_t encrypted_key_len, in Decrypt() argument
139 key_exchange_.reset(new (std::nothrow) NistCurveKeyExchange(private_key, &error)); in Decrypt()
Dnist_curve_key_exchange.cpp28 NistCurveKeyExchange::NistCurveKeyExchange(EC_KEY* private_key, keymaster_error_t* error) in NistCurveKeyExchange() argument
29 : private_key_(private_key) { in NistCurveKeyExchange()
/system/update_engine/payload_generator/
Dpayload_signer.cc205 auto private_key = std::unique_ptr<EVP_PKEY, decltype(&EVP_PKEY_free)>( in CreatePrivateKeyFromPath() local
208 return private_key; in CreatePrivateKeyFromPath()
216 auto private_key = CreatePrivateKeyFromPath(private_key_path); in GetMaximumSignatureSize() local
217 if (!private_key) { in GetMaximumSignatureSize()
222 *signature_size = EVP_PKEY_size(private_key.get()); in GetMaximumSignatureSize()
288 auto private_key = CreatePrivateKeyFromPath(private_key_path); in SignHash() local
289 if (!private_key) { in SignHash()
294 int key_type = EVP_PKEY_id(private_key.get()); in SignHash()
297 RSA* rsa = EVP_PKEY_get0_RSA(private_key.get()); in SignHash()
317 EC_KEY* ec_key = EVP_PKEY_get0_EC_KEY(private_key.get()); in SignHash()
/system/keymaster/tests/
Dnist_curve_key_exchange_test.cpp124 key_exchange->private_key(), nullptr /* kdf */)); in TEST()
186 string private_key = hex2str(test.my_private_key); in TEST() local
189 const uint8_t* private_key_data = reinterpret_cast<const uint8_t*>(private_key.data()); in TEST()
191 d2i_ECPrivateKey(nullptr, &private_key_data, private_key.size())); in TEST()
Decies_kem_test.cpp64 kem->Decrypt(key_exchange->private_key(), output_encrypted_key, &decrypted_clear_key)); in TEST()
/system/security/keystore2/src/fuzzers/
Dkeystore2_unsafe_fuzzer.rs170 let private_key = check_private_key.unwrap(); localVariable
171 ec_key_get0_public_key(&private_key);
172 let _res = ec_key_marshal_private_key(&private_key);
177 let _res = ecdh_compute_key(public_key.get_point(), &private_key);
/system/extras/verity/
Dgenerate_verity_key.c34 static int write_public_keyfile(RSA *private_key, const char *private_key_path) in write_public_keyfile() argument
44 if (!android_pubkey_encode(private_key, key_data, sizeof(key_data))) in write_public_keyfile()
/system/update_engine/
Ddownload_action_android_unittest.cc110 std::string private_key = in TEST_F() local
113 manifest_file.path(), blob_file.path(), private_key, &metadata_size); in TEST_F()
115 ASSERT_TRUE(PayloadSigner::SignatureBlobLength({private_key}, in TEST_F()
/system/security/keystore2/src/
Dec_crypto.rs41 pub fn private_key(&self) -> Result<ZVec> { in private_key() method
119 let recipient = ECDHPrivateKey::from_private_key(&recipient.private_key()?)?; in test_crypto_roundtrip()
/system/apex/tests/testdata/apkinapex/com.android.apex.system.test/
DAndroid.bp22 private_key: "com.android.apex.system.test.pem",
/system/apex/tests/testdata/apkinapex/com.android.apex.product.test/
DAndroid.bp22 private_key: "com.android.apex.product.test.pem",
/system/apex/tests/testdata/apkinapex/com.android.apex.system_ext.test/
DAndroid.bp22 private_key: "com.android.apex.system_ext.test.pem",
/system/apex/tests/testdata/apkinapex/com.android.apex.vendor.test/
DAndroid.bp22 private_key: "com.android.apex.vendor.test.pem",
/system/apex/tools/
Dcreate_apex_skeleton.sh77 private_key: "${APEX_KEY}.pem",
/system/timezone/apex/
DAndroid.bp46 private_key: "com.android.tzdata.pem",
/system/apex/tests/testdata/maxsdk/com.android.apex.maxsdk.test/
DAndroid.bp22 private_key: "com.android.apex.maxsdk.test.pem",
/system/apex/tests/testdata/sharedlibs/build/com.android.apex.test.baz/
DAndroid.bp21 private_key: "com.android.apex.test.baz.pem",
/system/apex/tests/testdata/sharedlibs/build/com.android.apex.test.pony/
DAndroid.bp21 private_key: "com.android.apex.test.pony.pem",
/system/apex/tests/testdata/sharedlibs/build/com.android.apex.test.bar/
DAndroid.bp21 private_key: "com.android.apex.test.bar.pem",

12