48

I recently installed 11.10 on a fresh disk using entire disk encryption. Can someone tell me how secure the encryption algorithm is? Has there been any recent breaches with said algorithm? I use a 36 character random passphrase so I know thats not a weak link. What are the chances my client's data could be compromised if the hard drive was stolen?

4
  • You might be better off asking how long it would (on average) take someone to break that passphrase. Also it might help to know if the person stealing it would know it has credit card data for example. I think you can argue that if it isn't credit cards no one is going to brute force it -- no money in it.
    – jcollum
    Jan 20, 2012 at 20:46
  • 13
    Secure against what ? Cracking the encryption with a super computer - difficult but not impossible. Cracking the code with a $10 wrench - easier imgs.xkcd.com/comics/security.png
    – Panther
    Jan 20, 2012 at 21:17
  • Here's how to see which cipher you're using in LUKS: What is used in the 12.10 full disk encryption?
    – gertvdijk
    Jan 21, 2013 at 10:17
  • 1
    @Panther Is a $10 wrench really required? I'm sure there are cheaper solutions. Requiring such an expensive barrier to entry in cryptanalysis is detrimental to the field. Jun 19, 2018 at 3:41

4 Answers 4

41

Yes, it is secure. Ubuntu uses AES-256 to encrypt the disk volume and has a cypher feedback to help protect it from frequency attacks and others attacks that target statically encrypted data.

As an algorithm, AES is secure and this has been proved by crypt-analysis testing. The weakness actually lies within the cypher and the software to pass it the keys. Specifically lies in the keystore (which is stored in the header of the volume), the keystore is secured by a passphrase. Passphrases are of course open to some attacks such as dictionary/brute force (if this was successful, it would decrypt the keystore). Using long "complex" non-word passwords would reduce the chance of this happening.

The only other possibility to decrypt is using recording devices or social engineering to determine your passphrase.

In short, your computer is reasonably safe unless you are subject to serious organised cyber crime or Government investigation!

8
  • 25
    You should however note that if your computer is taken whilst running or in suspend mode (hibernation is fine), there are various, fairly easy techniques to extract the password from RAM. I would thusly advice caution on which state you leave your laptop in whilst traveling, but overall you should be safe from most potential scenarios of data loss. Jan 21, 2012 at 5:39
  • 2
    @ternaryOperator not really, this only applies to laptops. When the computer loses power RAM data decays pretty fast until it's unreadable (this is why we don't just use RAM instead of SSD for super fast storage, it wasn't just speed that was the problem; various companies are trying to find a way though (memristors)) Unless by taken you meant physically accessed while still powered on.
    – Cestarian
    Apr 10, 2016 at 4:59
  • 2
    @Cestarian, yes, I mean that even if the disk is encrypted, the data is vulnerable whilst the machine is turned on (even when locked or in suspend mode). So for example, if you leave your computer on or in suspend mode overnight, or for some other reason someone is able to access your computer when it is not fully off, then they will have a pretty good chance of accessing your data by accessing the contents of RAM (and spraying the RAM with coolant spray has been shown to slow the decay of data in RAM significantly, which can allow for the machine to be rebooted to run recovery software). Apr 13, 2016 at 21:12
  • 1
    @ternaryOperator it's a long shot though, to access it when it's left on they have to either A: Login to my NAS server (which requires cracking one of two possible 10+ character, and it's not in a very convenient location for this... (small storage room) guess they could try to use ssh tho) B: Hope they can hijack encryption keys from my RAM (Aren't the encryption keys deleted from RAM as soon as they've been used though? This basically wouldn't happen then.) which is the more plausible approach but requires more expertise. As a simple normal dude, I'm sooo not worth the trouble.
    – Cestarian
    Apr 13, 2016 at 22:18
  • 1
    @Cestarian This works by option B, accessing the encryption keys from RAM. The encryption key is cached somewhere in RAM as the operating system needs it every time it reads/writes data on the encrypted disk. I agree that most people have need for this level of paranoia regarding disk encryption, and my interest is mainly academic, however this is one of the most practical scenarios for attacking disk encryption with a decent password and needs no special equipment. The details of these attacks are covered in this Wikipedia article: en.wikipedia.org/wiki/Cold_boot_attack. Apr 15, 2016 at 14:11
9

Here are two resources about attacks on this type of file system that seem to be interesting: http://dx.eng.uiowa.edu/dave/luks.php http://www.jakoblell.com/blog/2013/12/22/practical-malleability-attack-against-cbc-encrypted-luks-partitions/

In short, the latter document describes that it is possible to inject a remote code execution backdoor into the LUKS setup created by the Ubuntu 12.04 installer. This attack only needs access to the encrypted hard drive (it does not rely on manipulating the unencrypted /boot partition or the BIOS).

While the attack is pretty bad, it does not apply to modern LUCS setups. The attack can only be applied if the block mode is CBC, for example if the cipher aes-cbc-essiv is used. Modern setups use other block modes, like the cipher aes-xts-plain64 (see this article on the ArchLinux wiki).

To check which cipher is used by your setup, run:

sudo cryptsetup status [device]

where [device] is your mapping, like /dev/mapper/sda3_crypt.

3
  • 1
    Welcome to Ask Ubuntu! Whilst this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference.
    – guntbert
    Jun 9, 2014 at 10:07
  • I'm pretty worried about the practical malleability attack, for example there's a string that can easily be found on any ext4 partition (lost+found) the quantity of possible strings vastly increases if it's a system partition, but is more obscure if the content of the drives is unknown. No need to be worried about the passphrase being recoverable from RAM, if your computer is caught in an online state it is most likely that your drives are already in a decrypted state. So you should just ensure that your system can be turned off with the press of a button the moment you feel threatened.
    – Cestarian
    Apr 11, 2016 at 7:10
  • LUKS, not LUCS. Nov 30, 2016 at 13:01
2

I have created a Windows program that will perform a dictionary attack on Luks volumes. http://code.google.com/p/luks-volume-cracker/

Its slow by design, trying around 3 keys a second. Other dictionary attacks will be similarly slow, so unless you've chosen an easy passphrase the weakness will not be the algorithm.

Be aware of key stealing from memory, and caching of files, however.

5
  • 1
    This does not answer the question how secure it is. This is an answer to a question on how do I perform a dictionary attack on my LUKS device?.
    – gertvdijk
    Feb 6, 2013 at 15:30
  • 3
    @gertvdijk I think this may answer the question. "unless you've chosen an easy passphrase the weakness will not be the algorithm." The rest could be considered a demonstration of that principle. The last sentence is on-topic too. Feb 6, 2013 at 16:17
  • 1
    @EliahKagan I disagree. The question is explicitly about the algorithm itself. Just stating "the weakness will not be the algorithm" is not an answer to that, in my believe. Don't get me wrong - it still has valid and valuable points, but not for this question.
    – gertvdijk
    Feb 6, 2013 at 16:28
  • 1
    @gertvdijk This answer also gauges how long it takes to crack the algorithm, with a link to a demonstration. I'm not saying this is the best answer, but I think it falls on the side of being an answer (to this question). Furthermore, how secure the algorithm is, is actually just one of several parts of the question. Feb 6, 2013 at 16:42
  • 1
    I do think this goes some way to demonstrate the level of possible attack against LUKS. 3 attempts a second from a dictionary is never going to crack a semi-decent passphrase.
    – Oli
    Jan 3, 2014 at 16:56
-3

LUKS encryption method is potentially unsafe, at least in the way it handles the encryption process. Lets give it the benefit of the doubt the algorithms are safe and we can compare them to algorithm code that has been audited. Putting that aside, as a user, you aren't allowed to create a key that encrypts your data. That's like telling someone, hey, I'll make up a password that encrypts your bank account, not you. But, I'll be so nice to let you make up a password that encrypts my password. There is the security weakness with LUKS as I see it.

LUKS uses a Master Key or what they call a Unified Key. This key is generated using the 'random' and 'urandom' programs installed on the Linux system. If these programs are compromised in some way, your Master Key becomes weak. No matter how strong your password is, the Master Key creation method creates a vulnerability.

Compare this to TrueCrypt who mysteriously shutdown during the biggest leaks against US spying. TrueCrypt volumes that have been properly encrypted according to TrueCrypts documentation, have not been broken into. The government threw all the tax payers money at TrueCrypt volumes and could not break them. This is legal record. https://en.wikipedia.org/wiki/TrueCrypt#Legal_cases (TrueCrypt is 4th Amendment Approved)

TrueCrypt allows the user to create the Master Key. During volume creation TrueCrypt allows the user to move the mouse around in the TrueCrypt interface for as long as they like which randomly manipulates the value of the Master Key being created. That puts the power of chaos in the users hand where it belongs. LUKS does not allow this easy programmatic feature.

2
  • 5
    WARNING: Using TrueCrypt is not secure as it may contain unfixed security issues. Now, aside from that, LUKS supports user-defined <= 512 char passphrases and <= 8MiB keyfiles of arbitrary binary data. Secondly, the Linux random devices can be compromised if the system (i.e. the root account) is compromised. TrueCrypt doesn't have a magic shield for this scenario. Lastly, the Linux kernel automatically collects its entropy for (u)random from many devices, including the mouse. Bottom line – TrueCrypt is abandoned and should not be used. Use LUKS. Apr 11, 2016 at 23:29
  • 2
    You don't understand how key generation works. TrueCrypt (like its successors) uses the same process as LUKS to generate the master key : collect entropy by various means, including mouse movements, feed it into a pseudo-random numbers generator, and use said PRNG's output as the master key. The difference is that TrueCrypt uses its own algorithm to generate the key instead of the system RNG. TrueCrypt's algorithm is as likely to be flawed as the OS-provided RNG. This answer is FUD, and is dangerous for uninformed users. LUKS is secure.
    – Hey
    Aug 12, 2017 at 14:16

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .