lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 22 Mar 2012 17:52:11 -0400 (EDT)
From:	Mikulas Patocka <mpatocka@...hat.com>
To:	Mandeep Singh Baines <msb@...omium.org>
cc:	device-mapper development <dm-devel@...hat.com>,
	Steffen Klassert <steffen.klassert@...unet.com>,
	Will Drewry <wad@...omium.org>, linux-kernel@...r.kernel.org,
	Elly Jones <ellyjones@...omium.org>,
	Olof Johansson <olofj@...omium.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Alasdair G Kergon <agk@...hat.com>,
	Milan Broz <mbroz@...hat.com>
Subject: Re: [dm-devel] [PATCH] dm: remake of the verity target



On Thu, 22 Mar 2012, Mandeep Singh Baines wrote:

> Mikulas Patocka (mpatocka@...hat.com) wrote:
> > 
> > This is improved patch that supports both the old format and the new 
> > format. I checked that it is interoperable with with the old Google 
> > userspace tool and with the original Google kernel driver.
> > 
> 
> Thanks much for doing this:)
> 
> This looks good but would a prepend/append flag be better?

It does more than changing prepend/append salt. I changed alignment in the 
new format so that it doesn't have to use a multiply instruction.

In the old format, if digest size is not a power of two, all digests are 
placed first and the rest of the block is padded with zeros. In the new 
format, each digest is padded with zeros to a power of two.

For example, when using sha1, the old format padding looks like this:
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbbbbbbbb
bbbbbbbbbbbbbbbbccccccccccccccccccccccccccccccccccccccccdddddddd
dddddddddddddddddddddddddddddddd00000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000

... and the new format padding looks like this:
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa000000000000000000000000
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb000000000000000000000000
cccccccccccccccccccccccccccccccccccccccc000000000000000000000000
dddddddddddddddddddddddddddddddddddddddd000000000000000000000000

The version "0" (first argument in the target line) actually means the old 
style padding and the salt is hashed after the data. The version "1" means 
new style padding and the salt is hashed before the data. If someone comes 
with another format, we can use version "2" for it, etc.

Mikulas
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