1

3 people need to share some data through cloud. The total amount of data is small (<5gb in total). The update rate is very low, 1 per month. The cloud has very limited security measures so we consider all the files stored in it are public exposed.

Then we would like to encrypt the files or an small disk image (6-8gb). There are 3 options:

  1. We can encrypted hundreds files by 3 public keys.
  2. We can put files in a ext4 or btrfs image then encrypt it with 3 public keys.
  3. We can use luks2 image with detached header. Everyone can hold a copy of the header and a pwd to a slot. The header and keys are distributed offline.

Let's assume the users' local systems are bulletproof.

Personally I would say 1st is more robust because it is unlikely all files are corrupted at the same time.

However, here I do not want to discuss the robustness or convince. We do not care if the decryption and encryption can be slower. I would like to know which one is the most difficult one to defeat.

I often saw people were trying to use GPU to crack the luks partition since it is using some master key to encrypt bloks and the info stored in the first sector can help it even if one choose detached header. I do not know how hard it can be if one can use lots of GPUs to crack it. Can they normally crack it in months or in years? Luks in general is ok for disk encryption because once the disk is stolen we can respond to it: start to change credentials to invalid as much as possible the information contained in the disk as an example. But for a cloud stored image we do not know when to react.

Can gpg encryption be harder to crack with GPU? Does it make difference if there are multiple files or just a single image? If someone cracked a single file or obtained clear text of one file, does it mean they can crack other files easier encrypt by the same gpg key? I think it should not be the case. But I can be wrong. In general I think luks made lots of compromise to speed it up, so encrypting files by gpg will be stronger. But to what extent?

3 Answers 3

2

TLDR: From the cryptographic perspective, all your approaches can provide the same strength. The main difference is usability.

All of the named methods can use AES, which is considered non-breakable. Non-breakable means that even if you use the computing power in the whole world, the brute-forcing will take much more time than the Universe exists.

AES is resistant to preimage attacks. Means, even if the attacker knows the contents of some files before and after encryption, it will not help to find the encryption key. From this perspective there is no difference if you use a single file or image as a container or if you encrypt thousands or millions of files separately.

If you encrypt and store each file separately, the attacker will know how many files are there and how big they are. This can give the attacker an information about what kind of data are encrypted (with high probability, but still not 100% sure), e.g. do the files contain images, or videos, or a e-books, or saved web page, etc. In case of LUKS such information is not available to the attacker. Only you know, if disclosing such information about your files makes any risk to you.

Creating backups in case 1 is much easier. You can check what has changed and each time backup only changed files. To create backups you don't need to know the key and thus it can be easier to implement.

In case of LUKS, for backups you would need to encrypt/decrypt the whole partition. You can optimize backups slightly if you use btrfs. But still you have to deal with the whole partition.

When you encrypt every file separately, the file system remains unencrypted. You can forget to encrypt some file and save it there in the plain form. Only you know, if this is an important risk to you. If this is a risk, then you may prefer LUKS, because in that case you don't need to think about encryption all the time. You can put files there from any application like MS Office or Email client, and they will be automatically encrypted.

0

You have quite a bit of confusion to work through here:

"... 3 people need to share some data ... then encrypt it with 3 gpg keys ..."

You seem to be implying that Public Key cryptography is needed/desired by stating 3 gpg keys?

"... We can use luks2 image ..."

This suggests that Public Key cryptography is not required?

Let's back up a bit:

"...Can gpg encryption be harder to crack with GPU?..."

GPG is an encryption toolbox, it is not an encryption algorithm! GPG is capable of producing both Public and Symmetric encryption. The underlying encryption algorithms are well known and highly vetted.

"... I think luks made lots of compromise to speed it up, so encrypting files by gpg will be stronger ..."

LUKS is a container, it is not an encryption algorithm! Within a LUKS container selected encryption is applied. The default encryption used now is AES-256, I think but haven't looked in quite awhile.

My recommendation, based upon your less than clear description, is that you use Veracrypt! This will allow you to merge multiple files into a single encrypted container, use multiple encrypted containers for different files, or whatever. It's also compatible across many operating systems. Veracrypt is a container, you may choose the encryption.

0

It seems there's some confusion between the tools and the underlying encryption algorithms that they employ.

GnuPG, LUKS, openssl, gnutls and all the encryption tools out there, generally use the same cryptographic algorithms. The only difference among them is that each tool is designed to solve a specific problem, e.g. (although not exclusively) gnupg for emails, luks for disk encryption, openssl/gnutls for https etc.

As such, if someone has the capability to break the encryption used e.g. in gnupg, she will generally be able to break the encryption used in luks and openssl.

I would like to know which one is the most difficult one to defeat

Depends on what do you mean by defeat. If you mean cracking the encryption algorithms, then they are equally difficult to be cracked

Can they normally crack it in months or in years?

Depends on the key (type, size and complexity). The simpler the key, the faster it can be found

Can gpg encryption be harder to crack with GPU?

For type-depending-large enough asymmetric keys, cracking is intractable. For symmetric keys it depends on the key (as above)

Does it make difference if there are multiple files or just a single image?

From a cryptographic point of view, if we consider the underlying encryption algorithm to be secure, then there shouldn't be any difference

If someone cracked a single file or obtained clear text of one file, does it mean they can crack other files easier encrypt by the same gpg key?

Normally no, if the underlying algorithm is secure and respects Kerckhoff's principle

You must log in to answer this question.

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