* Re: encrypted swap (was Re: [PATCH encrypted swsusp 1/3] core functionality)
[not found] ` <3T83r-1Mk-35@gated-at.bofh.it>
@ 2005-04-14 10:57 ` Bodo Eggert <harvested.in.lkml@posting.7eggert.dyndns.org>
0 siblings, 0 replies; 4+ messages in thread
From: Bodo Eggert <harvested.in.lkml@posting.7eggert.dyndns.org> @ 2005-04-14 10:57 UTC (permalink / raw)
To: Andy Isaacson, Herbert Xu, Pavel Machek, Andreas Steinmetz, rjw,
linux-kernel
Andy Isaacson <adi@hexapodia.org> wrote:
> * the key is automatically regenerated every 2 hours (or whatever); as
> pages encrypted under the old key age out, it can be freed eventually
Changing the key would not help, since if you can get the swap pages on
a running system, you can also get the keys, and if you are using a limited
set of keys (you obviously want that), using more than one key will just add
a small linear factor to cracking the whole swap data of an offline system.
--
Field experience is something you don't get until just after you need it.
Friß, Spammer: info@fibelckn.info webmaster@tlcks.com borrowed@jebafdef.info
graspable9755@incbggc.info zm-e@bnik.com several@sanction6029biz.us
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH encrypted swsusp 1/3] core functionality
@ 2005-04-13 23:39 Herbert Xu
2005-04-14 8:31 ` encrypted swap (was Re: [PATCH encrypted swsusp 1/3] core functionality) Andy Isaacson
0 siblings, 1 reply; 4+ messages in thread
From: Herbert Xu @ 2005-04-13 23:39 UTC (permalink / raw)
To: Pavel Machek; +Cc: Andreas Steinmetz, rjw, linux-kernel
On Thu, Apr 14, 2005 at 01:24:31AM +0200, Pavel Machek wrote:
>
> > The ssh keys are *encrypted* in the swap when dmcrypt is used.
> > When the swap runs over dmcrypt all writes including those from
> > swsusp are encrypted.
>
> Andreas is right. They are encrypted in swap, but they should not be
> there at all. And they are encrypted by key that is still available
> after resume. Bad.
The dmcrypt swap can only be unlocked by the user with a passphrase,
which is analogous to how you unlock your ssh private key stored
on the disk using a passphrase.
So I don't see the problem.
> First version simply overwrote suspend image in swap with zeros. This
> is more clever way to do same thing.
This version looks to me like a custom implementation of dmcrypt that
lives inside swsusp which ends up being either less secure than simply
using dmcrypt due to the lack of a passphrase, or it's going to involve
more hacks to get a passphrase from the user at resume time.
Cheers,
--
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
^ permalink raw reply [flat|nested] 4+ messages in thread* encrypted swap (was Re: [PATCH encrypted swsusp 1/3] core functionality)
2005-04-13 23:39 [PATCH encrypted swsusp 1/3] core functionality Herbert Xu
@ 2005-04-14 8:31 ` Andy Isaacson
2005-04-14 8:38 ` Herbert Xu
0 siblings, 1 reply; 4+ messages in thread
From: Andy Isaacson @ 2005-04-14 8:31 UTC (permalink / raw)
To: Herbert Xu; +Cc: Pavel Machek, Andreas Steinmetz, rjw, linux-kernel
On Thu, Apr 14, 2005 at 09:39:04AM +1000, Herbert Xu wrote:
> > Andreas is right. They are encrypted in swap, but they should not be
> > there at all. And they are encrypted by key that is still available
> > after resume. Bad.
>
> The dmcrypt swap can only be unlocked by the user with a passphrase,
> which is analogous to how you unlock your ssh private key stored
> on the disk using a passphrase.
Does dmcrypt have a simple operation mode like OpenBSD's encrypted swap?
I want to be able to 'sysctl -w kernel.swap_crypt=1' and get
* pages are encrypted as they're written to swap
* the key is automatically regenerated every 2 hours (or whatever); as
pages encrypted under the old key age out, it can be freed eventually
* I don't have to manage keys, choose algorithms, futz with /etc/fstab,
figure out complex configs for /dev/loopN, etc
In fact, I want swap_crypt=1 to be the default (you can turn it off for
embedded systems if you want), but giving me an easy knob is a good
start for 2.6.
Everything I've seen makes me think that configuring dmcrypt is hard.
Don't make users make useless choices. Sure, there are cases where the
complexity is warranted, but please make the 90% solution easy.
-andy
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: encrypted swap (was Re: [PATCH encrypted swsusp 1/3] core functionality)
2005-04-14 8:31 ` encrypted swap (was Re: [PATCH encrypted swsusp 1/3] core functionality) Andy Isaacson
@ 2005-04-14 8:38 ` Herbert Xu
2005-04-14 8:49 ` Arjan van de Ven
0 siblings, 1 reply; 4+ messages in thread
From: Herbert Xu @ 2005-04-14 8:38 UTC (permalink / raw)
To: Andy Isaacson; +Cc: Pavel Machek, Andreas Steinmetz, rjw, linux-kernel
On Thu, Apr 14, 2005 at 01:31:19AM -0700, Andy Isaacson wrote:
>
> Does dmcrypt have a simple operation mode like OpenBSD's encrypted swap?
> I want to be able to 'sysctl -w kernel.swap_crypt=1' and get
It's not that easy however the distros can make it so that it's as
simple as running one command to enable/disable it.
> * pages are encrypted as they're written to swap
Yep.
> * the key is automatically regenerated every 2 hours (or whatever); as
> pages encrypted under the old key age out, it can be freed eventually
This'll require changes to dmcrypt but it's doable.
> * I don't have to manage keys, choose algorithms, futz with /etc/fstab,
> figure out complex configs for /dev/loopN, etc
You don't need to worry about keys unless you want to read from the swap
after a reboot, i.e., swsusp.
Cheers,
--
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: encrypted swap (was Re: [PATCH encrypted swsusp 1/3] core functionality)
2005-04-14 8:38 ` Herbert Xu
@ 2005-04-14 8:49 ` Arjan van de Ven
0 siblings, 0 replies; 4+ messages in thread
From: Arjan van de Ven @ 2005-04-14 8:49 UTC (permalink / raw)
To: Herbert Xu
Cc: Andy Isaacson, Pavel Machek, Andreas Steinmetz, rjw, linux-kernel
>
> > * the key is automatically regenerated every 2 hours (or whatever); as
> > pages encrypted under the old key age out, it can be freed eventually
>
> This'll require changes to dmcrypt but it's doable.
but it's not useful since linux actually generally keeps the pages also
in swap even when they're back in memory (so that if there's memory
pressure again they can just be swapped out cheap again), this leads to
very very long lived swap pages
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2005-04-14 10:58 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <3SZMt-3zo-15@gated-at.bofh.it>
[not found] ` <3T83r-1Mk-35@gated-at.bofh.it>
2005-04-14 10:57 ` encrypted swap (was Re: [PATCH encrypted swsusp 1/3] core functionality) Bodo Eggert <harvested.in.lkml@posting.7eggert.dyndns.org>
2005-04-13 23:39 [PATCH encrypted swsusp 1/3] core functionality Herbert Xu
2005-04-14 8:31 ` encrypted swap (was Re: [PATCH encrypted swsusp 1/3] core functionality) Andy Isaacson
2005-04-14 8:38 ` Herbert Xu
2005-04-14 8:49 ` Arjan van de Ven
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®