Sample Header Ad - 728x90

Is the following way of encrypting hard drive using file encryption safe?

-1 votes
1 answer
78 views
Assuming that I want to encrypt/decrypt a hard drive corresponding to /dev/sdX, the following is the procedure I have for doing so: **Encryption:** 1. Write the hard drive's data into a file (e.g. ./tmp), using the command dd if=/dev/sdX of=./tmp 2. Encrypt the tmp file using any secure file encryption algorithm 3. Write the encrypted tmp.enc into the hard drive (dd if=./tmp.enc of=/dev/sdX) **Decryption:** 1. Write the hard drive's data into a file (e.g. ./tmp), using the command dd if=/dev/sdX of=./tmp.enc 2. Decrypt the tmp.enc file 3. Write the decrypted tmp into the hard drive (dd if=./tmp of=/dev/sdX) Does the following method necessarily work?
Asked by sbh (71 rep)
Jun 28, 2025, 03:00 PM
Last activity: Jun 29, 2025, 02:57 AM