Systemd-swap: encrypted swap file support?

Created on 22 Jun 2019  ·  7Comments  ·  Source: Nefelim4ag/systemd-swap

help wanted

Most helpful comment

I'm guessing that @dou4cc means swap on a dm-crypt volume with a random key.

All 7 comments

What you mean?
Linux doesn't have encrypted swap.

I'm guessing that @dou4cc means swap on a dm-crypt volume with a random key.

@Nefelim4ag whether you accept the feature request?

I'm don't see any sense in that, so nope.
If you really care about your data, such things is your problem.

More over, why i must support dm-crypt and not support LUKS or vise-versa?

i.e. what if i insert code, which will send key to me from every computer with dm-crypt?

You must understand the concern, you can do encrypted swap partition by yourself.

More over, why i must support dm-crypt and not support LUKS or vise-versa?

either of they be ok

i.e. what if i insert code, which will send key to me from every computer with dm-crypt?

well, even if not implement the feature, you can crack into dm-crypt

@dou4cc I'm not sure which method of encrypted swap you are after, but I just tried this project for the first time and it is working for my method without modifying the configuration or service.

In my /etc/crypttab, I put:

#<name>  <device>                              <password>     <options>
swap     /dev/disk/by-id/nvme-eui.2f5f-part2   /dev/urandom   swap,cipher=aes-cbc-essiv:sha256,size=256

I then installed systemd-swap and enabled it before rebooting.

# swapon --show
NAME      TYPE      SIZE USED PRIO
/dev/dm-5 partition 6.5G   0B   -2

Since we delete our swapfiles on shutdown the security seems to only matter in regards to hibernation.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Brottweiler picture Brottweiler  ·  6Comments

Nefelim4ag picture Nefelim4ag  ·  3Comments

switchpants picture switchpants  ·  16Comments

cerebrux picture cerebrux  ·  4Comments

adrelanos picture adrelanos  ·  3Comments