Searched refs:FEC_BLOCKSIZE (Results 1 – 14 of 14) sorted by relevance
/system/extras/libfec/ |
D | fec_verity.cpp | 104 uint64_t hashes = file_size / FEC_BLOCKSIZE; in verity_get_size() 111 hashes = fec_div_round_up(hashes * padded_digest_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() 213 uint64_t hash_size = verity_get_size(data_blocks * FEC_BLOCKSIZE, &levels, in verify_tree() 220 uint64_t data_offset = hash_offset + FEC_BLOCKSIZE; in verify_tree() 223 if (!raw_pread(f->fd, data, FEC_BLOCKSIZE, hash_offset) || in verify_tree() 232 !raw_pwrite(f->fd, data, FEC_BLOCKSIZE, hash_offset)) { in verify_tree() [all …]
|
D | fec_read.cpp | 80 uint64_t n = offset / FEC_BLOCKSIZE; in is_erasure() 94 uint64_t hash_offset = (offset / FEC_BLOCKSIZE) * SHA256_DIGEST_LENGTH; in is_zero() 110 check(offset % FEC_BLOCKSIZE == 0); in __ecc_read() 115 uint64_t rsb = offset - (offset / (e->rounds * FEC_BLOCKSIZE)) * in __ecc_read() 116 e->rounds * FEC_BLOCKSIZE; in __ecc_read() 134 uint8_t bbuf[FEC_BLOCKSIZE] = {0}; in __ecc_read() 138 if (!raw_pread(f->fd, bbuf, FEC_BLOCKSIZE, interleaved)) { in __ecc_read() 151 for (int j = 0; j < FEC_BLOCKSIZE; ++j) { in __ecc_read() 161 for (int i = 0; i < FEC_BLOCKSIZE; ++i) { in __ecc_read() 204 return FEC_BLOCKSIZE; in __ecc_read() [all …]
|
D | fec_open.cpp | 49 if (file_size % FEC_BLOCKSIZE) { in find_offset() 51 error("file size not multiple of " stringify(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() 150 f->ecc.blocks = fec_div_round_up(f->data_size, FEC_BLOCKSIZE); in parse_ecc_header() 154 (uint32_t)f->ecc.rounds * f->ecc.roots * 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() [all …]
|
D | fec_process.cpp | 62 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()
|
D | avb_utils.cpp | 128 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()
|
D | fec_private.h | 48 #define VERITY_METADATA_SIZE (8 * FEC_BLOCKSIZE)
|
/system/extras/libfec/include/fec/ |
D | ecc.h | 53 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()
|
D | io.h | 38 #define FEC_BLOCKSIZE 4096 macro
|
/system/extras/verity/fec/ |
D | image.cpp | 70 } else if (size % FEC_BLOCKSIZE) { in calculate_rounds() 72 size, FEC_BLOCKSIZE); in calculate_rounds() 76 ctx->blocks = fec_div_round_up(ctx->inp_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() 254 if (p->fec_size % p->roots || p->fec_size % FEC_BLOCKSIZE) { in image_ecc_load() 294 assert(2 * sizeof(fec_header) <= FEC_BLOCKSIZE); in image_ecc_save() [all …]
|
D | main.cpp | 350 if (ctx.padding % FEC_BLOCKSIZE) { in main() 351 FATAL("padding must be multiple of %u\n", FEC_BLOCKSIZE); in main()
|
/system/extras/libfec/test/ |
D | test_read.cpp | 24 const unsigned bufsize = 2 * 1024 * FEC_BLOCKSIZE;
|
D | fec_unittest.cpp | 154 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()
|
/system/update_engine/payload_generator/ |
D | payload_generation_config_android.cc | 157 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()
|
/system/core/fs_mgr/ |
D | fs_mgr_verity.cpp | 214 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()
|