Sign up ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Can you encrypt a hard disk with gpg? Is there any tool to do that?

share|improve this question

migrated from Sep 3 '12 at 12:22

This question came from our site for professional and enthusiast programmers.

Most OS'ses allow you to access a HDD as a file. So technically it is possible. I suspect that it will not do what you want though. – Hennes Sep 3 '12 at 12:27
Why do you want to do that? What is your use case? – Oliver Salzburg Sep 3 '12 at 14:49
The commercial PGP used to have "PGP Disk". – grawity Sep 3 '12 at 16:42

2 Answers 2

Even if it's possible, it probably isn't a good solution because disk encryption needs to be a transparent layer between OS and disk due to the continuous I/O.

share|improve this answer
It's certainly much more practical than encrypting each and every file individually and has the same performance. – Sedat Kapanoglu May 29 '14 at 22:43

You can do this using GPG encrypted loopback disks. This page explains the concept like so:

My intention was to be able to secure some data by encrypting them with a GPG key, but not have to create a new partition on my disk. Also, I wanted to do easy backups by just backing up a single file. I also wanted to be sure that I would still be able to recover everything in case my disk encryption GPG key was lost. Since I am not aware of any systems that do this automatically, I just combined loopback devices, luks and GPG into a set of bash scripts.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.