Home
last modified time | relevance | path

Searched defs:u8 (Results 1 – 25 of 89) sorted by relevance

1234

/system/security/keystore2/src/
Dec_crypto.rs46 pub fn public_key(&self) -> Result<Vec<u8>> { in public_key()
56 salt: &[u8], in agree_key()
57 other_public_key: &[u8], in agree_key()
58 sender_public_key: &[u8], in agree_key()
59 recipient_public_key: &[u8], in agree_key()
78 recipient_public_key: &[u8], in encrypt_message()
79 message: &[u8], in encrypt_message()
80 ) -> Result<(Vec<u8>, Vec<u8>, Vec<u8>, Vec<u8>, Vec<u8>)> { in encrypt_message()
95 sender_public_key: &[u8], in decrypt_message()
96 salt: &[u8], in decrypt_message()
[all …]
Dkm_compat.rs80 fn wrap_keyblob(keyblob: &[u8]) -> anyhow::Result<Vec<u8>> { in wrap_keyblob()
220 key_data: &[u8], in importKey()
234 wrapped_key_data: &[u8], in importWrappedKey()
235 wrapping_key_blob: &[u8], in importWrappedKey()
236 masking_key: &[u8], in importWrappedKey()
257 keyblob_to_upgrade: &[u8], in upgradeKey()
259 ) -> binder::Result<Vec<u8>> { in upgradeKey()
282 keyblob: &[u8], in begin()
293 keyblob: &[u8], in getKeyCharacteristics()
294 app_id: &[u8], in getKeyCharacteristics()
[all …]
Dutils.rs174 key_blob: &[u8], in upgrade_keyblob_if_required_with()
408 fn decrypt(&self, data: &[u8], iv: &[u8], tag: &[u8]) -> Result<ZVec>; in decrypt()
413 fn encrypt(&self, plaintext: &[u8]) -> Result<(Vec<u8>, Vec<u8>, Vec<u8>)>; in encrypt()
419 fn key(&self) -> &[u8]; in key()
423 fn decrypt(&self, data: &[u8], iv: &[u8], tag: &[u8]) -> Result<ZVec> { in decrypt()
427 fn encrypt(&self, plaintext: &[u8]) -> Result<(Vec<u8>, Vec<u8>, Vec<u8>)> { in encrypt()
Dlegacy_blob.rs217 pub fn new(flags: u8, value: BlobValue) -> Self { in new()
222 pub fn get_flags(&self) -> u8 { in get_flags()
482 pub fn new_from_stream_decrypt_with<F>(mut stream: impl Read, decrypt: F) -> Result<Blob> in new_from_stream_decrypt_with()
484 F: FnOnce(&[u8], &[u8], &[u8], Option<&[u8]>, Option<usize>) -> Result<ZVec>, in new_from_stream_decrypt_with()
787 fn read_generic_blob_decrypt_with<F>(path: &Path, decrypt: F) -> Result<Option<Blob>> in read_generic_blob_decrypt_with()
789 F: FnOnce(&[u8], &[u8], &[u8], Option<&[u8]>, Option<usize>) -> Result<ZVec>, in read_generic_blob_decrypt_with()
808 ) -> Result<Option<Vec<u8>>> in read_legacy_keystore_entry()
810 F: FnOnce(&[u8], &[u8], &[u8], Option<&[u8]>, Option<usize>) -> Result<ZVec>, in read_legacy_keystore_entry()
1237 ) -> Result<(Option<(Blob, LegacyKeyCharacteristics)>, Option<Vec<u8>>, Option<Vec<u8>>)> { in load_by_uid_alias()
1549 data: &[u8], in write_legacy_blob_helper()
[all …]
/system/security/keystore2/tests/
Dffi_test_utils.rs26 fn validateCertChain(cert_buf: Vec<u8>, cert_len: u32, strict_issuer_check: bool) -> bool; in validateCertChain()
28 encrypted_secure_key: Vec<u8>, in createWrappedKey()
29 encrypted_transport_key: Vec<u8>, in createWrappedKey()
30 iv: Vec<u8>, in createWrappedKey()
31 tag: Vec<u8>, in createWrappedKey()
46 fn get_result(result: ffi::CxxResult) -> Result<Vec<u8>, Error> { in get_result()
58 encrypted_secure_key: &[u8], in create_wrapped_key()
59 encrypted_transport_key: &[u8], in create_wrapped_key()
60 iv: &[u8], in create_wrapped_key()
61 tag: &[u8], in create_wrapped_key()
[all …]
Dkeystore2_client_test_utils.rs296 pub fn get_op_nonce(parameters: &KeyParameters) -> Option<Vec<u8>> { in get_op_nonce()
313 nonce: &mut Option<Vec<u8>>, in perform_sample_sym_key_encrypt_op()
316 ) -> binder::Result<Option<Vec<u8>>> { in perform_sample_sym_key_encrypt_op()
341 input: &[u8], in perform_sample_sym_key_decrypt_op()
344 nonce: &mut Option<Vec<u8>>, in perform_sample_sym_key_decrypt_op()
347 ) -> binder::Result<Option<Vec<u8>>> { in perform_sample_sym_key_decrypt_op()
382 secure_key: &[u8], in encrypt_secure_key()
383 aad: &[u8], in encrypt_secure_key()
384 nonce: Vec<u8>, in encrypt_secure_key()
387 ) -> binder::Result<Option<Vec<u8>>> { in encrypt_secure_key()
[all …]
/system/security/diced/open_dice/src/
Dbcc.rs31 buffer: &mut [u8], in bcc_format_config_descriptor()
66 current_bcc: &[u8], in bcc_main_flow()
69 next_bcc: &mut [u8], in bcc_main_flow()
100 current_bcc_handover: &[u8], in bcc_handover_main_flow()
102 next_bcc_handover: &mut [u8], in bcc_handover_main_flow()
146 fn bcc(&self) -> Option<&[u8]> { in bcc()
155 let mut cdi_attest: *const u8 = ptr::null(); in bcc_handover_parse() constant
156 let mut cdi_seal: *const u8 = ptr::null(); in bcc_handover_parse() constant
157 let mut bcc: *const u8 = ptr::null(); in bcc_handover_parse() constant
183 fn sub_slice(buffer: &[u8], addr: *const u8, len: usize) -> Result<&[u8]> { in sub_slice()
Dops.rs47 pub fn kdf(ikm: &[u8], salt: &[u8], info: &[u8], derived_key: &mut [u8]) -> Result<()> { in kdf()
85 pub fn sign(message: &[u8], private_key: &[u8; PRIVATE_KEY_SIZE]) -> Result<Signature> { in sign()
102 pub fn verify(message: &[u8], signature: &Signature, public_key: &PublicKey) -> Result<()> { in verify()
125 certificate: &mut [u8],
Dretry.rs49 fn bcc(&self) -> Option<&[u8]> { in bcc()
90 ) -> Result<Vec<u8>> { in retry_bcc_format_config_descriptor()
103 bcc: &[u8], in retry_bcc_main_flow()
128 ) -> Result<(CdiValues, Vec<u8>)> { in retry_dice_main_flow()
151 ) -> Result<Vec<u8>> {
/system/keymint/ta/src/
Drkp.rs47 pub fn rpc_device_info(&self) -> Result<Vec<u8>, Error> { in rpc_device_info()
136 ) -> Result<(MacedPublicKey, Vec<u8>), Error> { in generate_ecdsa_p256_keypair()
182 _eek_chain: &[u8], in generate_cert_req()
183 _challenge: &[u8], in generate_cert_req()
184 ) -> Result<(DeviceInfo, ProtectedData, Vec<u8>), Error> { in generate_cert_req()
195 challenge: &[u8], in generate_cert_req_v2()
196 ) -> Result<Vec<u8>, Error> { in generate_cert_req_v2()
288 fn build_maced_pub_key<F>(pub_cose_key: Vec<u8>, compute_mac: F) -> Result<Vec<u8>, Error> in build_maced_pub_key()
290 F: FnOnce(&[u8]) -> Result<Vec<u8>, Error>, in build_maced_pub_key()
302 pub fn serialize_cbor(cbor_value: &Value) -> Result<Vec<u8>, Error> { in serialize_cbor()
Ddevice.rs63 fn kek_context(&self) -> Result<Vec<u8>, Error> { in kek_context()
87 fn timestamp_token_mac_input(&self, token: &TimeStampToken) -> Result<Vec<u8>, Error> { in timestamp_token_mac_input()
95 fn hmac(&self, imp: &dyn crypto::Hmac, data: &[u8]) -> Result<Vec<u8>, Error>; in hmac()
177 context: &[u8], in derive_bytes_from_hbk()
179 ) -> Result<Vec<u8>, Error>; in derive_bytes_from_hbk()
186 input: &[u8], in compute_hmac_sha256()
187 ) -> Result<Vec<u8>, Error> { in compute_hmac_sha256()
205 data: &[u8], in sign_data()
207 ) -> Result<Vec<u8>, Error>; in sign_data()
216 payload: &[u8], in sign_data_in_cose_sign1()
[all …]
Dsecret.rs22 ) -> Result<Vec<u8>, Error> { in compute_shared_secret()
51 ) -> Result<Vec<u8>, crate::Error> { in shared_secret_context()
77 fn hmac(&self, imp: &dyn crypto::Hmac, data: &[u8]) -> Result<Vec<u8>, Error> { in hmac()
Dkeys.rs183 fn sign_cert_data(&self, signing_key: KeyMaterial, tbs_data: &[u8]) -> Result<Vec<u8>, Error> { in sign_cert_data()
209 fn calculate_unique_id(&self, app_id: &[u8], params: &[KeyParam]) -> Result<Vec<u8>, Error> { in calculate_unique_id()
286 key_data: &[u8], in import_key()
486 wrapped_key_data: &[u8], in import_wrapped_key()
487 wrapping_key_blob: &[u8], in import_wrapped_key()
488 masking_key: &[u8], in import_wrapped_key()
647 keyblob_to_upgrade: &[u8], in upgrade_key()
649 ) -> Result<Vec<u8>, Error> { in upgrade_key()
/system/keymint/hal/src/
Drpc.rs51 ) -> binder::Result<Vec<u8>> { in generateEcdsaP256KeyPair()
61 endpointEncryptionCertChain: &[u8], in generateCertificateRequest()
62 challenge: &[u8], in generateCertificateRequest()
65 ) -> binder::Result<Vec<u8>> { in generateCertificateRequest()
80 challenge: &[u8], in generateCertificateRequestV2()
81 ) -> binder::Result<Vec<u8>> { in generateCertificateRequestV2()
Dkeymint.rs114 keyData: &[u8], in importKey()
134 wrappedKeyData: &[u8], in importWrappedKey()
135 wrappingKeyBlob: &[u8], in importWrappedKey()
136 maskingKey: &[u8], in importWrappedKey()
157 keyBlobToUpgrade: &[u8], in upgradeKey()
159 ) -> binder::Result<Vec<u8>> { in upgradeKey()
186 keyBlob: &[u8], in begin()
230 fn convertStorageKeyToEphemeral(&self, storageKeyBlob: &[u8]) -> binder::Result<Vec<u8>> { in convertStorageKeyToEphemeral()
239 keyBlob: &[u8], in getKeyCharacteristics()
240 appId: &[u8], in getKeyCharacteristics()
[all …]
/system/security/keystore2/src/crypto/
Dlib.rs67 pub fn generate_random_data(size: usize) -> Result<Vec<u8>, Error> { in generate_random_data()
78 pub fn hmac_sha256(key: &[u8], msg: &[u8]) -> Result<Vec<u8>, Error> { in hmac_sha256()
99 pub fn aes_gcm_decrypt(data: &[u8], iv: &[u8], tag: &[u8], key: &[u8]) -> Result<ZVec, Error> { in aes_gcm_decrypt()
141 pub fn aes_gcm_encrypt(plaintext: &[u8], key: &[u8]) -> Result<(Vec<u8>, Vec<u8>, Vec<u8>), Error> { in aes_gcm_encrypt()
190 fn get_key(&'a self) -> &'a [u8] { in get_key()
200 pub fn derive_key(&self, salt: &[u8], key_length: usize) -> Result<ZVec, Error> { in derive_key()
232 pub fn hkdf_extract(secret: &[u8], salt: &[u8]) -> Result<ZVec, Error> { in hkdf_extract()
262 pub fn hkdf_expand(out_len: usize, prk: &[u8], info: &[u8]) -> Result<ZVec, Error> { in hkdf_expand()
391 pub fn ec_point_point_to_oct(point: &EC_POINT) -> Result<Vec<u8>, Error> { in ec_point_point_to_oct()
421 pub fn parse_subject_from_certificate(cert_buf: &[u8]) -> Result<Vec<u8>, Error> { in parse_subject_from_certificate()
/system/keymint/common/src/tag/
Dlegacy.rs16 pub fn consume_u8(data: &mut &[u8]) -> Result<u8, Error> { in consume_u8()
80 pub fn consume_vec(data: &mut &[u8]) -> Result<Vec<u8>, Error> { in consume_vec()
111 pub fn serialize(params: &[KeyParam]) -> Result<Vec<u8>, Error> { in serialize()
255 data: &mut &[u8], in consume_blob()
257 blob_data: &[u8], in consume_blob()
258 ) -> Result<Vec<u8>, Error> { in consume_blob()
/system/keymint/common/src/crypto/
Dtraits.rs47 fn add_entropy(&mut self, data: &[u8]); in add_entropy()
49 fn fill_bytes(&mut self, dest: &mut [u8]); in fill_bytes()
62 fn eq(&self, left: &[u8], right: &[u8]) -> bool; in eq()
64 fn ne(&self, left: &[u8], right: &[u8]) -> bool { in ne()
113 data: &[u8], in import_key()
158 fn import_key(&self, data: &[u8], _params: &[keymint::KeyParam]) -> Result<KeyMaterial, Error> { in import_key()
197 data: &[u8], in import_key()
241 data: &[u8], in import_pkcs8_key()
255 fn subject_public_key(&self, key: &OpaqueOr<rsa::Key>) -> Result<Vec<u8>, Error> { in subject_public_key()
310 data: &[u8], in import_pkcs8_key()
[all …]
/system/keymint/boringssl/src/
Drng.rs10 fn add_entropy(&mut self, data: &[u8]) { in add_entropy()
26 fn fill_bytes(&mut self, dest: &mut [u8]) { in fill_bytes()
Daes.rs123 fn update(&mut self, data: &[u8]) -> Result<Vec<u8>, Error> { in update()
133 fn finish(mut self: Box<Self>) -> Result<Vec<u8>, Error> { in finish()
154 fn update(&mut self, data: &[u8]) -> Result<Vec<u8>, Error> { in update()
158 fn finish(mut self: Box<Self>) -> Result<Vec<u8>, Error> { in finish()
195 fn update(&mut self, data: &[u8]) -> Result<Vec<u8>, Error> { in update()
241 fn finish(mut self: Box<Self>) -> Result<Vec<u8>, Error> { in finish()
/system/security/keystore2/apc_compat/
Dapc_compat.rs78 tbs_message: *const u8, in confirmation_result_callback()
80 confirmation_token: *const u8, in confirmation_result_callback()
151 extra_data: &[u8], in prompt_user_confirmation()
157 F: FnOnce(u32, Option<&[u8]>, Option<&[u8]>) + 'static, in prompt_user_confirmation()
/system/keymint/common/src/
Dcrypto.rs164 buf: &'a mut Vec<u8>, in subject_public_key_info()
428 caller_nonce: Option<&Vec<u8>>, in nonce()
430 ) -> Result<Vec<u8>, Error> { in nonce()
448 pub fn hmac_sha256(hmac: &dyn Hmac, key: &[u8], data: &[u8]) -> Result<Vec<u8>, Error> { in hmac_sha256()
456 fn extract(&self, mut salt: &[u8], ikm: &[u8]) -> Result<OpaqueOr<hmac::Key>, Error> { in extract()
467 info: &[u8], in expand()
469 ) -> Result<Vec<u8>, Error> { in expand()
497 label: &[u8], in ckdf()
498 chunks: &[&[u8]], in ckdf()
500 ) -> Result<Vec<u8>, Error> { in ckdf()
/system/nfc/src/include/
Dnfc_types.h62 #define UINT8_TO_STREAM(p, u8) \ argument
64 #define INT8_TO_STREAM(p, u8) \ argument
76 #define STREAM_TO_UINT8(u8, p) \ argument
127 #define UINT8_TO_BE_STREAM(p, u8) \ argument
135 #define BE_STREAM_TO_UINT8(u8, p) \ argument
157 #define UINT8_TO_BE_FIELD(p, u8) \ argument
/system/keymint/wire/src/
Dlegacy.rs169 ) -> Result<Vec<u8>, Error> { in serialize_trusty_response_message()
192 pub fn serialize_trusty_rsp(rsp: TrustyPerformOpRsp) -> Result<Vec<u8>, Error> { in serialize_trusty_rsp()
197 fn serialize_trusty_raw_rsp(cmd: u32, raw_data: &[u8]) -> Result<Vec<u8>, Error> { in serialize_trusty_raw_rsp()
207 pub fn serialize_trusty_secure_rsp(rsp: TrustyPerformSecureOpRsp) -> Result<Vec<u8>, Error> { in serialize_trusty_secure_rsp()
247 ) -> Result<Vec<u8>, Error> { in serialize_trusty_error_rsp()
258 ) -> Result<Vec<u8>, Error> { in serialize_trusty_secure_error_rsp()
267 fn deserialize(data: &[u8]) -> Result<(Self, &[u8]), Error>; in deserialize()
272 fn deserialize(data: &[u8]) -> Result<(Self, &[u8]), Error> { in deserialize()
287 fn deserialize(data: &[u8]) -> Result<(Self, &[u8]), Error> { in deserialize()
301 impl InnerSerialize for u8 { implementation
[all …]
/system/keymint/common/src/keyblob/
Dtests.rs10 fn add_entropy(&mut self, _data: &[u8]) {} in add_entropy()
11 fn fill_bytes(&mut self, dest: &mut [u8]) { in fill_bytes()

1234