Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
256 bit AES on-the-fly cryptography - Fixed
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
nickv_111
n00b
n00b


Joined: 22 Jul 2004
Posts: 20

PostPosted: Fri Apr 01, 2005 10:47 pm    Post subject: 256 bit AES on-the-fly cryptography - Fixed Reply with quote

Hello! I was wondering how I would go about implementing 256 bit AES cryptography on a directory. It needs to be transparent to other programs. I was thinking of using dm-crypt, but the problem there is wasted space. I mean, if I create a file called foo.img and it contains an encrypted filesystem, then I have a fixed-size filesystem. Now, what if I want to make it bigger? I'd have to make a new image, or potentially add more zeroes into that file and resize the filesystem. I have to add more space than I will probably take up. Also, if I remove files from that filesystem, then I have to somehow shrink the filesystem. This all gets very inconvinient. What would be ideal is a filesystem that automatically resizes according to how much space it needs. Something that is built for disk images. That way, if I added a file, it would change the disk image to take up more space. If I removed a file, it would shrink the disk image. Any other methods of 256 bit AES cryptography are welcomed. Mostly, the problem with using a disk image is space, so a dynamic filesystem should solve the problem.

Update:
I found a solution. When creating a .img, just do something like:
dd if=/dev/zero of=encrypted.img bs=1K count=1 seek=2097152
The above example creates a 2GB disk, but it initially starts as about 12K (size on disk, not actual size). When data is added, it expands.
Using that in conjunction with dm-crypt, I can now create AES encrypted filesystems that expand or contract depending on usage.

Thanks in advance,
Nick
Back to top
View user's profile Send private message
dblaci
n00b
n00b


Joined: 05 Oct 2004
Posts: 30

PostPosted: Sun Sep 30, 2007 11:51 am    Post subject: Reply with quote

"I can now create AES encrypted filesystems that expand or contract depending on usage. "

I see, why it will expand on demand, but i don't think it will contract on freeing up space on the crypted fs.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum