LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-30-2020, 03:24 PM   #1
LegionOfHell
Member
 
Registered: Jul 2020
Posts: 41

Rep: Reputation: Disabled
Best encryption available for Linux ?


I am looking for an encryption mechanism that isn't flawed...

(1) DM-crypt is unreliable because if you are using an SSD and you enable trim, it exposes information about the file system:? here is what the manpage says:

Quote:
WARNING: This command can have a negative security impact
because it can make filesystem-level operations visible on the
physical device. For example, information leaking filesystem
type, used space, etc. may be extractable from the physical
device if the discarded blocks can be located later. If in
doubt, do not use it.
(2) Encfs is an abandoned project and has a flaw ?

(3) Cryfs is slow ?

I am taking a look at ecryptfs....Is this a reliable method ?

Last edited by LegionOfHell; 10-31-2020 at 03:34 PM.
 
Old 10-30-2020, 03:33 PM   #2
sgosnell
Senior Member
 
Registered: Jan 2008
Location: Baja Oklahoma
Distribution: Debian Stable and Unstable
Posts: 1,943

Rep: Reputation: 542Reputation: 542Reputation: 542Reputation: 542Reputation: 542Reputation: 542
The state of the art seems to be LUKS. Is this going to be a new install, or do you want to encrypt something already running? If you encrypt a drive or partition, all data on it will be lost, no matter what system you use. Encryptfs is reliable, AFAIK. Another option is Veracrypt, which is useful if you just want to encrypt a drive, or have data that needs to be encrypted. You can use an encrypted file which veracrypt uses as an encrypted filesystem, which it can mount for you. I really can't say what would work for you, because you haven't said what your goal is. What do you want to encrypt? How do you want to use it?
 
Old 10-30-2020, 08:26 PM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,126

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
Quote:
Originally Posted by LegionOfHell View Post
(1) DM-crypt is unreliable because if you are using an SSD and you enable trim, it exposes information about the file system:?
More likely you don't understand what you read. Are you planning on using hidden volume ?.
 
Old 10-31-2020, 06:33 AM   #4
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
FWIW, I use LVM on LUKS.
But I'm not getting into any "best of" discussion. It works.
 
Old 10-31-2020, 11:19 AM   #5
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,847

Rep: Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309
you ought to look for answers first: https://askubuntu.com/questions/8132...hat-to-use-now
 
Old 10-31-2020, 03:33 PM   #6
LegionOfHell
Member
 
Registered: Jul 2020
Posts: 41

Original Poster
Rep: Reputation: Disabled
I guess the quote block in my first post is wrong....I just fixed it.
 
Old 10-31-2020, 06:41 PM   #7
sgosnell
Senior Member
 
Registered: Jan 2008
Location: Baja Oklahoma
Distribution: Debian Stable and Unstable
Posts: 1,943

Rep: Reputation: 542Reputation: 542Reputation: 542Reputation: 542Reputation: 542Reputation: 542
One final time - what is your goal? What do you want to encrypt, for what use? A file? A directory? A partition? An entire drive? If a drive, what kind of drive? Without knowing your actual need, it's not possible to make an informed recommendation.

Last edited by sgosnell; 10-31-2020 at 06:43 PM.
 
Old 11-01-2020, 09:48 AM   #8
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,779

Rep: Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212
FYI, LUKS is just a front end for DM-crypt.

Using trim is going to reveal information about the filesystem regardless of what sort of encryption you use, but the only thing revealed is the areas of free space. That trimmed free space will read back from the raw device as all-zero, whereas all used space will read back as apparently random data. That pattern can indicate something about the filesystem type and usage. If you can figure out a way to use trim and avoid that, you should write a paper about your technique.
 
Old 11-01-2020, 05:01 PM   #9
LegionOfHell
Member
 
Registered: Jul 2020
Posts: 41

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by rknichols View Post
FYI, LUKS is just a front end for DM-crypt.

Using trim is going to reveal information about the filesystem regardless of what sort of encryption you use, but the only thing revealed is the areas of free space. That trimmed free space will read back from the raw device as all-zero, whereas all used space will read back as apparently random data. That pattern can indicate something about the filesystem type and usage. If you can figure out a way to use trim and avoid that, you should write a paper about your technique.
Does ecryptfs suffer from the same problem dm-crypt has ? trimming exposes the filesystem too with ecryptfs...
 
Old 11-02-2020, 08:38 AM   #10
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,779

Rep: Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212
Quote:
Originally Posted by LegionOfHell View Post
Does ecryptfs suffer from the same problem dm-crypt has ? trimming exposes the filesystem too with ecryptfs...
As I understand it, ecryptfs encrypts individual files within an existing filesystem. The entire filesystem structure remains exposed whether or not trim is used.

Last edited by rknichols; 11-02-2020 at 08:41 AM.
 
  


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
How to have luks encryption with keyfile OR passphrase (efi full disk encryption including boot)? byroncollege Linux - Security 2 03-30-2017 07:45 AM
Mint 18 Full disk encryption VS Veracrypt Full Disk encryption: Help a Noob Decide Please ! APeacefulRig Linux - Security 2 11-11-2016 08:10 AM
[SOLVED] Non-system partition encryption versus container-file encryption of equal size Ulysses_ Linux - Security 13 07-17-2015 07:38 PM
Linux password encryption and data encryption Tux-Slack Programming 4 06-20-2007 06:46 AM
Mandrake 9.0 Wireless Works without encryption.. does not with encryption topcat Linux - Wireless Networking 3 05-04-2003 08:47 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:13 AM.

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