Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Networking & Security
  • Search

Preparing a hard drive for encryption.

Having problems getting connected to the internet or running a server? Wondering about securing your box? Ask here.
Post Reply
Advanced search
7 posts • Page 1 of 1
Author
Message
phatfish
n00b
n00b
Posts: 11
Joined: Tue Jan 25, 2005 4:45 pm

Preparing a hard drive for encryption.

  • Quote

Post by phatfish » Wed Mar 08, 2006 11:01 pm

Hi,

Ive setup loop-aes for HDD encryption, and the tutorial i was reading suggested that you should fill the drive with random looking data first, before writing encrypted data (Part of the loop-aes readme in fact http://loop-aes.sourceforge.net/loop-AES.README).

The command suggested was this:

dd if=/dev/zero of=/dev/loop1 bs=4k conv=notrunc 2>/dev/null

I have the encryption working fine, but i would like to encrypt some large drives, 200gig. But writing "random" data with the command above seems to take about 5hrs + for 200gig (it took about 5mins to write to a 3gig partion on my XP2000+).

I would be interested to know if anyone has a more efficient way to prepare a large HDD for encryption; or thoughts on any other methods would be appreciated.

Thanks
Top
cagezero
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 81
Joined: Mon Dec 19, 2005 5:43 am

  • Quote

Post by cagezero » Wed Mar 08, 2006 11:11 pm

i am not sure about other methods for preparing your disk for encryption.
However, just as a note, i am pretty sure the command you posted writes zeros and not
random data to your drive.
for random (or in this case pseudo random) data you need to:

Code: Select all

dd if=/dev/urandom of=/dev/${your drive}
Top
phatfish
n00b
n00b
Posts: 11
Joined: Tue Jan 25, 2005 4:45 pm

  • Quote

Post by phatfish » Wed Mar 08, 2006 11:25 pm

Yeah sorry thats right, this is what i should have posted:

Code: Select all

Fill the partition with random looking data. "dd" command may take a while to execute if partition is large.

head -c 15 /dev/urandom | uuencode -m - | head -n 2 | tail -n 1 | losetup -p 0 -e AES128 /dev/loop3 /dev/hda666
dd if=/dev/zero of=/dev/loop3 bs=4k conv=notrunc 2>/dev/null
losetup -d /dev/loop3
That is what is suggested in the the readme. I assume that the process is actually needed, i take the suggestions in the readme to be from people who know far more about this than me :)
Top
cagezero
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 81
Joined: Mon Dec 19, 2005 5:43 am

  • Quote

Post by cagezero » Wed Mar 08, 2006 11:29 pm

cool 8)
Top
phatfish
n00b
n00b
Posts: 11
Joined: Tue Jan 25, 2005 4:45 pm

  • Quote

Post by phatfish » Thu Mar 09, 2006 5:17 pm

Well it's not that cool since it takes 5hrs to execute the command.

Anyone with any ideas on the questions i mentioned in the first post are appreciated.

Thanks
Top
davidblewett
Apprentice
Apprentice
User avatar
Posts: 274
Joined: Sun Feb 15, 2004 2:23 am
Location: Indiana

  • Quote

Post by davidblewett » Thu Mar 09, 2006 8:00 pm

From what I've read, just writing zeros or random data in one pass is not enough. When I prepped my encrypted volume, I used a utility that shredded the free space according to Peter Gutmann's recommendations (can be found here: http://www.cs.auckland.ac.nz/~pgut001/p ... e_del.html). This basically does 35 passes using different writing techniques. Basically, once data has been written to a hard drive there is no guarantee that it can't be resurrected due to the mechanics involved. To do a ~20 gig drive took about 3 or 4 hours if I remember right.

As far as your original question goes, it can't really be sped up. If your IDE drivers are all set to their best performance settings, that's all you can do using the commands you posted.
No guilt in life, no fear in death
this is the power of Christ in me
From life’s first cry to final breath
Jesus commands my destiny
-- Newsboys, "In Christ Alone", "Adoration: The Worship Album"
Top
phatfish
n00b
n00b
Posts: 11
Joined: Tue Jan 25, 2005 4:45 pm

  • Quote

Post by phatfish » Fri Mar 10, 2006 2:22 pm

Thanks a lot david, thats all i wanted to know really is whether i was doing it the fastest way. If it can't be sped up ill just have to wait. Ill check out the link you mentioned to.

Thanks
Top
Post Reply

7 posts • Page 1 of 1

Return to “Networking & Security”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic