public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: Pavel Machek <pavel@ucw.cz>
Cc: linux-kernel@vger.kernel.org, ast@domdv.de
Subject: Re: [swsusp] encrypt suspend data for easy wiping
Date: Wed, 6 Jul 2005 02:02:51 -0700	[thread overview]
Message-ID: <20050706020251.2ba175cc.akpm@osdl.org> (raw)
In-Reply-To: <20050703213519.GA6750@elf.ucw.cz>

Pavel Machek <pavel@ucw.cz> wrote:
>
> To prevent data gathering from swap after resume you can encrypt the
> suspend image with a temporary key that is deleted on resume. Note
> that the temporary key is stored unencrypted on disk while the system
> is suspended... still it means that saved data are wiped from disk
> during resume by simply overwritting the key.

hm, how useful is that?  swap can still contain sensitive userspace stuff.

Are there any plans to allow the user to type the key in on resume?

> +Encrypted suspend image:
> +------------------------
> +If you want to store your suspend image encrypted with a temporary
> +key to prevent data gathering after resume you must compile
> +crypto and the aes algorithm into the kernel - modules won't work
> +as they cannot be loaded at resume time.

Why not just `select' the needed symbols in Kconfig?  It makes
configuration much easier for the user.

> +	if(!*tfm) {
> +	if(sizeof(key) < crypto_tfm_alg_min_keysize(*tfm)) {
> +	if (mode) {

Coding style nit: please use a single space after `if'.

> +fail:	crypto_free_tfm(*tfm);
> +out:	return error;

We conventionally insert a newline directly after labels.

> +#ifdef CONFIG_SWSUSP_ENCRYPT
> +#ifdef CONFIG_SWSUSP_ENCRYPT
> +#ifdef CONFIG_SWSUSP_ENCRYPT
> +#ifdef CONFIG_SWSUSP_ENCRYPT
> +#ifdef CONFIG_SWSUSP_ENCRYPT
> +#ifdef CONFIG_SWSUSP_ENCRYPT
> +#ifdef CONFIG_SWSUSP_ENCRYPT
> +#ifdef CONFIG_SWSUSP_ENCRYPT
> +#ifdef CONFIG_SWSUSP_ENCRYPT

err, no.  Please find a way to reduce the ifdeffery.

  reply	other threads:[~2005-07-06 11:51 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-03 21:35 [swsusp] encrypt suspend data for easy wiping Pavel Machek
2005-07-06  9:02 ` Andrew Morton [this message]
2005-07-06  9:11   ` Pavel Machek
2005-07-06 12:49     ` Grzegorz Kulewski
2005-07-07 19:14       ` Pavel Machek
2005-07-07 19:30         ` Grzegorz Kulewski
2005-07-17 15:36   ` Andreas Steinmetz
2005-07-26  3:10     ` Andrew Morton
2005-07-26 22:04       ` Matt Mackall
2005-07-26 22:14         ` Pavel Machek
2005-07-26 22:58           ` Matt Mackall
2005-07-26 23:12             ` Pavel Machek
2005-07-26 23:53               ` Matt Mackall
2005-07-27  7:38                 ` Pavel Machek
2005-07-27 14:22                   ` Andreas Steinmetz
2005-07-26 22:26         ` Pavel Machek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050706020251.2ba175cc.akpm@osdl.org \
    --to=akpm@osdl.org \
    --cc=ast@domdv.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pavel@ucw.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox