Home
last modified time | relevance | path

Searched refs:iv (Results 1 – 25 of 26) sorted by relevance

12

/trusty/user/app/storage/
Dcrypt.h31 struct iv { struct
34 #define IV_INITIAL_ZERO_VALUE(iv) \ argument
62 int generate_iv(struct iv* iv_out);
67 const struct iv* iv_in);
72 const struct iv* iv_in);
Dblock_cache.h26 struct iv;
70 const struct iv* iv,
75 const struct iv* iv,
105 const struct iv* iv,
Dcrypt.c97 const struct iv* iv, in crypt() argument
110 STATIC_ASSERT(sizeof(*iv) >= EVP_MAX_IV_LENGTH); in crypt()
124 evp_ret = EVP_CipherInit_ex(cipher_ctx, cipher, NULL, key->byte, iv->byte, in crypt()
237 int generate_iv(struct iv* iv_out) { in generate_iv()
260 const struct iv* iv_in) { in storage_encrypt()
277 const struct iv* iv_in) { in storage_decrypt()
Dblock_cache.c343 const struct iv* iv = NULL; /* TODO: support external iv */ in block_cache_entry_decrypt() local
351 if (!iv) { in block_cache_entry_decrypt()
352 iv = (void*)entry->data; in block_cache_entry_decrypt()
353 assert(decrypt_size > sizeof(*iv)); in block_cache_entry_decrypt()
354 decrypt_data += sizeof(*iv); in block_cache_entry_decrypt()
355 decrypt_size -= sizeof(*iv); in block_cache_entry_decrypt()
358 ret = storage_decrypt(entry->key, decrypt_data, decrypt_size, iv); in block_cache_entry_decrypt()
392 struct iv* iv = NULL; /* TODO: support external iv */ in block_cache_entry_encrypt() local
399 if (!iv) { in block_cache_entry_encrypt()
400 iv = (void*)entry->data; in block_cache_entry_encrypt()
[all …]
Dcheckpoint.c37 struct iv iv; member
Dfile.c47 struct iv iv; member
356 return fs->dev->block_size - sizeof(struct iv); in get_file_block_size()
452 return data + sizeof(struct iv); in file_get_block_etc()
504 block_put(data - sizeof(struct iv), data_ref); in file_block_put()
527 block_map_put_dirty(tr, &block_map, file_block, data - sizeof(struct iv), in file_block_put_dirty()
Dsuper.c139 struct iv iv; member
DREADME.md70 Every block in the file system starts with a 16 byte iv struct. Each time the
/trusty/user/base/app/swaes-benchmark/
Dvectors.h5586 const uint8_t* iv; member
5626 .output_size = arg_input_size / 8, .iv = iv_##arg_mode, \
Dswaes-bench.c193 param->iv); in encrypt()
243 param->iv); in decrypt()
/trusty/user/base/lib/hwaes/srv/include/lib/hwaes_server/
Dhwaes_server.h65 struct hwaes_arg_in iv; member
/trusty/user/base/lib/hwaes/include/lib/hwaes/
Dhwaes.h98 struct hwcrypt_arg_in iv; member
/trusty/user/base/app/hwaes-unittest/
Dhwaes-test.c73 struct hwcrypt_arg_in iv; member
229 TV_DATA(name_, iv), \
252 args->iv = vector->iv; in parse_vector()
398 .iv = in TEST_F_SETUP()
426 .iv = in TEST_F_SETUP()
589 _state->args_encrypt.iv.len = 0; in TEST_F()
617 _state->args_decrypt.iv.len = 0; in TEST_F()
815 ASSERT_LE(HWAES_GCM_IV_SIZE, _state->args_encrypt.iv.len, in TEST_F()
817 _state->args_encrypt.iv.len = HWAES_GCM_IV_SIZE; in TEST_F()
830 ASSERT_LE(HWAES_GCM_IV_SIZE, _state->args_decrypt.iv.len, in TEST_F()
[all …]
/trusty/user/app/sample/hwaes/
Dmain.c208 if (EVP_CIPHER_CTX_iv_length(cipher_ctx) != args->iv.len) { in hwaes_aes_op()
209 TLOGE("invalid iv length: (%zd)\n", args->iv.len); in hwaes_aes_op()
214 args->iv.data_ptr, args->encrypt); in hwaes_aes_op()
/trusty/user/base/lib/hwaes/
Dhwaes.c383 hwaes_set_shm_arg_in(&args->iv, &cmd_header.iv, shm_descs, &shm); in hwaes_crypt()
401 hwaes_set_iov_arg_in(&args->iv, &cmd_header.iv, &req_iov); in hwaes_crypt()
/trusty/user/base/interface/hwaes/include/interface/hwaes/
Dhwaes.h224 struct hwaes_data_desc iv; member
/trusty/user/base/app/hwaes-benchmark/
Dhwaes-bench.c122 const uint8_t* iv; member
279 .iv = in BENCH_SETUP()
281 .data_ptr = CUR_PARAM.iv, in BENCH_SETUP()
Dvectors.h5598 .output_size = arg_input_size / 8, .iv = iv_##arg_mode, \
/trusty/user/base/lib/apploader_package/
Dpackage.cpp131 cryptArgs.iv.data_ptr = nonce.data(); in hwaesDecryptAesGcmInPlace()
132 cryptArgs.iv.len = nonce.size(); in hwaesDecryptAesGcmInPlace()
Dcose.cpp819 std::optional<std::vector<uint8_t>> iv = getRandom(kAesGcmIvSize); in coseEncryptAesGcm() local
820 if (!iv) { in coseEncryptAesGcm()
828 [&](auto& enc) { enc.encodeBstr(iv.value()); }); in coseEncryptAesGcm()
846 encryptAesGcm(key, iv.value(), data, gcmAadView); in coseEncryptAesGcm()
/trusty/user/app/storage/test/storage_host_test/
Dstorage_host_test.c98 size_t file_block_size = tr->fs->dev->block_size - sizeof(struct iv); in file_test_open()
112 block_data_rw = (void*)block_data_rw + sizeof(struct iv); in file_test_open()
119 (void*)block_data_rw - sizeof(struct iv), in file_test_open()
142 block_data_ro = (void*)block_data_ro + sizeof(struct iv); in file_test_open()
147 file_block_put((void*)block_data_ro - sizeof(struct iv), &ref); in file_test_open()
/trusty/user/app/sample/hwcrypto/
Dhwkey_srv.c241 uint8_t* iv = NULL; in hwkey_get_derived_key() local
309 if (iv) { in hwkey_get_derived_key()
310 free(iv); in hwkey_get_derived_key()
/trusty/user/base/lib/hwaes/srv/
Dhwaes_server.c342 rc = hwaes_set_arg_in(&cmd_header->iv, PROT_READ, shms, num_handles, in hwaes_handle_aes_cmd()
343 req_msg_buf, req_msg_size, &req_offset, &args.iv); in hwaes_handle_aes_cmd()
/trusty/user/app/keymaster/
Dtrusty_keymaster_context.cpp1313 KeymasterBlob iv; in UnwrapKey() local
1318 error = parse_wrapped_key(wrapped_key_blob, &iv, &transit_key, &secure_key, in UnwrapKey()
1383 .Authorization(TAG_NONCE, iv) in UnwrapKey()
1396 .Authorization(TAG_NONCE, iv) in UnwrapKey()
/trusty/user/app/storage/test/block_host_test/
Dblock_test.c482 const size_t header_size = sizeof(struct iv) + 8; in block_tree_test_etc()
1073 size_t file_block_size = master_tr->fs->dev->block_size - sizeof(struct iv); in file_allocate_all_test()
1176 size_t file_block_size = tr->fs->dev->block_size - sizeof(struct iv); in file_test_open()
1187 block_data_rw = (void*)block_data_rw + sizeof(struct iv); in file_test_open()
1194 (void*)block_data_rw - sizeof(struct iv), in file_test_open()
1217 block_data_ro = (void*)block_data_ro + sizeof(struct iv); in file_test_open()
1222 file_block_put((void*)block_data_ro - sizeof(struct iv), &ref); in file_test_open()
2518 data_block_num = data_to_block_num(block_data_ro - sizeof(struct iv)); in select_data_block()
2665 size_t file_block_size = tr->fs->dev->block_size - sizeof(struct iv); in fs_check_sparse_file_test()

12