/* A hash algorithm supported by fs-verity */ struct fsverity_hash_alg { constchar *name; /* crypto API name, e.g. sha256 */ unsignedint digest_size; /* digest size in bytes, e.g. 32 for SHA-256 */ unsignedint block_size; /* block size in bytes, e.g. 64 for SHA-256 */ /* *TheHASH_ALGO_*constantforthisalgorithm.Thisisdifferentfrom *FS_VERITY_HASH_ALG_*,whichusesadifferentnumberingscheme.
*/ enum hash_algo algo_id;
};
union fsverity_hash_ctx { struct sha256_ctx sha256; struct sha512_ctx sha512;
};
/* Merkle tree parameters: hash algorithm, initial hash state, and topology */ struct merkle_tree_params { conststruct fsverity_hash_alg *hash_alg; /* the hash algorithm */ /* initial hash state if salted, NULL if unsalted */ constunion fsverity_hash_ctx *hashstate; unsignedint digest_size; /* same as hash_alg->digest_size */ unsignedint block_size; /* size of data and tree blocks */ unsignedint hashes_per_block; /* number of hashes per tree block */ unsignedint blocks_per_page; /* PAGE_SIZE / block_size */
u8 log_digestsize; /* log2(digest_size) */
u8 log_blocksize; /* log2(block_size) */
u8 log_arity; /* log2(hashes_per_block) */
u8 log_blocks_per_page; /* log2(blocks_per_page) */ unsignedint num_levels; /* number of levels in Merkle tree */
u64 tree_size; /* Merkle tree size in bytes */ unsignedlong tree_pages; /* Merkle tree size in pages */
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.