Home
last modified time | relevance | path

Searched refs:key_len (Results 1 – 14 of 14) sorted by relevance

/trusty/user/app/sample/hwcrypto/
Dhwkey_srv.c219 size_t key_len; in hwkey_get_derived_key() local
221 data->retriever(data, key_buffer, sizeof(key_buffer), &key_len); in hwkey_get_derived_key()
227 switch (key_len) { in hwkey_get_derived_key()
235 TLOGE("invalid key length: (%zd)\n", key_len); in hwkey_get_derived_key()
342 size_t key_len) { in hwkey_handle_derive_key_impl() argument
348 if (!context || !key || key_len == 0) { in hwkey_handle_derive_key_impl()
354 return derive_key_v1(uuid, context, context_len, key, key_len); in hwkey_handle_derive_key_impl()
370 size_t key_len = ikm_len; in hwkey_handle_derive_key_cmd() local
371 if (key_len > HWKEY_MAX_MSG_SIZE - sizeof(*hdr)) { in hwkey_handle_derive_key_cmd()
372 TLOGE("Key length exceeds message size: %zu\n", key_len); in hwkey_handle_derive_key_cmd()
[all …]
Dhwkey_srv_priv.h151 size_t key_len);
176 size_t key_len);
Dhwkey_srv_fake_provider.c116 size_t key_len) { in derive_key_v1() argument
121 if (!HKDF(key_buf, key_len, EVP_sha256(), (const uint8_t*)fake_device_key, in derive_key_v1()
125 memset(key_buf, 0, key_len); in derive_key_v1()
192 size_t key_len) { in root_of_trust_derive_key() argument
260 if (!HKDF(key_buf, key_len, EVP_sha256(), secret_key, secret_key_len, in root_of_trust_derive_key()
264 memset(key_buf, 0, key_len); in root_of_trust_derive_key()
295 size_t key_len) { in derive_key_versioned_v1() argument
316 if (key_len == 0) { in derive_key_versioned_v1()
386 key_buf, key_len); in derive_key_versioned_v1()
/trusty/user/app/sample/hwcrypto-unittest/
Dmain.c179 versioned_args.key_len = size; in TEST_F()
222 static const size_t key_len = sizeof(dest); in TEST_F() local
230 .key_len = key_len, in TEST_F()
233 memset(dest, 0, key_len); in TEST_F()
234 memset(dest2, 0, key_len); in TEST_F()
242 rc = memcmp(dest, dest2, key_len); in TEST_F()
248 memset(dest2, 0, key_len); in TEST_F()
254 rc = memcmp(dest, dest2, key_len); in TEST_F()
261 memset(dest, 0, key_len); in TEST_F()
262 memset(dest2, 0, key_len); in TEST_F()
[all …]
/trusty/user/base/lib/hwkey/
Dhwkey.c231 if (args->key == NULL && args->key_len != 0) { in hwkey_derive_versioned()
235 if (args->key != NULL && args->key_len == 0) { in hwkey_derive_versioned()
249 args->key_len > max_payload_len) { in hwkey_derive_versioned()
263 .key_len = args->key_len, in hwkey_derive_versioned()
286 sizeof(resp_msg), args->key, args->key_len); in hwkey_derive_versioned()
298 (size_t)rc != sizeof(resp_msg) + args->key_len) { in hwkey_derive_versioned()
300 (size_t)rc, sizeof(resp_msg) + args->key_len); in hwkey_derive_versioned()
/trusty/hardware/nxp/app/hwcrypto/
Dhwkey_srv_provider.c54 size_t* key_len) { in derive_key_v1() argument
57 *key_len = 0; in derive_key_v1()
70 *key_len = ikm_len; in derive_key_v1()
Dhwkey_srv.c179 size_t key_len = sizeof(key_data); in hwkey_handle_derive_key_cmd() local
188 key_data, &key_len); in hwkey_handle_derive_key_cmd()
193 key_len = 0; in hwkey_handle_derive_key_cmd()
197 rc = hwkey_send_rsp(ctx, msg, key_data, key_len); in hwkey_handle_derive_key_cmd()
198 if (key_len) { in hwkey_handle_derive_key_cmd()
200 memset(key_data, 0, key_len); in hwkey_handle_derive_key_cmd()
Dhwkey_srv_priv.h44 size_t* key_len);
/trusty/user/app/storage/
Dcrypt.c102 size_t key_len; in crypt() local
113 key_len = EVP_CIPHER_key_length(cipher); in crypt()
114 if (key_len > sizeof(*key)) { in crypt()
116 sizeof(*key), key_len); in crypt()
/trusty/user/base/lib/hwkey/include/lib/hwkey/
Dhwkey.h148 size_t key_len; member
/trusty/user/base/interface/hwkey/include/interface/hwkey/
Dhwkey.h292 uint32_t key_len; member
/trusty/user/app/sample/hwaes/
Dmain.c120 uint32_t key_len = sizeof(key_buffer); in hwaes_aes_op() local
122 key_buffer, &key_len); in hwaes_aes_op()
130 key.len = key_len; in hwaes_aes_op()
/trusty/user/base/lib/hwkey/rust/src/
Dlib.rs219 key_len: key_buf.len() as u32, in derive()
566 serializer.serialize_as_bytes(&self.msg.key_len)?; in serialize()
635 if bytes.len() - header_size != msg.key_len as usize { in deserialize()
639 msg.key_len in deserialize()
/trusty/user/app/keymaster/
Dtrusty_keymaster_context.cpp389 .key_len = 0, in GetKdfState()
837 .key_len = kAesKeySize, in DeriveMasterKey()