You are not logged in.

#1 2008-08-21 17:32:28

paraflu
Member
Registered: 2008-02-23
Posts: 53

Does a crypted filesystem gains compression

Hello, everybody

i have some questions - as usual :-)
That`s why i ask you , because i think that somebody maybe has the answer.
If i understand right, when i use a crypt-program, that before it use
the algorythm, the data gets compressed. If i remember right most of the
time they use zlib to compress the data and after that it will be crypted.
So if i want a filesystem which compress the data, i could use aes or so alike.
I know that truecrypt has the abiltiy to use a growing container. So here
is my question if i use a crypted container does it gain compression?
I don`t think so because it has do be implemented in the file system.
I know some fuse plugins which have compress ablity, but i don`t want to use
them, because they are most experimental and not really easy to combine with
a crypted filesystem (double the processing power).
so does anybody know more about this case. Do i gain compressing ratio with
crypting my whole system with for example luks or does it have no effect
because of maybe some overhead whichthe algorithm produce.

By the way, the goal that i want to gain is to use an usbstick with online
(realtime) compressing with a crypted system.

It would be very nice if anybody has any experience  in it and could
tell me more than any theory, but for any theory i am also very thankful.

thank you for your answers.

Offline

#2 2008-08-22 06:55:41

zyghom
Member
From: Poland/currently Africa
Registered: 2006-05-11
Posts: 432
Website

Re: Does a crypted filesystem gains compression

I'm using cryptsetup luks for /home and no compression at all by default happens


Zygfryd Homonto

Offline

#3 2008-08-22 16:41:22

fflarex
Member
Registered: 2007-09-15
Posts: 466

Re: Does a crypted filesystem gains compression

I don't think you're going to find what you want. In general, you will need to use separate tools for encryption and compression, and if you don't like fuse that limits your choices even more.

Offline

#4 2008-09-17 19:04:58

paraflu
Member
Registered: 2008-02-23
Posts: 53

Re: Does a crypted filesystem gains compression

Sorry for the late reply

When i look at the aes or most of the other encryption techniques,
they do a compression before the encryption, that`s the base of my
question why doesn`t it results in a smaller file? Do they fill it
up with random data, to gain a more resistend file? Where is the
compression level archived?
I`ve read some truecrypt forum posts, but some of them tell that
is good to have this seperated, but it is for sure implemented in
the encrypted system for security (an compressed data is better to
encrypt than a non-compressed data)
So my question is still present, but the experience could make
me silent.
I don`t know -  it should have - but it doesn`t show off. Is the filesystem
capable of it?
??????? (  :-)  )
But if there is no experienced compression, i have to accept that,
even if i don`t know why or how.

Offline

#5 2008-09-18 08:18:43

kamituel
Member
From: Poland
Registered: 2006-09-14
Posts: 47
Website

Re: Does a crypted filesystem gains compression

Hi,
I don't think modern encryption algorithms includes compression of data. I'm pretty sure AES does not do that, and I'm 100% sure Twofish does not either.
In those algorithms 128 bits of input _always_ results in 128 bits of output (the same thing happens for 192 and 256 bit length blocks).

So if any compression is going to happen, it should be done before running the encryption algorithm itself.
In theory, it is not a bad idea to compress the data before encrypting it, because it makes it to look more randomly.
But I think compression would not be done for two reasons:
1. It's a probably at least as CPU intensive as encryption itself (or even more)
2. Those algorithms are so strong, that even not random data is encrypted in the way it cannot be decrypted with any existing machines.

Oh, and by the way, I've heard some time ago that the compression plugin was going to be developed for the Reiser4 filesystem, maybe you should check this out.

Last edited by kamituel (2008-09-18 08:20:09)


I tried, I failed, no matter. Try again, fail again, fail better.

Offline

Board footer

Powered by FluxBB