Re: [PATCH 0/5 v2][RFC] Encryption and authentication for hibernate snapshot image

2019-01-11 Thread joeyli
On Wed, Jan 09, 2019 at 05:47:53PM +0100, Stephan Mueller wrote: > Am Mittwoch, 9. Januar 2019, 17:39:58 CET schrieb joeyli: > > Hi joeyli, > > > > > I am doing encrypt-then-MAC. > > Note, this is what the authenc() AEAD cipher does. > OK.. Thanks for your reminding. I will look at it. Joey

Re: [PATCH 0/5 v2][RFC] Encryption and authentication for hibernate snapshot image

2019-01-11 Thread joeyli
On Thu, Jan 10, 2019 at 05:09:46PM -0800, Andy Lutomirski wrote: > On Thu, Jan 10, 2019 at 7:13 AM joeyli wrote: > > > > On Wed, Jan 09, 2019 at 10:47:42AM -0800, Andy Lutomirski wrote: > > > On Wed, Jan 9, 2019 at 8:40 AM joeyli wrote: > > > > > > > > Hi Andy, > > > > > > > > Thanks for your

Re: [PATCH 0/5 v2][RFC] Encryption and authentication for hibernate snapshot image

2019-01-10 Thread Andy Lutomirski
On Thu, Jan 10, 2019 at 7:13 AM joeyli wrote: > > On Wed, Jan 09, 2019 at 10:47:42AM -0800, Andy Lutomirski wrote: > > On Wed, Jan 9, 2019 at 8:40 AM joeyli wrote: > > > > > > Hi Andy, > > > > > > Thanks for your review! > > > > > > On Tue, Jan 08, 2019 at 01:41:48PM -0800, Andy Lutomirski

Re: [PATCH 0/5 v2][RFC] Encryption and authentication for hibernate snapshot image

2019-01-10 Thread joeyli
On Wed, Jan 09, 2019 at 10:47:42AM -0800, Andy Lutomirski wrote: > On Wed, Jan 9, 2019 at 8:40 AM joeyli wrote: > > > > Hi Andy, > > > > Thanks for your review! > > > > On Tue, Jan 08, 2019 at 01:41:48PM -0800, Andy Lutomirski wrote: > > > > On Jan 7, 2019, at 9:37 AM, joeyli wrote: > > > > > >

Re: [PATCH 0/5 v2][RFC] Encryption and authentication for hibernate snapshot image

2019-01-09 Thread Andy Lutomirski
On Wed, Jan 9, 2019 at 8:40 AM joeyli wrote: > > Hi Andy, > > Thanks for your review! > > On Tue, Jan 08, 2019 at 01:41:48PM -0800, Andy Lutomirski wrote: > > > On Jan 7, 2019, at 9:37 AM, joeyli wrote: > > > > > > Hi Pavel, > > > > > > Thanks for your review! > > > > > >> On Sun, Jan 06, 2019

Re: [PATCH 0/5 v2][RFC] Encryption and authentication for hibernate snapshot image

2019-01-09 Thread joeyli
On Thu, Jan 10, 2019 at 12:39:58AM +0800, joeyli wrote: > Hi Andy, > [...snip] > > Let's why I encrypt/decrypt data pages one by one, then I copy the ^^^ That's why > encrypt/decrypt data from buffer page (only one buffer page reserved > for encrypt/decrypt) to original page. I encreypt

Re: [PATCH 0/5 v2][RFC] Encryption and authentication for hibernate snapshot image

2019-01-09 Thread Stephan Mueller
Am Mittwoch, 9. Januar 2019, 17:39:58 CET schrieb joeyli: Hi joeyli, > > I am doing encrypt-then-MAC. Note, this is what the authenc() AEAD cipher does. Ciao Stephan

Re: [PATCH 0/5 v2][RFC] Encryption and authentication for hibernate snapshot image

2019-01-09 Thread joeyli
Hi Andy, Thanks for your review! On Tue, Jan 08, 2019 at 01:41:48PM -0800, Andy Lutomirski wrote: > > On Jan 7, 2019, at 9:37 AM, joeyli wrote: > > > > Hi Pavel, > > > > Thanks for your review! > > > >> On Sun, Jan 06, 2019 at 07:10:27PM +0100, Pavel Machek wrote: > >> Hi! > >> > >>> This

Re: [PATCH 0/5 v2][RFC] Encryption and authentication for hibernate snapshot image

2019-01-08 Thread Pavel Machek
Hi! > >> Please explain your security goals. > > > > My security goals: > > > > - Encrypt and authicate hibernate snapshot image in kernel space. Userspace > > can only touch an encrypted and signed snapshot image. > > Signed? > > I’m not entirely convinced that the keyring mechanism is what

Re: [PATCH 0/5 v2][RFC] Encryption and authentication for hibernate snapshot image

2019-01-08 Thread Andy Lutomirski
> On Jan 7, 2019, at 9:37 AM, joeyli wrote: > > Hi Pavel, > > Thanks for your review! > >> On Sun, Jan 06, 2019 at 07:10:27PM +0100, Pavel Machek wrote: >> Hi! >> >>> This patchset is the implementation of encryption and authentication >>> for hibernate snapshot image. The image will be encrypted

Re: [PATCH 0/5 v2][RFC] Encryption and authentication for hibernate snapshot image

2019-01-07 Thread Pavel Machek
Hi! > Thanks for your review! > > > > The hibernate function can be used to snapshot memory pages to an image, > > > then kernel restores the image to memory space in a appropriate time. > > > There have secrets in snapshot image and cracker may modifies it for > > > hacking system. Encryption

Re: [PATCH 0/5 v2][RFC] Encryption and authentication for hibernate snapshot image

2019-01-07 Thread joeyli
Hi Pavel, Thanks for your review! On Sun, Jan 06, 2019 at 07:10:27PM +0100, Pavel Machek wrote: > Hi! > > > This patchset is the implementation of encryption and authentication > > for hibernate snapshot image. The image will be encrypted by AES and > > authenticated by HMAC. > > Ok, so you

Re: [PATCH 0/5 v2][RFC] Encryption and authentication for hibernate snapshot image

2019-01-06 Thread Pavel Machek
Hi! > This patchset is the implementation of encryption and authentication > for hibernate snapshot image. The image will be encrypted by AES and > authenticated by HMAC. Ok, so you encrypt. > The hibernate function can be used to snapshot memory pages to an image, > then kernel restores the

[PATCH 0/5 v2][RFC] Encryption and authentication for hibernate snapshot image

2019-01-03 Thread Lee, Chun-Yi
Hi, This patchset is the implementation of encryption and authentication for hibernate snapshot image. The image will be encrypted by AES and authenticated by HMAC. The hibernate function can be used to snapshot memory pages to an image, then kernel restores the image to memory space in a