Since OpenBSD 3.7, swap is automatically encrypted. If you’re using an earlier version and wish to enable encryption, there are two solutions:

Without Rebooting

To enable swap encryption without rebooting, use the following command:

  sysctl -w vm.swapencrypt.enable=1
  

With Rebooting

To enable swap encryption permanently (requires a reboot), edit the /etc/sysctl.conf file and uncomment this line:

  vm.swapencrypt.enable=1
  

Last updated 01 Aug 2007, 22:54 CEST. history