Home
last modified time | relevance | path

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

/aosp12/system/extras/libfec/
H A Dfec_verity.cpp104 uint64_t hashes = file_size / FEC_BLOCKSIZE; in verity_get_size()
121 return total * FEC_BLOCKSIZE; in verity_get_size()
132 EVP_DigestUpdate(mdctx, block, FEC_BLOCKSIZE); in get_hash()
195 if (fec_pread(f, data, FEC_BLOCKSIZE, data_offset) != FEC_BLOCKSIZE) { in ecc_read_hashes()
208 uint8_t data[FEC_BLOCKSIZE]; in verify_tree()
256 data_offset += blocks * FEC_BLOCKSIZE; in verify_tree()
272 data_offset = hash_offset + FEC_BLOCKSIZE; in verify_tree()
317 std::copy(data, data + FEC_BLOCKSIZE, in verify_tree()
323 data_offset += blocks * FEC_BLOCKSIZE; in verify_tree()
384 if (token != stringify(FEC_BLOCKSIZE)) { in parse_table()
[all …]
H A Dfec_read.cpp80 uint64_t n = offset / FEC_BLOCKSIZE; in is_erasure()
110 check(offset % FEC_BLOCKSIZE == 0); in __ecc_read()
134 uint8_t bbuf[FEC_BLOCKSIZE] = {0}; in __ecc_read()
204 return FEC_BLOCKSIZE; in __ecc_read()
252 uint64_t curr = offset / FEC_BLOCKSIZE; in ecc_read()
256 uint8_t data[FEC_BLOCKSIZE]; in ecc_read()
265 size_t copy = FEC_BLOCKSIZE - coff; in ecc_read()
304 uint64_t curr = offset / FEC_BLOCKSIZE; in verity_read()
307 uint8_t data[FEC_BLOCKSIZE]; in verity_read()
322 memset(data, 0, FEC_BLOCKSIZE); in verity_read()
[all …]
H A Dfec_open.cpp49 if (file_size % FEC_BLOCKSIZE) { in find_offset()
61 mi = ((hi + lo) / (2 * FEC_BLOCKSIZE)) * FEC_BLOCKSIZE; in find_offset()
65 lo = mi + FEC_BLOCKSIZE; in find_offset()
121 offset -= offset % FEC_BLOCKSIZE; in parse_ecc_header()
144 header.fec_size % FEC_BLOCKSIZE) { in parse_ecc_header()
166 uint8_t buf[FEC_BLOCKSIZE]; in parse_ecc_header()
168 uint32_t len = FEC_BLOCKSIZE; in parse_ecc_header()
201 check(offset % FEC_BLOCKSIZE == 0); in parse_ecc()
202 check(offset < UINT64_MAX - FEC_BLOCKSIZE); in parse_ecc()
351 uint64_t offset = f->data_size - FEC_BLOCKSIZE; in load_ecc()
[all …]
H A Dfec_process.cpp62 uint64_t start = (offset / FEC_BLOCKSIZE) * FEC_BLOCKSIZE; in process()
63 size_t blocks = fec_div_round_up(count, FEC_BLOCKSIZE); in process()
65 size_t count_per_thread = fec_div_round_up(blocks, threads) * FEC_BLOCKSIZE; in process()
H A Davb_utils.cpp128 f->ecc.blocks = fec_div_round_up(f->data_size, FEC_BLOCKSIZE); in parse_avb_image()
148 hashtree_descriptor.tree_offset / FEC_BLOCKSIZE, salt, in parse_avb_image()
H A Dfec_private.h48 #define VERITY_METADATA_SIZE (8 * FEC_BLOCKSIZE)
/aosp12/system/extras/verity/fec/
H A Dimage.cpp70 } else if (size % FEC_BLOCKSIZE) { in calculate_rounds()
72 size, FEC_BLOCKSIZE); in calculate_rounds()
138 assert(ctx->pos % FEC_BLOCKSIZE == 0); in file_image_load()
197 ctx->fec_size = ctx->rounds * ctx->roots * FEC_BLOCKSIZE; in image_ecc_new()
221 if (lseek64(fd, -FEC_BLOCKSIZE, SEEK_END) < 0) { in image_ecc_load()
226 assert(sizeof(fec_header) <= FEC_BLOCKSIZE); in image_ecc_load()
228 uint8_t header[FEC_BLOCKSIZE]; in image_ecc_load()
294 assert(2 * sizeof(fec_header) <= FEC_BLOCKSIZE); in image_ecc_save()
296 uint8_t header[FEC_BLOCKSIZE] = {0}; in image_ecc_save()
328 uint8_t padding[FEC_BLOCKSIZE] = {0}; in image_ecc_save()
[all …]
H A Dmain.cpp350 if (ctx.padding % FEC_BLOCKSIZE) { in main()
351 FATAL("padding must be multiple of %u\n", FEC_BLOCKSIZE); in main()
/aosp12/system/extras/libfec/include/fec/
H A Decc.h53 return (offset / rsn) + (offset % rsn) * rounds * FEC_BLOCKSIZE; in fec_ecc_interleave()
59 return fec_div_round_up(fec_div_round_up(file_size, FEC_BLOCKSIZE), in fec_ecc_get_size()
61 * roots * FEC_BLOCKSIZE in fec_ecc_get_size()
62 + FEC_BLOCKSIZE; in fec_ecc_get_size()
H A Dio.h38 #define FEC_BLOCKSIZE 4096 macro
/aosp12/system/update_engine/payload_generator/
H A Dpayload_generation_config_android.cc157 if (part.verity.IsEmpty() && part.size > FEC_BLOCKSIZE) { in LoadVerityConfig()
160 part.size - FEC_BLOCKSIZE, in LoadVerityConfig()
212 TEST_AND_RETURN_FALSE(block_size == FEC_BLOCKSIZE); in LoadVerityConfig()
/aosp12/system/extras/libfec/test/
H A Dtest_read.cpp24 const unsigned bufsize = 2 * 1024 * FEC_BLOCKSIZE;
H A Dfec_unittest.cpp154 verity_get_size(handle->hashtree().data_blocks * FEC_BLOCKSIZE, nullptr, in TEST_F()
242 verity_get_size(handle->hashtree().data_blocks * FEC_BLOCKSIZE, nullptr, in TEST_F()
/aosp12/system/core/fs_mgr/
H A Dfs_mgr_verity.cpp214 params->ecc.start / FEC_BLOCKSIZE, params->ecc.blocks, params->ecc.roots); in format_verity_table()
219 params->ecc.start / FEC_BLOCKSIZE, params->ecc.blocks, params->ecc.roots); in format_verity_table()