Skip to content

RFC Introduce the in-kernel hibernation encryption

Chen Yu linux-crypto linux-pm lkml 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 RFC Latest3 of 4 patches 49 repliesIn review
  2. v1 RFC3 patches 31 repliesSuperseded

3 of 4 patches are in this archive. The cover letter announces 4.

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4PM / Hibernate: Add helper functions for hibernation encryptionkernel/power/Kconfig kernel/power/Makefile kernel/power/crypto_hibernation.c +1 more+468 -00 replies
2/4PM / hibernate: Install crypto hooks for hibernation encryptioninclude/linux/suspend.h kernel/power/crypto_hibernation.c kernel/power/hibernate.c +1 more+119 -00 replies
4/4tools: create power/crypto utilitytools/power/crypto/Makefile tools/power/crypto/crypto_hibernate.c+486 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH 0/4][RFC v2] Introduce the in-kernel hibernation encryption

As security becomes more and more important, we add the in-kernel encryption support for hibernation.

This prototype is a trial version to implement the hibernation encryption in the kernel. This patch set is divided into two parts:
1. The hibernation snapshot encryption in kernel space.
2. The key derivation implementation in user space.

The whole process is illustrated below:
1. install the kernel module:
modprobe crypto_hibernation
2. run the tool to generate the key from user provided passphrase (salt has been read from kernel).
3. launch the hibernation process, the kernel uses the key in step 2 to encrypt the hibernation snapshot.
4. resume the system and the initrd will launch cryto_hibernate to read previous salt from kernel and probe the user passphrase and generate the same key.
5. kernel uses this key to decrypt the hibernation snapshot and restore to previous system.

Chen Yu (4):
PM / Hibernate: Add helper functions for hibernation encryption PM / hibernate: Install crypto hooks for hibernation encryption PM / Hibernate: Encrypt the snapshot pages before submitted to the
block device
tools: create power/crypto utility

 include/linux/suspend.h               |  40 +++
 kernel/power/Kconfig                  |  14 ++
 kernel/power/Makefile                 |   1 +
 kernel/power/crypto_hibernation.c     | 421 +++++++++++++++++++++++++++++++
 kernel/power/hibernate.c              |  67 +++++
 kernel/power/power.h                  |  67 +++++
 kernel/power/swap.c                   | 182 +++++++++++++-
 tools/power/crypto/Makefile           |  24 ++
 tools/power/crypto/crypto_hibernate.c | 462 ++++++++++++++++++++++++++++++++++
 9 files changed, 1270 insertions(+), 8 deletions(-)
 create mode 100644 kernel/power/crypto_hibernation.c
 create mode 100644 tools/power/crypto/Makefile
 create mode 100644 tools/power/crypto/crypto_hibernate.c
Signature · 1 line
2.7.4