1 Cryptsetup 1.5.0 RC1 Release Notes
2 ==================================
4 This testing release candidate version covers mainly
5 inclusion of new veritysetup tool (and related libcryptsetup extensions).
7 Please note that dm-verity API extension can change in next
8 1.5.0 release candidate (despite it is not expected).
10 Changes since version 1.4.3
11 ~~~~~~~~~~~~~~~~~~~~~~~~~~~
12 Introduce veritysetup tool for dm-verity target management.
14 The dm-verity device-mapper target was added to Linux kernel 3.4 and
15 provides transparent integrity checking of block devices using a cryptographic
16 digest provided by the kernel crypto API. This target is read-only.
18 It is meant to be setup as part of a verified boot path (it was originally
19 developed by Chrome OS authors as part of verified boot infrastructure).
21 For deeper description please see http://code.google.com/p/cryptsetup/wiki/DMVerity
22 and kernel dm-verity documentation.
24 The libcryptsetup library was extended to support manipulation
25 with dm-verity kernel module and new veritysetup CLI tool is added.
27 There are no additional library requirements (it uses the same crypto
28 backend as cryptsetup).
30 If you want compile cryptsetup without veritysetup toop,
31 use --disable-veritysetup configure option.
32 For other configuration option see configure --help and veritysetup --help
33 (e.g. default parameters).
35 Supported libcryptsetup functions new CRYPT_VERITY type:
42 crypt_get_active_device
43 crypt_activate_by_volume_key (volume key == root hash here)
45 and new introduced function
48 Please see comments in libcryptsetup.h and veritysetup.c as an code example
49 how to use CRYPT_VERITY API.
51 The veritysetup tool supports these operations:
53 veritysetup format <data_device> <hash_device>
54 Formats <hash_device> (calculates all hash areas according to <data_device>).
55 This is initial command to prepare device <hash_device> for later verification.
57 veritysetup create <name> <data_device> <hash_device> <root_hash>
58 Creates (activates) a dm-verity mapping with <name> backed by device <data_device>
59 and using <hash_device> for in-kernel verification.
61 veritysetup verify <data_device> <hash_device> <root_hash>
62 Verifies data in userspace (no kernel device is activated).
64 veritysetup remove <name>
65 Removes activated device from kernel (similar to dmsetup remove).
67 veritysetup status <name>
68 Reports status for the active kernel dm-verity device.
70 veritysetup dump <hash_device>
71 Reports parameters of verity device from on-disk stored superblock.
73 For more info see veritysetup --help and veritysetup man page.
78 * Both data and header device can now be a file and
79 loop device is automatically allocated.
81 * Require only up to last keyslot area for header device, previously
82 backup (and activation) required device/file of size up to data start
83 offset (data payload).
85 * Fix header backup and restore to work on files with large data offset.
86 Backup and restore now works even if backup file is smaller than data offset.
88 Appendix: Examples of veritysetup use
89 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
91 Format device using default parameters, info and final root hash is printed:
92 # veritysetup format /dev/sdb /dev/sdc
93 VERITY header information for /dev/sdc
94 UUID: fad30431-0c59-4fa6-9b57-732a90501f75
99 Hash algorithm: sha256
100 Salt: 5cc52759af76a092e0c21829cd0ef6938f69831bf86926525106f92a7e9e3aa9
101 Root hash: 7aefa4506f7af497ac491a27f862cf8005ea782a5d97f6426945a6896ab557a1
103 Activation of device in-kernel:
104 # veritysetup create vr /dev/sdb /dev/sdc 7aefa4506f7af497ac491a27f862cf8005ea782a5d97f6426945a6896ab557a1
105 Note - if device is corrupted, kernel mapping is created but will report failure:
106 Verity device detected corruption after activation.
108 Userspace verification:
109 # veritysetup verify /dev/sdb /dev/sdc 7aefa4506f7af497ac491a27f862cf8005ea782a5d97f6426945a6896ab557a1
110 Verification failed at position 8192.
111 Verification of data area failed.
113 Active device status report:
114 # veritysetup status vr
115 /dev/mapper/vr is active.
122 salt: 5cc52759af76a092e0c21829cd0ef6938f69831bf86926525106f92a7e9e3aa9
123 data device: /dev/sdb
126 hash device: /dev/sdc
127 hash offset: 8 sectors
129 Dump of on-disk superblock information:
130 # veritysetup dump /dev/sdc
131 VERITY header information for /dev/sdc
132 UUID: fad30431-0c59-4fa6-9b57-732a90501f75
135 Data block size: 4096
136 Hash block size: 4096
137 Hash algorithm: sha256
138 Salt: 5cc52759af76a092e0c21829cd0ef6938f69831bf86926525106f92a7e9e3aa9
141 # veritysetup remove vr