Clone this repo:
  1. 393cd4d verity: Update OWNERS file. by Jorge Lucangeli Obes · 12 months ago factory-drallion-13080.B factory-excelsior-12812.B factory-hatch-12692.B factory-kukui-12587.B factory-mistral-12361.B firmware-drallion-12930.B firmware-hatch-12669.B firmware-hatch-12672.B firmware-kukui-12573.B firmware-mistral-12422.B firmware-servo-12768.B master release-R77-12371.B release-R78-12499.B release-R79-12607.B release-R80-12739.B release-R81-12871.B release-R82-12974.B release-R83-13020.B release-R84-13099.B stabilize-12301.B stabilize-12331.B stabilize-12371.11.B stabilize-12371.26.B stabilize-12371.27.B stabilize-12371.39.B stabilize-12371.48.B stabilize-12371.50.B stabilize-12371.52.B stabilize-12371.65.B stabilize-12371.71.B stabilize-12371.75.B stabilize-12371.80.B stabilize-12371.81.B stabilize-12371.82.B stabilize-12371.89.B stabilize-12386.B stabilize-12428.B stabilize-12441.B stabilize-12464.B stabilize-12499.18.B stabilize-12515.B stabilize-12560.B stabilize-12593.B stabilize-12607.15.B stabilize-12607.58.B stabilize-12607.82.B stabilize-12669.B stabilize-12739.105.B stabilize-12739.106.B stabilize-12739.111.B stabilize-12748.B stabilize-12859.B stabilize-12871.102.B stabilize-12871.103.B stabilize-12871.24.B stabilize-12871.57.B stabilize-12871.65.B stabilize-12871.91.B stabilize-12881.B stabilize-12951.B stabilize-12997.B stabilize-13020.55.B stabilize-13020.67.B stabilize-excelsior-12739.67.B stabilize-kernelnext-broadwell-12434.B stabilize-kukui-12285.B stabilize-mtbf-12607.83.B stabilize-octopus-12371.15.B stabilize-quickfix-12607.83.B stabilize-quickfix-12739.71.B stabilize-quickfix-12871.27.B stabilize-sylas-13019.B stabilize-volteer-12665.B stabilize-volteer-12931.B
  2. b69aeca Makefile: Replace calls to gtest-config and gmock-config. by Allen Webb · 1 year, 2 months ago firmware-sarien-12200.B release-R75-12105.B release-R76-12239.B stabilize-12105.100.B stabilize-12105.75.B stabilize-12121.B stabilize-12202.B stabilize-12206.B stabilize-12222.B stabilize-12239.19.B stabilize-12239.46.B stabilize-12239.67.B stabilize-12239.89.B stabilize-12239.92.B stabilize-12249.B stabilize-flapjack-12109.B
  3. 240acaa verity: Remove static builds. by Manoj Gupta · 1 year, 6 months ago factory-atlas-11907.B factory-octopus-11512.B factory-sarien-12033.B firmware-atlas-11827.12.B firmware-atlas-11827.B firmware-kalista-11343.B release-R73-11647.B release-R74-11895.B stabilize-11554.B stabilize-11647.104.B stabilize-11647.70.B stabilize-11686.B stabilize-11839.1.B stabilize-11839.3.B stabilize-11839.B stabilize-11895.108.B stabilize-11895.109.B stabilize-11895.118.B stabilize-11895.72.B stabilize-11895.89.B stabilize-11895.95.B stabilize-11998.B stabilize-12054.B stabilize-12058.B stabilize-12060.B stabilize-12061.B stabilize-12088.B stabilize-atlas-11512.6.B stabilize-atlas-11512.B stabilize-atlas.11448.B
  4. e4d2333 update README to be markdown compliant by Mike Frysinger · 1 year, 9 months ago factory-grunt-11164.B factory-rammus-11289.B firmware-octopus-11297.106.B firmware-octopus-11297.83.B firmware-octopus-11297.B firmware-rammus-11275.B release-R71-11151.B release-R72-11316.B stabilize-11101.B stabilize-111316.112.B stabilize-11151.100.B stabilize-11151.113.B stabilize-11151.59.B stabilize-11217.B stabilize-11306.B stabilize-11316.123.B stabilize-11316.146.B stabilize-11316.148.B stabilize-11316.35.B stabilize-11316.37.B stabilize-11316.76.B stabilize-11316.82.B stabilize-atlas-11177.B stabilize-octopus-11316.37.B stabilize-octopus-11316.38.B
  5. 3619f62 pull in standard linux/kernel.h directly by Mike Frysinger · 1 year, 9 months ago


Verity is the userspace tool for creating integrity hashes for a device image.

This tool is a frontend for dm-bht, a device-mapper friendly block hash table structure. `verity' produces dm-bht-based images for use with dm-verity. The dm-verity module provides a transparent, integrity-checking layer over a given block device. This expects a backing device and a secondary device which provides cryptographic digests of the blocks on the primary device

Note, the secondary device image can be appended to the primary device or used as a standalone device.

This tool creates an image of the format:

  • [hash of hash of blocks n ... n+n-1]
  • [hash of hash of blocks 0 ... n-1]
  • [...]
  • [hash of block 1]
  • [hash of block 0]

Upon completion, the hash of the root hash will be printed to standard out. The root hash, tree depth, number of hashed blocks, and cryptographic hash algorithm used must be supplied to the dm-verity when configuring a device.


To build outside of Chromium OS:


Example Usage

To use:

./verity mode depth alg image hash_image [root_hexdigest]

For example:

dd if=/dev/zero of=/tmp/image bs=4k count=512
./verity create 2 sha256 /tmp/image /tmp/hash | tee table
# ...
cat table
ls -la /tmp/hash


All the source code is licensed GPLv2 to be completely kernel compatible. The Makefiles are from the parent project and are licensed under a BSD-style license.