FSVERITY(1)
π NAME π
fsverity β userspace utility for fs-verity. Yep, that's fsverity(1), bestie, and we're gonna walk through the whole thing together. π«Ά
β¨ SYNOPSIS β¨
fsverity digest [OPTION...] FILE...
fsverity dump_metadata [OPTION...] TYPE FILE
fsverity enable [OPTION...] FILE
fsverity measure FILE...
fsverity sign [OPTION...] FILE OUT_SIGFILE
π¦ DESCRIPTION π¦
Okay so fsverity is a userspace utility for fs-verity. fs-verity itself is a Linux kernel filesystem feature that does transparent on-demand verification of the contents of read-only files using Merkle trees. Literally Merkle tree magic, no cap. π
fsverity can enable fs-verity on files, retrieve the digests of fs-verity files, and sign files for use with fs-verity (among other things). fsverity's functionality is divided among various subcommands. Main character energy, honestly. π
This manual page focuses on documenting all fsverity subcommands and options. For examples and more information about the fs-verity kernel feature, see the references at the end of this page. π
π OPTIONS π
fsverity always accepts the following options, bestie:
--helpβ Show the help, for either one subcommand or for all subcommands. π«Ά--versionβ Show the version offsverity-utils. β¨
πΈ SUBCOMMANDS πΈ
π fsverity digest π
fsverity digest [OPTION...] FILE...
Compute the fs-verity digest of the given file(s). This is mainly intended to be used in preparation for signing the digest. In some cases fsverity sign can be used instead to digest and sign the file in one step. Cute, efficient. π
Options accepted by fsverity digest
--block-size=BLOCK_SIZEβ The Merkle tree block size (in bytes) to use. This must be a power of 2 and at least twice the size of the hash values.
Note that the Linux kernel implementations of fs-verity place further restrictions on the Merkle tree block size. Linux v6.2 and earlier require that the Merkle tree block size be equal to both the system page size and the filesystem block size. These values are often 4096. Linux v6.3 and later are more flexible; they require that the Merkle tree block size be a power of 2 that is greater than or equal to 1024 and less than or equal to the system page size and the filesystem block size. The default value of this option is 4096. π§
--compactβ When printing the file digest, only print the actual digest hex string; don't print the algorithm name and filename. π--for-builtin-sigβ Format the file digest in a way that is compatible with the Linux kernel's fs-verity built-in signature verification support. This means formatting it as astruct fsverity_formatted_digest. Use this option if you are using built-in signatures but are not usingfsverity signto do the signing. π₯--hash-alg=HASH_ALGβ The hash algorithm to use to build the Merkle tree. Valid options aresha256andsha512. Default issha256. πΈ--out-merkle-tree=FILEβ Write the computed Merkle tree to the given file. The Merkle tree layout will be the same as that used by the Linux kernel'sFS_IOC_READ_VERITY_METADATAioctl.
Normally this option isn't useful, but it can be needed in cases where the fs-verity metadata needs to be consumed by something other than one of the native Linux kernel implementations of fs-verity. This is not needed for file signing. π
--out-descriptor=FILEβ Write the computed fs-verity descriptor to the given file.
Normally this option isn't useful, but it can be needed in cases where the fs-verity metadata needs to be consumed by something other than one of the native Linux kernel implementations of fs-verity. This is not needed for file signing. π¦
--salt=SALTβ The salt to use in the Merkle tree, as a hex string. The salt is a value that is prepended to every hashed block; it can be used to personalize the hashing for a particular file or device. The default is no salt. π
π fsverity dump_metadata π
fsverity dump_metadata [OPTION...] TYPE FILE
Dump the fs-verity metadata of the given file. The file must have fs-verity enabled, and the filesystem must support the FS_IOC_READ_VERITY_METADATA ioctl (it was added in Linux v5.12). This subcommand normally isn't useful, but it can be useful in cases where a userspace server program is serving a verity file to a client which implements fs-verity compatible verification. π
TYPE may be merkle_tree, descriptor, or signature, indicating the type of metadata to dump. signature refers to the built-in signature, if present; userspace-managed signatures will not be included. Important detail, bestie. π
Options accepted by fsverity dump_metadata
--length=LENGTHβ Length in bytes to dump from the specified metadata item. Only accepted in combination with--offset. π--offset=offsetβ Offset in bytes into the specified metadata item at which to start dumping. Only accepted in combination with--length. π¦
π fsverity enable π
fsverity enable [OPTION...] FILE
Enable fs-verity on the specified file. This will only work if the filesystem supports fs-verity. No cap. π
Options accepted by fsverity enable
--block-size=BLOCK_SIZEβ Same as forfsverity digest. β¨--hash-alg=HASH_ALGβ Same as forfsverity digest. β¨--salt=SALTβ Same as forfsverity digest. β¨--signature=SIGFILEβ Specifies the built-in signature to apply to the file.SIGFILEmust be a file that contains the signature in PKCS#7 DER format, e.g. as produced by thefsverity signcommand.
Note that this option is only needed if the Linux kernel's fs-verity built-in signature verification support is being used. It is not needed if the signatures will be verified in userspace, as in that case the signatures should be stored separately. π₯
π fsverity measure π
fsverity measure FILE...
Display the fs-verity digest of the given file(s). The files must have fs-verity enabled. The output will be the same as fsverity digest with the appropriate parameters, but fsverity measure will take constant time for each file regardless of the size of the file. Literally constant time, iconic. β
fsverity measure does not accept any options. Periodt. π
π fsverity sign π
fsverity sign [OPTION...] FILE OUT_SIGFILE
Sign the given file for fs-verity, in a way that is compatible with the Linux kernel's fs-verity built-in signature verification support. The signature will be written to OUT_SIGFILE in PKCS#7 DER format. π
The private key can be specified either by key file or by PKCS#11 token. To use a key file, provide --key and optionally --cert. To use a PKCS#11 token, provide --pkcs11-engine, --pkcs11-module, --cert, and optionally --pkcs11-keyid. PKCS#11 token support is unavailable if fsverity-utils was built with a version of OpenSSL that does not support PKCS#11 tokens. Big caveat, bestie. π
fsverity sign should only be used if you need compatibility with fs-verity built-in signatures. It is not the only way to do signatures with fs-verity. For more information, see the fsverity-utils README. π
Options accepted by fsverity sign
--block-size=BLOCK_SIZEβ Same as forfsverity digest. β¨--cert=CERTFILEβ Specifies the file that contains the certificate, in PEM format. This option is required ifKEYFILEcontains only the private key and not also the certificate, or if a PKCS#11 token is used. π--hash-alg=HASH_ALGβ Same as forfsverity digest. β¨--key=KEYFILEβ Specifies the file that contains the private key, in PEM format. This option is required when not using a PKCS#11 token. π₯--out-descriptor=FILEβ Same as forfsverity digest. β¨--out-merkle-tree=FILEβ Same as forfsverity digest. β¨--pkcs11-engine=SOFILEβ Specifies the path to the OpenSSL PKCS#11 engine file. This typically will be a path to thelibp11.sofile. This option is required when using a PKCS#11 token. π¦--pkcs11-keyid=KEYIDβ Specifies the key identifier in the form of a PKCS#11 URI. If not provided, the default key associated with the token is used. This option is only applicable when using a PKCS#11 token. πΈ--pkcs11-module=SOFILEβ Specifies the path to the PKCS#11 token-specific module library. This option is required when using a PKCS#11 token. π--salt=SALTβ Same as forfsverity digest. β¨
π SEE ALSO π
For example commands and more information, see the README file for fsverity-utils (https://git.kernel.org/pub/scm/fs/fsverity/fsverity-utils.git/tree/README.md). π
Also see the kernel documentation for fs-verity (https://www.kernel.org/doc/html/latest/filesystems/fsverity.html). π
Catch you later, bestie β this iconic page is from fsverity-utils v1.7, dated November 2025. ππ
π¦ where this page comes from
- alpine 3.24: fsverity-utils-doc 1.7-r0 Β· GPL-2.0-or-later
- arch rolling: fsverity-utils 1.7-2 Β· MIT
- epel 10: fsverity-utils 1.7-1.el10_3 Β· LicenseRef-Callaway-BSD
- nixpkgs unstable: fsverity-utils 1.7
- π the page's license: MIT
- Copyright 2021 Google LLC
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms