LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 07-14-2011, 02:53 AM   #1
deNiro
Member
 
Registered: Jun 2003
Distribution: Slackware-Current and Salix 14.2
Posts: 274
Blog Entries: 1

Rep: Reputation: Disabled
luks encryption on ssd


I've got a laptop, and bought an intel ssd for it. On a mobile device encryption is a must. But what is the best option? Because when i use luks cryptsetup, trim of my ssd is no longer working which causes serious performance degradation.

I don't care much for alignment of the drive, but trim should work. I googled my ass of, and all i found that luks is not working well with trim support of the ssd's.

Is there another option to use full encryption of at least my home partition? Or should i just place back the original drive, and use the ssd for my desktop?
 
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 07-14-2011, 04:01 AM   #2
gorillus
Member
 
Registered: Jun 2011
Location: /home
Distribution: Slackware
Posts: 31

Rep: Reputation: 16
Well, there is not really a support for TRIM yet, but you could try this patch

Be sure to backup you data before!

I read about it in the dm-crypt-newsgroup:

http://thread.gmane.org/gmane.linux.....dm-crypt/4075


I have no expierience with it btw...
 
Old 07-14-2011, 04:10 AM   #3
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
Using trim would provide an attacker with information on which parts of the filesystem contain data and which are empty. I'm not a crypto expert, so I don't know how harmful this would be.

However, have you tried the `discard' option with ext4? I think if it doesn't work, it is due to device-mapper not supporting trim (in April, 2010 anyway). This may change in the future or might be different now.

Part of a performance hit may be due to the drive being prefilled with pseudo random data when creating the encrypted device, so until a delete, there are no discarded areas. The SSD drive doesn't have information on invalid regions of the filesystem. The purpose of trim is to tell it this after a delete.

As an experiment (if the discard option works) you could try filling much of the free space with a file (using dd) and then delete it.
 
Old 07-14-2011, 06:42 AM   #4
deNiro
Member
 
Registered: Jun 2003
Distribution: Slackware-Current and Salix 14.2
Posts: 274

Original Poster
Blog Entries: 1

Rep: Reputation: Disabled
Thanks for the replies.

to jschiwal: discard is not working, unfortunately.
to gorillus: i'm not really willing to use experimental patches, because everything with datastorage should be tested and stable, and this is not a testing environment. But really thanks for the reference.

Unfortunately we live in the present, as we always will. And in the present luks is a bitch, but i'll have to use it. I'll just accept the low performance in favor of security.
 
Old 07-14-2011, 07:45 AM   #5
GazL
LQ Veteran
 
Registered: May 2008
Posts: 6,901

Rep: Reputation: 5025Reputation: 5025Reputation: 5025Reputation: 5025Reputation: 5025Reputation: 5025Reputation: 5025Reputation: 5025Reputation: 5025Reputation: 5025Reputation: 5025
Have you had a look at using either EncFS or ecryptfs? They're not quite the same thing as a block level encryption, but they might meet your needs.
 
2 members found this post helpful.
Old 07-14-2011, 03:24 PM   #6
gorillus
Member
 
Registered: Jun 2011
Location: /home
Distribution: Slackware
Posts: 31

Rep: Reputation: 16
Quote:
Originally Posted by deNiro View Post
to gorillus: i'm not really willing to use experimental patches, because everything with datastorage should be tested and stable, and this is not a testing environment. But really thanks for the reference.
I was thinking the same, I wanted to mention it...
A lot of tips to speed up your ssd you can find in the Arch-Wiki by the way...
 
Old 07-15-2011, 11:42 AM   #7
deNiro
Member
 
Registered: Jun 2003
Distribution: Slackware-Current and Salix 14.2
Posts: 274

Original Poster
Blog Entries: 1

Rep: Reputation: Disabled
No, not yet, but looking at EncFS website, it seems perfect for me. So thanks! I only need to use very simple encryption of my home dir. Simply to defend my data in case of a theft of the laptop, not to defend against some secret agency or so.

I'll try to implement it and let you know the results.

Quote:
Originally Posted by GazL View Post
Have you had a look at using either EncFS or ecryptfs? They're not quite the same thing as a block level encryption, but they might meet your needs.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LUKS encryption, sets xyzone Linux - Security 1 06-21-2010 12:43 AM
Luks Encryption in Slackware Alexvader Slackware 3 11-06-2009 03:56 PM
Security of LUKS encryption PlatinumX Linux - Security 5 06-06-2009 04:08 PM
LUKS encryption question DarkpawT Linux - Software 4 11-05-2008 01:18 AM
System encryption with dm-crypt and luks? Zmyrgel Slackware 9 09-02-2006 10:40 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 10:47 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration