Searched refs:FEC_BLOCKSIZE (Results 1 – 11 of 11) sorted by relevance
/system/extras/libfec/ |
D | fec_verity.cpp | 98 uint64_t hashes = file_size / FEC_BLOCKSIZE; in verity_get_size() 105 hashes = fec_div_round_up(hashes * SHA256_DIGEST_LENGTH, FEC_BLOCKSIZE); in verity_get_size() 115 return total * FEC_BLOCKSIZE; in verity_get_size() 131 SHA256_Update(&ctx, block, FEC_BLOCKSIZE); in verity_hash() 173 if (fec_pread(f, data, FEC_BLOCKSIZE, data_offset) != FEC_BLOCKSIZE) { in ecc_read_hashes() 187 uint8_t data[FEC_BLOCKSIZE]; in verify_tree() 198 verity_get_size(v->data_blocks * FEC_BLOCKSIZE, &levels, NULL); in verify_tree() 204 uint64_t data_offset = hash_offset + FEC_BLOCKSIZE; in verify_tree() 209 if (!raw_pread(f, data, FEC_BLOCKSIZE, hash_offset) || in verify_tree() 217 !raw_pwrite(f, data, FEC_BLOCKSIZE, hash_offset)) { in verify_tree() [all …]
|
D | fec_read.cpp | 80 uint64_t n = offset / FEC_BLOCKSIZE; in is_erasure() 95 uint64_t hash_offset = (offset / FEC_BLOCKSIZE) * SHA256_DIGEST_LENGTH; in is_zero() 98 v->hash_data_blocks * 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, 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() [all …]
|
D | fec_open.cpp | 51 if (file_size % FEC_BLOCKSIZE) { in find_offset() 53 error("file size not multiple of " stringify(FEC_BLOCKSIZE)); in find_offset() 63 mi = ((hi + lo) / (2 * FEC_BLOCKSIZE)) * FEC_BLOCKSIZE; in find_offset() 67 lo = mi + FEC_BLOCKSIZE; in find_offset() 122 offset -= offset % FEC_BLOCKSIZE; in parse_ecc_header() 145 header.fec_size % FEC_BLOCKSIZE) { in parse_ecc_header() 151 f->ecc.blocks = fec_div_round_up(f->data_size, FEC_BLOCKSIZE); in parse_ecc_header() 155 (uint32_t)f->ecc.rounds * f->ecc.roots * FEC_BLOCKSIZE) { in parse_ecc_header() 167 uint8_t buf[FEC_BLOCKSIZE]; in parse_ecc_header() 169 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 | fec_private.h | 47 #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 | 71 } else if (size % FEC_BLOCKSIZE) { in calculate_rounds() 73 size, FEC_BLOCKSIZE); in calculate_rounds() 77 ctx->blocks = fec_div_round_up(ctx->inp_size, FEC_BLOCKSIZE); in calculate_rounds() 84 assert(len % FEC_BLOCKSIZE == 0); in process_chunk() 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 | 351 if (ctx.padding % FEC_BLOCKSIZE) { in main() 352 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;
|
/system/core/fs_mgr/ |
D | fs_mgr_verity.cpp | 212 params->ecc.start / FEC_BLOCKSIZE, params->ecc.blocks, params->ecc.roots); in format_verity_table() 217 params->ecc.start / FEC_BLOCKSIZE, params->ecc.blocks, params->ecc.roots); in format_verity_table()
|