Home
last modified time | relevance | path

Searched refs:out_len (Results 1 – 18 of 18) sorted by relevance

/system/security/keystore2/src/crypto/
Dcrypto.cpp101 int out_len; in AES_gcm_encrypt() local
103 EVP_EncryptUpdate(ctx.get(), out_pos, &out_len, in, len); in AES_gcm_encrypt()
104 out_pos += out_len; in AES_gcm_encrypt()
105 EVP_EncryptFinal_ex(ctx.get(), out_pos, &out_len); in AES_gcm_encrypt()
106 out_pos += out_len; in AES_gcm_encrypt()
139 int out_len; in AES_gcm_decrypt() local
141 EVP_DecryptUpdate(ctx.get(), out_pos, &out_len, in, len); in AES_gcm_decrypt()
142 out_pos += out_len; in AES_gcm_decrypt()
143 if (!EVP_DecryptFinal_ex(ctx.get(), out_pos, &out_len)) { in AES_gcm_decrypt()
148 out_pos += out_len; in AES_gcm_decrypt()
[all …]
Dlib.rs203 pub fn derive_key_pbkdf2(&self, salt: &[u8], out_len: usize) -> Result<ZVec, Error> { in derive_key_pbkdf2()
207 match out_len { in derive_key_pbkdf2()
213 let mut result = ZVec::new(out_len)?; in derive_key_pbkdf2()
231 pub fn derive_key_hkdf(&self, salt: &[u8], out_len: usize) -> Result<ZVec, Error> { in derive_key_hkdf()
234 hkdf_expand(out_len, &prk, &info) in derive_key_hkdf()
247 let mut out_len = 0; in hkdf_extract() localVariable
253 &mut out_len, in hkdf_extract()
264 if out_len > max_size { in hkdf_extract()
269 buf.reduce_len(out_len); in hkdf_extract()
274 pub fn hkdf_expand(out_len: usize, prk: &[u8], info: &[u8]) -> Result<ZVec, Error> { in hkdf_expand()
[all …]
Dcrypto.hpp45 bool HKDFExtract(uint8_t *out_key, size_t *out_len,
49 bool HKDFExpand(uint8_t *out_key, size_t out_len,
/system/keymaster/km_openssl/
Dckdf.cpp105 size_t out_len; in DEFINE_OPENSSL_OBJECT_POINTER() local
107 if (!CMAC_Final(ctx.get(), output_pos, &out_len)) return TranslateLastOpenSslError(); in DEFINE_OPENSSL_OBJECT_POINTER()
108 output_pos += out_len; in DEFINE_OPENSSL_OBJECT_POINTER()
111 if (!CMAC_Final(ctx.get(), cmac, &out_len)) return TranslateLastOpenSslError(); in DEFINE_OPENSSL_OBJECT_POINTER()
Decdsa_operation.cpp206 size_t out_len = ED25519_SIGNATURE_LEN; in Finish() local
207 if (!EVP_DigestSign(&ctx, output->peek_write(), &out_len, data_.peek_read(), in Finish()
213 output->advance_write(out_len); in Finish()
/system/keymint/boringssl/src/
Ddes.rs76 let out_len = self in update() localVariable
80 output.truncate(out_len); in update()
86 let out_len = ossl!(self.crypter.finalize(&mut output))?; in finish() localVariable
87 output.truncate(out_len); in finish()
Daes.rs140 let out_len = self in update() localVariable
144 output.truncate(out_len); in update()
150 let out_len = ossl!(self.crypter.finalize(&mut output))?; in finish() localVariable
151 output.truncate(out_len); in finish()
239 let out_len = self in update() localVariable
243 offset += out_len; in update()
273 let out_len = self in finish() localVariable
277 if out_len != 0 { in finish()
281 out_len in finish()
/system/libufdt/
Dufdt_node.c123 char *ufdt_node_get_fdt_prop_data(const struct ufdt_node *node, int *out_len) { in ufdt_node_get_fdt_prop_data() argument
128 if (out_len != NULL) { in ufdt_node_get_fdt_prop_data()
135 *out_len = prop_len; in ufdt_node_get_fdt_prop_data()
142 int *out_len) { in ufdt_node_get_fdt_prop_data_by_name_len() argument
144 ufdt_node_get_property_by_name_len(node, name, len), out_len); in ufdt_node_get_fdt_prop_data_by_name_len()
148 const char *name, int *out_len) { in ufdt_node_get_fdt_prop_data_by_name() argument
150 out_len); in ufdt_node_get_fdt_prop_data_by_name()
/system/libufdt/include/
Dlibufdt.h78 char *ufdt_node_get_fdt_prop_data(const struct ufdt_node *node, int *out_len);
93 int *out_len);
95 const char *name, int *out_len);
/system/keymaster/legacy_support/
Dkeymaster1_engine.cpp274 int Keymaster1Engine::rsa_sign_raw(RSA* rsa, size_t* out_len, uint8_t* out, size_t max_out, in rsa_sign_raw() argument
291 *out_len = std::min(output.data_length, max_out); in rsa_sign_raw()
292 memcpy(out, output.data, *out_len); in rsa_sign_raw()
297 int Keymaster1Engine::rsa_decrypt(RSA* rsa, size_t* out_len, uint8_t* out, size_t max_out, in rsa_decrypt() argument
314 *out_len = std::min(output.data_length, max_out); in rsa_decrypt()
315 memcpy(out, output.data, *out_len); in rsa_decrypt()
/system/keymaster/include/keymaster/legacy_support/
Dkeymaster1_engine.h103 static int rsa_sign_raw(RSA* rsa, size_t* out_len, uint8_t* out, size_t max_out,
105 static int rsa_decrypt(RSA* rsa, size_t* out_len, uint8_t* out, size_t max_out,
/system/keymint/common/src/
Dcrypto.rs504 out_len: usize, in expand()
507 let n = (out_len + SHA256_DIGEST_LEN - 1) / SHA256_DIGEST_LEN; in expand()
523 okm.truncate(out_len); in expand()
535 out_len: usize, in ckdf()
541 let blocks: u32 = ((out_len + aes::BLOCK_SIZE - 1) / aes::BLOCK_SIZE) as u32; in ckdf()
542 let l = (out_len * 8) as u32; // in bits in ckdf()
545 let mut output = vec_try![0; out_len]?; in ckdf()
/system/security/keystore2/src/fuzzers/
Dkeystore2_unsafe_fuzzer.rs79 out_len: usize,
153 FuzzCommand::HkdfExpand { out_len, hkdf_prk, hkdf_info } => {
154 let _res = hkdf_expand(out_len % MAX_SIZE_MODIFIER, hkdf_prk, hkdf_info);
/system/keymint/tests/src/
Dlib.rs87 out_len: usize, in test_hkdf() field
97 out_len: 42, in test_hkdf()
127 out_len: 82, in test_hkdf()
142 out_len: 42, in test_hkdf()
156 let got = hmac.hkdf(&salt, &ikm, &info, test.out_len).unwrap(); in test_hkdf()
/system/nfc/src/nfc/ndef/
Dndef_utils.cc1326 uint32_t out_len, max_out_len; in NDEF_MsgCopyAndDechunk() local
1342 NDEF_MsgInit(p_dest, max_out_len, &out_len); in NDEF_MsgCopyAndDechunk()
1356 status = NDEF_MsgAppendPayload(p_dest, max_out_len, &out_len, in NDEF_MsgCopyAndDechunk()
1360 p_prev_rec = p_dest + out_len; in NDEF_MsgCopyAndDechunk()
1362 status = NDEF_MsgAddRec(p_dest, max_out_len, &out_len, tnf, p_type, in NDEF_MsgCopyAndDechunk()
1369 *p_out_len = out_len; in NDEF_MsgCopyAndDechunk()
/system/keymint/common/src/crypto/
Dtraits.rs444 fn hkdf(&self, salt: &[u8], ikm: &[u8], info: &[u8], out_len: usize) -> Result<Vec<u8>, Error> { in hkdf()
446 self.expand(&prk, info, out_len) in hkdf()
457 out_len: usize, in expand()
473 out_len: usize, in ckdf()
/system/keymaster/key_blob_utils/
Dauth_encrypted_key_blob.cpp99 size_t out_len = EVP_MAX_MD_SIZE; in DeriveAesGcmKeyEncryptionKey() local
100 if (!HKDF_extract(prk.peek_write(), &out_len, EVP_sha256(), master_key.key_material, in DeriveAesGcmKeyEncryptionKey()
109 if (!prk.advance_write(out_len) || !prk.available_read() || !info->available_read()) { in DeriveAesGcmKeyEncryptionKey()
/system/security/keystore2/src/
Dboot_level_keys.rs275 out_len: usize, in expand_key()
280 .map(|k| hkdf_expand(out_len, k, info)) in expand_key()