Re: mlock(1)

From: Wolfgang Walter
Date: Mon Sep 27 2004 - 15:39:51 EST


> Basically to avoid to type the password during suspend, we'd need an
> algorihtm that encrypts with a public key stored on the harddisk and
> restore with the private key that sits only on a human brain. The
> public key would be stored on the harddisk and it would be used by
> suspend to write to the swap partition. the resume password would be
> asked to the user and used to decrypt the data. I think it should work
> fine in theory.
>
> However AFIK those public/private key algorithms only works securely with
> tons of bits (a lot more than with a symmetic encryption), so I don't see
> how can an human could possibly remeber such a long private key by memory.
> I guess to make it work you'd need an USB pen to store it and unplug it
> (then you'd have to be careful not to lose the USB pen). So I think it's
> much simpler to use symmetric crypto (like cryptoloop) and to ask the
> password during suspend too.

You may do it like ssh: encrypt the private key with a symmetric cypher using
a key based on a passphrase and store it on disk (of course this is only as
secure as your passphrase).

On suspend: generate a symmetric-key KS, save memory to harddisk encrypted
with KS, append the KS enrypted with the public key A_PUB. append the private
encrypted key A_PRIV_ENCR_BASED_ON_PASSPHRASE (which is stored on the
harddisk). On resume user must type in passphrase, then we can decrypt
A_PRIV_ENCR_BASED_ON_PASSPHRASE and get A_PRIV, decrypt KS and so decrypt
saved memory.

Greetings,

Wolfgang Walter
--
Wolfgang Walter
Studentenwerk München
Anstalt des öffentlichen Rechts
EDV
Leopoldstraße 15
80802 München
-
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/