Re: [RFC V4 PATCH 00/15] Signature verification of hibernate snapshot

2013-10-17 Thread Rafael J. Wysocki
On Sunday, September 15, 2013 08:56:46 AM Lee, Chun-Yi wrote: > Hi experts, > > This patchset is the implementation for signature verification of hibernate > snapshot image. The origin idea is from Jiri Kosina: Let EFI bootloader > generate key-pair in UEFI secure boot environment, then pass it to

Re: [RFC V4 PATCH 00/15] Signature verification of hibernate snapshot

2013-09-26 Thread Vojtech Pavlik
On Thu, Sep 26, 2013 at 04:48:00PM +0200, Jiri Kosina wrote: > > The only two problems I see are > > > > 1. The key isn't generational (any compromise obtains it). This > > can be fixed by using a set of keys generated on each boot and > > passing in both K_{N-1} and K_N >

Re: [RFC V4 PATCH 00/15] Signature verification of hibernate snapshot

2013-09-26 Thread Jiri Kosina
On Thu, 26 Sep 2013, James Bottomley wrote: > > could you please describe the exact scenario you think that the symmetric > > keys aproach doesn't protect against, while the assymetric key aproach > > does? > > > > The crucial points, which I believe make the symmetric key aproach work > > (an

Re: [RFC V4 PATCH 00/15] Signature verification of hibernate snapshot

2013-09-26 Thread James Bottomley
On Thu, 2013-09-26 at 08:24 +0200, Jiri Kosina wrote: > On Wed, 25 Sep 2013, James Bottomley wrote: > > > > I don't get this. Why is it important that current kernel can't > > > recreate the signature? > > > > The thread model is an attack on the saved information (i.e. the suspend > > image) bet

Re: [RFC V4 PATCH 00/15] Signature verification of hibernate snapshot

2013-09-26 Thread joeyli
於 四,2013-09-26 於 14:22 +0200,Vojtech Pavlik 提到: > On Thu, Sep 26, 2013 at 02:06:21PM +0200, Pavel Machek wrote: > > > > For the symmetric key solution, I will try HMAC (Hash Message > > > Authentication Code). It's already used in networking, hope the > > > performance is not too bad to a big imag

Re: [RFC V4 PATCH 00/15] Signature verification of hibernate snapshot

2013-09-26 Thread joeyli
於 四,2013-09-26 於 14:06 +0200,Pavel Machek 提到: > Hi! > > > For the symmetric key solution, I will try HMAC (Hash Message > > Authentication Code). It's already used in networking, hope the > > performance is not too bad to a big image. > > Kernel already supports crc32 of the hibernation image, yo

Re: [RFC V4 PATCH 00/15] Signature verification of hibernate snapshot

2013-09-26 Thread Vojtech Pavlik
On Thu, Sep 26, 2013 at 02:21:23PM +0200, Michal Marek wrote: > > Is not it as simple as storing hash of hibernation image into NVRAM > > and then verifying the hash matches the value in NVRAM on next > > startup? No encryption needed. > > I think that part of the exercise is to minimize the num

Re: [RFC V4 PATCH 00/15] Signature verification of hibernate snapshot

2013-09-26 Thread Michal Marek
On 26.9.2013 14:06, Pavel Machek wrote: > Actually... > > Is not it as simple as storing hash of hibernation image into NVRAM > and then verifying the hash matches the value in NVRAM on next > startup? No encryption needed. I think that part of the exercise is to minimize the number of writes to

Re: [RFC V4 PATCH 00/15] Signature verification of hibernate snapshot

2013-09-26 Thread Vojtech Pavlik
On Thu, Sep 26, 2013 at 02:06:21PM +0200, Pavel Machek wrote: > > For the symmetric key solution, I will try HMAC (Hash Message > > Authentication Code). It's already used in networking, hope the > > performance is not too bad to a big image. > > Kernel already supports crc32 of the hibernation i

Re: [RFC V4 PATCH 00/15] Signature verification of hibernate snapshot

2013-09-26 Thread Pavel Machek
Hi! > For the symmetric key solution, I will try HMAC (Hash Message > Authentication Code). It's already used in networking, hope the > performance is not too bad to a big image. Kernel already supports crc32 of the hibernation image, you may want to take a look how that is done. Maybe you want

Re: [RFC V4 PATCH 00/15] Signature verification of hibernate snapshot

2013-09-26 Thread joeyli
於 四,2013-09-26 於 10:19 +0800,joeyli 提到: > 於 三,2013-09-25 於 17:25 -0400,Alan Stern 提到: > > On Wed, 25 Sep 2013, David Howells wrote: > > > > > I have pushed some keyrings patches that will likely affect this to: > > > > > > > > > http://git.kernel.org/cgit/linux/kernel/git/dhowells/linux-fs.git

Re: [RFC V4 PATCH 00/15] Signature verification of hibernate snapshot

