LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 07-10-2012, 06:29 AM   #1
bucovaina78
Member
 
Registered: Oct 2004
Location: Belgium / Antwerp
Distribution: Debian
Posts: 287

Rep: Reputation: 33
mcrypt algorithms


Hi all,

I'm new to the use of mcrypt. I'm trying to encrypt files on my computer that contain some data I'd like to keep for myself.

I've been looking at mcrypt and some installed algorithms but I've got no idea what algorithm to use best. I've been "wiki-ing" a bit and rijndael-256 seems to be rather effective.

I'm not interested in the speed of the en/de/cryption. Nor am I interested in the space it'd take on my hd. I'm talking about a few <1MB files on a big RAID array. Main interest is a safe algorithm.

I guess the best to begin with except for a good algorithm, is a long passphrase no-one will ever be able to guess. (the basics of a strong passphrase/word)

Some other advice you lads can give me?

THX
 
Old 07-10-2012, 08:42 AM   #2
BlackRider
Member
 
Registered: Aug 2011
Posts: 295

Rep: Reputation: 101Reputation: 101
Encryption algorithms are like antibiotics. You cannot easily say which one works the best, but there seems to be some more consensus about which ones do not. I don't think people uses DES for critical tasks nowadays.

Note that I am not a crypto expert, nor I use mcrypt, but I hope this helps:

AES/Rijndael, Blowfish, Twofish... they should make for pretty safe options. It seems to me than most times, the risks reside in implementations or factors that don't rely directly on the crypto-algorithym. For example, AES with an ECB mode is not the best idea, because there are ways to break it via watermarking (or so I have heard).

If you are that paranoid, I suggest you to use a full partition encryption scheme, such as dm-crypt. It is a cleaner solution and can avoid data leaks traditional file based encryption could incur into.
 
Old 07-10-2012, 08:49 AM   #3
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,636
Blog Entries: 4

Rep: Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933
The key to any encryption scenario is: first, the key; and then, the leakiness. The bottom-line, then, is not only that "it's more difficult than it looks," but also that "it has been done before, and done quite thoroughly."

If you have individual files to encrypt, I suggest that you obtain a copy of the gpg security suite (free, of course ...) and then read its documentation thoroughly, especially the part about keychains and digital certificates. http://www.gnupg.org ... http://gnupg.org/gph/en/manual.html.

You want a scenario that is pragmatically simple for you to actually use, in real life, knowing that this business-requirement is one that has been solved, and solved very well. You'll want to not only "keep it to yourself," but maybe also to know that a document isn't forged, hasn't been tampered with. Maybe you will need for it to be sent reliably to someone else, such that no one but the intended recipient can open it (and they'll positively know that it came from you, and that it hasn't been altered in-transit), even though neither of you know one another's private keys, and so on and on. You'll want an easy way to exchange keys, through a public keyserver.

You'll want to encrypt those private keys with a passphrase, but, y'know, if you had to type it in each and every time, you'd inevitably pick a short, weak one that's easy to (re-)type. What you need, then, is a nice "keychain" that will let you "unlock" that key, use it for a few minutes, then "lock" it again. You need to be able to change that passphrase without invalidating any of the documents that were encrypted in the past. If a laptop gets nicked, you need to be able to kill those keys but not others. Got that.

So: "we have the technology." You're not trying to break any laws here ... you just need rugged, civilian-grade security. And, in my opinion, "gpg is it."

Last edited by sundialsvcs; 07-10-2012 at 08:57 AM.
 
Old 07-12-2012, 03:04 PM   #4
NyteOwl
Member
 
Registered: Aug 2008
Location: Nova Scotia, Canada
Distribution: Slackware, OpenBSD, others periodically
Posts: 512

Rep: Reputation: 139Reputation: 139
If you trying to keep general snoops out of your files, pretty much any accepted algorithm will do. If you're worried about corporations or governments with lots of resources then Serpent, Twofish, Blowfish are all good choices. Serpent is arguably the most secure, though slowest, and Blowfish has had the most testing and remained unbroken.

sundialsvcs also gives good advice regarding gpg use.
 
Old 07-17-2012, 09:23 AM   #5
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,636
Blog Entries: 4

Rep: Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933
Well, usually the weak-link in the chain is the key management, not the choice of algorithm. (In many protocols, including VPN and SSL, the choice of cipher is part of the initial key-exchange handshake.) No one's gonna brute-force the key. The weak link in the chain is frankly going to be ... you. The folks who've designed these systems thought a whole lot, not just about the theoretics of the cipher algorithms, but also and especially human nature and human practice.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Problems with using crypto algorithms.. greyblake Linux - Kernel 1 01-07-2011 03:00 PM
Algorithms With C (Mastering) delite Programming 3 12-28-2008 12:04 PM
Algorithms Amdx2_x64 Programming 7 08-09-2008 06:32 PM
what is the Scalable numerical algorithms ztdep Linux - Software 1 01-15-2006 01:32 AM
using mcrypt Hano Linux - Software 0 12-06-2004 03:47 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 08:04 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