Re: encrypted swap (was Re: [PATCH encrypted swsusp 1/3] core functionality)

From: Herbert Xu
Date: Thu Apr 14 2005 - 03:41:46 EST


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@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/