[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [dm-devel] [Fwd: Re: DM-Verity Tool]

On Fri, 31 May 2013, pavankumar p globaledgesoft com wrote:

> ---------------------------- Original Message ----------------------------
> Subject: Re: DM-Verity Tool
> From:    pavankumar p globaledgesoft com
> Date:    Mon, May 27, 2013 9:22 pm
> To:      "Milan Broz" <gmazyland gmail com>
>          mpatocka redhat com
>          "device-mapper development" <dm-devel redhat com>
>          "Marian Csontos" <mcsontos redhat com>
> --------------------------------------------------------------------------
> Hello Mikulas,
> > By corrupting the image? :) See tests/verity-compat-test in cryptsetup
> > tree, it is basic regression test which is simulating both data and hash
> > corruption (it just dd random data to know offset and expects failure.)
> In tests/verity-compat-test, in the following line
> "check_root_hash  512
> 9de18652fe74edfb9b805aaed72ae2aa48f94333f1ba5c452ac33b1c39325174 $SALT 1
> sha256 8388608"
> How's the last parameter (hash_offset) calculated? it's hard coded
> here(8388608).
> Regards,
> Pavan

If you use two separate devices for data and hash, hash offset is zero 
(hash starts at the beginning of the second device).

If you use one block device for both data and hash, hash offset points to 
the end of the data (and beginning of hash) - if you want to use it this 
way, you have to set hash offset manually.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]