2013-09-25 Thread Jiri Kosina
On Wed, 25 Sep 2013, James Bottomley wrote: > > I don't get this. Why is it important that current kernel can't > > recreate the signature? > > The thread model is an attack on the saved information (i.e. the suspend > image) between it being saved by the old kernel and used by the new one. > The

Re: [RFC V4 PATCH 00/15] Signature verification of hibernate snapshot

2013-09-25 Thread joeyli
於 四,2013-09-26 於 02:27 +0200,Pavel Machek 提到: > On Wed 2013-09-25 15:16:54, James Bottomley wrote: > > On Wed, 2013-09-25 at 17:25 -0400, Alan Stern wrote: > > > On Wed, 25 Sep 2013, David Howells wrote: > > > > > > > I have pushed some keyrings patches that will likely affect this to: > > > > >

Re: [RFC V4 PATCH 00/15] Signature verification of hibernate snapshot

2013-09-25 Thread James Bottomley
On Thu, 2013-09-26 at 02:27 +0200, Pavel Machek wrote: > On Wed 2013-09-25 15:16:54, James Bottomley wrote: > > On Wed, 2013-09-25 at 17:25 -0400, Alan Stern wrote: > > > On Wed, 25 Sep 2013, David Howells wrote: > > > > > > > I have pushed some keyrings patches that will likely affect this to: >

Re: [RFC V4 PATCH 00/15] Signature verification of hibernate snapshot

2013-09-25 Thread joeyli
於 三,2013-09-25 於 17:25 -0400,Alan Stern 提到: > On Wed, 25 Sep 2013, David Howells wrote: > > > I have pushed some keyrings patches that will likely affect this to: > > > > > > http://git.kernel.org/cgit/linux/kernel/git/dhowells/linux-fs.git/log/?h=keys-devel > > > > I intend to ask James to

Re: [RFC V4 PATCH 00/15] Signature verification of hibernate snapshot

2013-09-25 Thread joeyli
於 三,2013-09-25 於 22:04 +0100,David Howells 提到: > I have pushed some keyrings patches that will likely affect this to: > > > http://git.kernel.org/cgit/linux/kernel/git/dhowells/linux-fs.git/log/?h=keys-devel > Thanks for your point out, I will respin my asymmetric keys patch base on this

Re: [RFC V4 PATCH 00/15] Signature verification of hibernate snapshot

2013-09-25 Thread Alan Stern
On Wed, 25 Sep 2013, James Bottomley wrote: > > Why are asymmetric keys used for verifying the hibernation image? It > > seems that a symmetric key would work just as well. And it would be a > > lot quicker to generate, because it wouldn't need any high-precision > > integer computations. > > T

Re: [RFC V4 PATCH 00/15] Signature verification of hibernate snapshot

2013-09-25 Thread Pavel Machek
On Wed 2013-09-25 15:16:54, James Bottomley wrote: > On Wed, 2013-09-25 at 17:25 -0400, Alan Stern wrote: > > On Wed, 25 Sep 2013, David Howells wrote: > > > > > I have pushed some keyrings patches that will likely affect this to: > > > > > > > > > http://git.kernel.org/cgit/linux/kernel/git/d

Re: [RFC V4 PATCH 00/15] Signature verification of hibernate snapshot

2013-09-25 Thread James Bottomley
On Wed, 2013-09-25 at 17:25 -0400, Alan Stern wrote: > On Wed, 25 Sep 2013, David Howells wrote: > > > I have pushed some keyrings patches that will likely affect this to: > > > > > > http://git.kernel.org/cgit/linux/kernel/git/dhowells/linux-fs.git/log/?h=keys-devel > > > > I intend to ask

Re: [RFC V4 PATCH 00/15] Signature verification of hibernate snapshot

2013-09-25 Thread Alan Stern
On Wed, 25 Sep 2013, David Howells wrote: > I have pushed some keyrings patches that will likely affect this to: > > > http://git.kernel.org/cgit/linux/kernel/git/dhowells/linux-fs.git/log/?h=keys-devel > > I intend to ask James to pull these into his next branch. If he's happy to do > s

Re: [RFC V4 PATCH 00/15] Signature verification of hibernate snapshot

2013-09-25 Thread David Howells
I have pushed some keyrings patches that will likely affect this to: http://git.kernel.org/cgit/linux/kernel/git/dhowells/linux-fs.git/log/?h=keys-devel I intend to ask James to pull these into his next branch. If he's happy to do so, I can look at pulling at least your asymmetric keys

[RFC V4 PATCH 00/15] Signature verification of hibernate snapshot

2013-09-14 Thread Lee, Chun-Yi
Hi experts, This patchset is the implementation for signature verification of hibernate snapshot image. The origin idea is from Jiri Kosina: Let EFI bootloader generate key-pair in UEFI secure boot environment, then pass it to kernel for sign/verify S4 image. Due to there have potential threat fr