Home
last modified time | relevance | path

Searched defs:Error (Results 1 – 25 of 66) sorted by relevance

123

/system/keymint/common/src/
Dtag.rs135 pub fn characteristics_valid(characteristics: &[KeyParam]) -> Result<(), Error> { in characteristics_valid() argument
155 ) -> Result<(), Error> { in transcribe_tags() argument
168 pub fn get_algorithm(params: &[KeyParam]) -> Result<Algorithm, Error> { in get_algorithm() argument
173 pub fn get_block_mode(params: &[KeyParam]) -> Result<BlockMode, Error> { in get_block_mode() argument
178 pub fn get_padding_mode(params: &[KeyParam]) -> Result<PaddingMode, Error> { in get_padding_mode() argument
183 pub fn get_digest(params: &[KeyParam]) -> Result<Digest, Error> { in get_digest() argument
188 pub fn get_ec_curve(params: &[KeyParam]) -> Result<EcCurve, Error> { in get_ec_curve() argument
194 pub fn get_mgf_digest(params: &[KeyParam]) -> Result<Digest, Error> { in get_mgf_digest() argument
200 pub fn get_cert_serial(params: &[KeyParam]) -> Result<&[u8], Error> { in get_cert_serial() argument
210 ) -> Result<&[KeyParam], Error> { in characteristics_at() argument
[all …]
Dlib.rs22 pub enum Error { enum
113 pub fn try_to_vec<T: Clone>(s: &[T]) -> Result<Vec<T>, Error> { in try_to_vec() argument
149 impl From<alloc::collections::TryReserveError> for Error { implementation
158 impl From<CborError> for Error { implementation
164 impl From<cbor::value::Error> for Error { implementation
170 impl From<der::Error> for Error { implementation
Dkeyblob.rs48 pub fn new(data: &[u8]) -> Result<Self, Error> { in new() argument
152 ) -> Result<PlaintextKeyBlob, Error>; in convert_legacy_key() argument
155 fn delete_legacy_key(&mut self, keyblob: &[u8]) -> Result<(), Error>; in delete_legacy_key() argument
188 ) -> Result<SecureDeletionData, Error>; in get_or_create_factory_reset_secret() argument
192 fn get_factory_reset_secret(&self) -> Result<SecureDeletionData, Error>; in get_factory_reset_secret() argument
202 ) -> Result<(SecureDeletionSlot, SecureDeletionData), Error>; in new_secret() argument
205 fn get_secret(&self, slot: SecureDeletionSlot) -> Result<SecureDeletionData, Error>; in get_secret() argument
208 fn delete_secret(&mut self, slot: SecureDeletionSlot) -> Result<(), Error>; in delete_secret() argument
236 ) -> Result<(Self, SecureDeletionData), Error> { in new() argument
273 ) -> Result<crypto::aes::Key, Error> { argument
[all …]
/system/keymint/common/src/tag/
Dlegacy.rs16 pub fn consume_u8(data: &mut &[u8]) -> Result<u8, Error> { in consume_u8() argument
29 pub fn consume_bool(data: &mut &[u8]) -> Result<(), Error> { in consume_bool() argument
39 pub fn consume_u32(data: &mut &[u8]) -> Result<u32, Error> { in consume_u32() argument
49 pub fn consume_i32(data: &mut &[u8]) -> Result<i32, Error> { in consume_i32() argument
59 pub fn consume_u64(data: &mut &[u8]) -> Result<u64, Error> { in consume_u64() argument
69 pub fn consume_i64(data: &mut &[u8]) -> Result<i64, Error> { in consume_i64() argument
80 pub fn consume_vec(data: &mut &[u8]) -> Result<Vec<u8>, Error> { in consume_vec() argument
111 pub fn serialize(params: &[KeyParam]) -> Result<Vec<u8>, Error> { in serialize() argument
258 ) -> Result<Vec<u8>, Error> { in consume_blob() argument
288 pub fn deserialize(data: &mut &[u8]) -> Result<Vec<KeyParam>, Error> { in deserialize() argument
/system/keymint/common/src/crypto/
Dtraits.rs89 ) -> Result<KeyMaterial, Error> { in generate_key() argument
115 ) -> Result<(KeyMaterial, KeySizeInBits), Error> { in import_key() argument
130 ) -> Result<Box<dyn EmittingOperation>, Error>; in begin() argument
138 ) -> Result<Box<dyn AadOperation>, Error>; in begin_aead() argument
149 ) -> Result<KeyMaterial, Error> { in generate_key() argument
158 fn import_key(&self, data: &[u8], _params: &[keymint::KeyParam]) -> Result<KeyMaterial, Error> { in import_key() argument
172 ) -> Result<Box<dyn EmittingOperation>, Error>; in begin() argument
184 ) -> Result<KeyMaterial, Error> { in generate_key() argument
199 ) -> Result<(KeyMaterial, KeySizeInBits), Error> { in import_key() argument
213 ) -> Result<Box<dyn AccumulatingOperation>, Error>; in begin() argument
[all …]
Dhmac.rs21 fn valid_size(key_size: KeySizeInBits, max_size_bits: usize) -> Result<(), Error> { in valid_size() argument
32 pub fn valid_hal_size(key_size: KeySizeInBits) -> Result<(), Error> { in valid_hal_size() argument
37 pub fn valid_strongbox_hal_size(key_size: KeySizeInBits) -> Result<(), Error> { in valid_strongbox_hal_size() argument
48 pub fn new_from(data: &[u8]) -> Result<Key, Error> { in new_from() argument
Drsa.rs60 pub fn subject_public_key(&self) -> Result<Vec<u8>, Error> { in subject_public_key() argument
110 ) -> Result<SubjectPublicKeyInfo<'a>, Error> { in subject_public_key_info() argument
130 pub fn new(params: &[KeyParam]) -> Result<Self, Error> { in new() argument
159 pub fn new(params: &[KeyParam]) -> Result<Self, Error> { in new() argument
181 pub fn import_pkcs8_key(data: &[u8]) -> Result<(KeyMaterial, KeySizeInBits, RsaExponent), Error> { in import_pkcs8_key() argument
198 ) -> Result<(KeyMaterial, KeySizeInBits, RsaExponent), Error> { in import_pkcs1_key() argument
Dec.rs89 type Error = Error; typedef
90 fn try_from(curve: EcCurve) -> Result<NistCurve, Error> { in try_from() argument
148 ) -> Result<SubjectPublicKeyInfo<'a>, Error> { in subject_public_key_info() argument
178 ) -> Result<coset::CoseKey, Error> { in public_cose_key() argument
304 ) -> Result<(Vec<u8>, Vec<u8>), Error> { in coordinates_from_pub_key() argument
353 pub fn import_sec1_private_key(data: &[u8]) -> Result<KeyMaterial, Error> { in import_sec1_private_key() argument
370 pub fn import_pkcs8_key(data: &[u8]) -> Result<KeyMaterial, Error> { in import_pkcs8_key() argument
377 fn import_pkcs8_key_impl(key_info: &pkcs8::PrivateKeyInfo) -> Result<KeyMaterial, Error> { in import_pkcs8_key_impl() argument
455 pub fn import_raw_ed25519_key(data: &[u8]) -> Result<KeyMaterial, Error> { in import_raw_ed25519_key() argument
463 pub fn import_raw_x25519_key(data: &[u8]) -> Result<KeyMaterial, Error> { in import_raw_x25519_key() argument
/system/keymint/ta/src/
Ddevice.rs59 fn root_kek(&self, context: &[u8]) -> Result<OpaqueOr<hmac::Key>, Error>; in root_kek() argument
63 fn kek_context(&self) -> Result<Vec<u8>, Error> { in kek_context() argument
69 fn kak(&self) -> Result<OpaqueOr<aes::Key>, Error>; in kak() argument
78 fn unique_id_hbk(&self, ckdf: &dyn crypto::Ckdf) -> Result<crypto::hmac::Key, Error> { in unique_id_hbk() argument
87 fn timestamp_token_mac_input(&self, token: &TimeStampToken) -> Result<Vec<u8>, Error> { in timestamp_token_mac_input() argument
95 fn hmac(&self, imp: &dyn crypto::Hmac, data: &[u8]) -> Result<Vec<u8>, Error>; in hmac() argument
136 fn signing_key(&self, key_type: SigningKeyType) -> Result<KeyMaterial, Error>; in signing_key() argument
144 fn cert_chain(&self, key_type: SigningKeyType) -> Result<Vec<keymint::Certificate>, Error>; in cert_chain() argument
151 fn get(&self) -> Result<crate::AttestationIdInfo, Error>; in get() argument
154 fn destroy_all(&mut self) -> Result<(), Error>; in destroy_all() argument
[all …]
Dlib.rs150 pub fn split_rsp(mut rsp_data: &[u8], max_size: usize) -> Result<Vec<Vec<u8>>, Error> { in split_rsp() argument
322 fn boot_info(&self) -> Result<&keymint::BootInfo, Error> { in boot_info() argument
335 ) -> Result<(keyblob::PlaintextKeyBlob, Option<SecureDeletionSlot>), Error> { in keyblob_parse_decrypt_backlevel() argument
373 ) -> Result<(keyblob::PlaintextKeyBlob, Option<SecureDeletionSlot>), Error> { in keyblob_parse_decrypt() argument
377 fn check(v: &u32, curr: u32, name: &str) -> Result<(), Error> { in keyblob_parse_decrypt() argument
450 fn key_id(&self, keyblob: &[u8]) -> Result<KeyId, Error> { in key_id() argument
463 fn update_use_count(&mut self, key_id: KeyId, max_uses: u32) -> Result<(), Error> { in update_use_count() argument
501 pub fn set_boot_info(&mut self, boot_info: keymint::BootInfo) -> Result<(), Error> { in set_boot_info() argument
894 fn add_rng_entropy(&mut self, data: &[u8]) -> Result<(), Error> { in add_rng_entropy() argument
904 fn early_boot_ended(&mut self) -> Result<(), Error> { in early_boot_ended() argument
[all …]
Drkp.rs47 pub fn rpc_device_info(&self) -> Result<Vec<u8>, Error> { in rpc_device_info() argument
52 fn rpc_device_info_cbor(&self) -> Result<Value, Error> { in rpc_device_info_cbor() argument
114 pub(crate) fn get_rpc_hardware_info(&self) -> Result<HardwareInfo, Error> { in get_rpc_hardware_info() argument
136 ) -> Result<(MacedPublicKey, Vec<u8>), Error> { in generate_ecdsa_p256_keypair() argument
184 ) -> Result<(DeviceInfo, ProtectedData, Vec<u8>), Error> { in generate_cert_req() argument
196 ) -> Result<Vec<u8>, Error> { in generate_cert_req_v2() argument
288 fn build_maced_pub_key<F>(pub_cose_key: Vec<u8>, compute_mac: F) -> Result<Vec<u8>, Error> in build_maced_pub_key() argument
302 pub fn serialize_cbor(cbor_value: &Value) -> Result<Vec<u8>, Error> { in serialize_cbor() argument
Dsecret.rs10 pub(crate) fn get_shared_secret_params(&mut self) -> Result<SharedSecretParameters, Error> { in get_shared_secret_params() argument
22 ) -> Result<Vec<u8>, Error> { in compute_shared_secret() argument
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() argument
Doperation.rs70 fn check_size(&mut self, len: usize) -> Result<(), Error> { in check_size() argument
107 fn new(key_chars: &[KeyParam]) -> Result<Option<AuthInfo>, Error> { in new() argument
160 ) -> Result<InternalBeginResult, Error> { in begin_operation() argument
428 ) -> Result<(), Error> { in op_update_aad() argument
446 ) -> Result<Vec<u8>, Error> { in op_update() argument
511 ) -> Result<Vec<u8>, Error> { in op_finish() argument
627 pub(crate) fn op_abort(&mut self, op_handle: OpHandle) -> Result<(), Error> { in op_abort() argument
636 fn check_begin_auths(&mut self, key_chars: &[KeyParam], key_blob: &[u8]) -> Result<(), Error> { in check_begin_auths() argument
663 ) -> Result<HardwareAuthenticatedToken, Error> { in check_auth_token() argument
741 fn verify_confirmation_token(&self, data: &[u8], token: Option<&[u8]>) -> Result<(), Error> { in verify_confirmation_token() argument
[all …]
Dclock.rs9 pub(crate) fn generate_timestamp(&self, challenge: i64) -> Result<TimeStampToken, Error> { in generate_timestamp() argument
23 pub fn timestamp_token_mac_input(token: &TimeStampToken) -> Result<Vec<u8>, Error> { in timestamp_token_mac_input() argument
/system/keymint/wire/src/
Dlegacy.rs104 pub enum Error { enum
121 fn from_code_and_data(cmd: u32, data: &[u8]) -> Result<Self, Error>; in from_code_and_data() argument
124 fn deserialize_trusty_request_message<T: TrustyDeserialize>(data: &[u8]) -> Result<T, Error> { in deserialize_trusty_request_message() argument
135 pub fn deserialize_trusty_req(data: &[u8]) -> Result<TrustyPerformOpReq, Error> { in deserialize_trusty_req() argument
140 pub fn deserialize_trusty_secure_req(data: &[u8]) -> Result<TrustyPerformSecureOpReq, Error> { in deserialize_trusty_secure_req() argument
147 fn serialize_into(&self, buf: &mut Vec<u8>) -> Result<(), Error>; in serialize_into() argument
169 ) -> Result<Vec<u8>, Error> { in serialize_trusty_response_message() argument
192 pub fn serialize_trusty_rsp(rsp: TrustyPerformOpRsp) -> Result<Vec<u8>, Error> { in serialize_trusty_rsp() argument
197 fn serialize_trusty_raw_rsp(cmd: u32, raw_data: &[u8]) -> Result<Vec<u8>, Error> { in serialize_trusty_raw_rsp() argument
207 pub fn serialize_trusty_secure_rsp(rsp: TrustyPerformSecureOpRsp) -> Result<Vec<u8>, Error> { in serialize_trusty_secure_rsp() argument
[all …]
/system/keymint/boringssl/src/
Dec.rs57 ) -> Result<crypto::KeyMaterial, Error> { in generate_nist_key() argument
75 ) -> Result<crypto::KeyMaterial, Error> { in generate_ed25519_key() argument
89 ) -> Result<crypto::KeyMaterial, Error> { in generate_x25519_key() argument
99 fn nist_public_key(&self, key: &ec::NistKey, curve: ec::NistCurve) -> Result<Vec<u8>, Error> { in nist_public_key() argument
111 fn ed25519_public_key(&self, key: &ec::Ed25519Key) -> Result<Vec<u8>, Error> { in ed25519_public_key() argument
119 fn x25519_public_key(&self, key: &ec::X25519Key) -> Result<Vec<u8>, Error> { in x25519_public_key() argument
127 fn begin_agree(&self, key: OpaqueOr<Key>) -> Result<Box<dyn AccumulatingOperation>, Error> { in begin_agree() argument
152 ) -> Result<Box<dyn AccumulatingOperation>, Error> { in begin_sign() argument
183 fn update(&mut self, data: &[u8]) -> Result<(), Error> { in update() argument
188 fn finish(self: Box<Self>) -> Result<Vec<u8>, Error> { in finish() argument
[all …]
Daes.rs20 ) -> Result<Box<dyn crypto::EmittingOperation>, Error> { in begin() argument
79 ) -> Result<Box<dyn crypto::AadOperation>, Error> { in begin_aead() argument
123 fn update(&mut self, data: &[u8]) -> Result<Vec<u8>, Error> { in update() argument
133 fn finish(mut self: Box<Self>) -> Result<Vec<u8>, Error> { in finish() argument
148 fn update_aad(&mut self, aad: &[u8]) -> Result<(), Error> { in update_aad() argument
154 fn update(&mut self, data: &[u8]) -> Result<Vec<u8>, Error> { in update() argument
158 fn finish(mut self: Box<Self>) -> Result<Vec<u8>, Error> { in finish() argument
189 fn update_aad(&mut self, aad: &[u8]) -> Result<(), Error> { in update_aad() argument
195 fn update(&mut self, data: &[u8]) -> Result<Vec<u8>, Error> { in update() argument
241 fn finish(mut self: Box<Self>) -> Result<Vec<u8>, Error> { in finish() argument
Drsa.rs39 ) -> Result<crypto::KeyMaterial, Error> { in generate_key() argument
73 ) -> Result<Box<dyn crypto::AccumulatingOperation>, Error> { in begin_decrypt() argument
83 ) -> Result<Box<dyn crypto::AccumulatingOperation>, Error> { in begin_sign() argument
119 fn update(&mut self, data: &[u8]) -> Result<(), Error> { in update() argument
124 fn finish(mut self: Box<Self>) -> Result<Vec<u8>, Error> { in finish() argument
197 ) -> Result<Self, Error> { in new() argument
239 fn update(&mut self, data: &[u8]) -> Result<(), Error> { in update() argument
247 fn finish(self: Box<Self>) -> Result<Vec<u8>, Error> { in finish() argument
277 fn new(key: crypto::rsa::Key, mode: SignMode) -> Result<Self, Error> { in new() argument
295 fn update(&mut self, data: &[u8]) -> Result<(), Error> { in update() argument
[all …]
Dhmac.rs18 ) -> Result<Box<dyn crypto::AccumulatingOperation>, Error> { in begin() argument
76 fn update(&mut self, data: &[u8]) -> Result<(), Error> { in update() argument
87 fn finish(self: Box<Self>) -> Result<Vec<u8>, Error> { in finish() argument
104 fn digest_into_openssl_ffi(digest: Digest) -> Result<*const ffi::EVP_MD, Error> { in digest_into_openssl_ffi() argument
/system/security/keystore2/src/crypto/
Dzvec.rs36 pub enum Error { enum
44 pub fn new(size: usize) -> Result<Self, Error> { in new() argument
64 pub fn try_clone(&self) -> Result<Self, Error> { in try_clone() argument
111 type Error = Error; typedef
113 fn try_from(v: &[u8]) -> Result<Self, Self::Error> { in try_from() argument
123 type Error = Error; typedef
125 fn try_from(mut v: Vec<u8>) -> Result<Self, Self::Error> { in try_from() argument
Dlib.rs67 pub fn generate_random_data(size: usize) -> Result<Vec<u8>, Error> { in generate_random_data() argument
78 pub fn hmac_sha256(key: &[u8], msg: &[u8]) -> Result<Vec<u8>, Error> { in hmac_sha256() argument
99 pub fn aes_gcm_decrypt(data: &[u8], iv: &[u8], tag: &[u8], key: &[u8]) -> Result<ZVec, Error> { in aes_gcm_decrypt() argument
141 pub fn aes_gcm_encrypt(plaintext: &[u8], key: &[u8]) -> Result<(Vec<u8>, Vec<u8>, Vec<u8>), Error> { in aes_gcm_encrypt() argument
200 pub fn derive_key(&self, salt: &[u8], key_length: usize) -> Result<ZVec, Error> { in derive_key() argument
226 pub fn try_clone(&self) -> Result<Password<'static>, Error> { in try_clone() argument
232 pub fn hkdf_extract(secret: &[u8], salt: &[u8]) -> Result<ZVec, Error> { in hkdf_extract() argument
262 pub fn hkdf_expand(out_len: usize, prk: &[u8], info: &[u8]) -> Result<ZVec, Error> { in hkdf_expand() argument
325 pub fn ecdh_compute_key(pub_key: &EC_POINT, priv_key: &ECKey) -> Result<ZVec, Error> { in ecdh_compute_key() argument
357 pub fn ec_key_marshal_private_key(key: &ECKey) -> Result<ZVec, Error> { in ec_key_marshal_private_key() argument
[all …]
/system/security/keystore2/src/
Derror.rs45 pub enum Error { enum
64 impl Error { implementation
81 pub fn map_km_error<T>(r: BinderResult<T>) -> Result<T, Error> { in map_km_error() argument
109 pub fn map_rem_prov_error<T>(r: BinderResult<T>) -> Result<T, Error> { in map_rem_prov_error() argument
119 pub fn map_binder_status<T>(r: BinderResult<T>) -> Result<T, Error> { in map_binder_status() argument
134 pub fn map_binder_status_code<T>(r: Result<T, StatusCode>) -> Result<T, Error> { in map_binder_status_code() argument
211 F1: FnOnce(anyhow::Error) -> anyhow::Error, in map_err_with()
/system/keymint/hal/src/
Denv.rs16 type Error = String; typedef
19 fn extract_u32(value: Option<regex::Match>) -> Result<u32, Error> { in extract_u32() argument
32 pub fn get_property(name: &str) -> Result<String, Error> { in get_property() argument
41 pub fn extract_truncated_patchlevel(prop_value: &str) -> Result<u32, Error> { in extract_truncated_patchlevel() argument
58 pub fn extract_patchlevel(prop_value: &str) -> Result<u32, Error> { in extract_patchlevel() argument
82 ) -> Result<SetHalInfoRequest, Error> { in populate_hal_info_from() argument
Dhal.rs76 type Error; typedef
77 fn try_fromm(val: T) -> Result<Self, Self::Error>; in try_fromm() argument
85 type Error; typedef
86 fn try_innto(self) -> Result<T, Self::Error>; in try_innto()
102 type Error = U::Error; typedef
103 fn try_innto(self) -> Result<U, Self::Error> { in try_innto()
391 type Error = wire::ValueNotRecognized; typedef
392 fn try_fromm(val: keymint::AttestationKey::AttestationKey) -> Result<Self, Self::Error> { in try_fromm() argument
405 type Error = wire::ValueNotRecognized; typedef
406 fn try_fromm(val: keymint::HardwareAuthToken::HardwareAuthToken) -> Result<Self, Self::Error> { in try_fromm() argument
[all …]
/system/keymint/common/src/keyblob/
Dsdd_mem.rs27 ) -> Result<SecureDeletionData, Error> { in get_or_create_factory_reset_secret() argument
37 fn get_factory_reset_secret(&self) -> Result<SecureDeletionData, Error> { in get_factory_reset_secret() argument
51 ) -> Result<(SecureDeletionSlot, SecureDeletionData), Error> { in new_secret() argument
63 fn get_secret(&self, slot: SecureDeletionSlot) -> Result<SecureDeletionData, Error> { in get_secret() argument
74 fn delete_secret(&mut self, slot: SecureDeletionSlot) -> Result<(), Error> { in delete_secret() argument

123