Re: Encypted Loopback Filesystem
am 05.08.2004 11:04:35 von suneesh--------------060208010304080905090807
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
Hi
Using losetup you can set a loop device for a particular partition and
it will ask
passwords for the same. After this one can mount that loop device to a some
mount point. If the password is not correct, the mount will fail.
For eg:
[root@root]# losetup -e xor /dev/loop3 /dev/hda2
Password:
[root@root]# mkfs -t ext2 /dev/loop3 100
[root@root]# mount /dev/loop3 /NETBSD/
[root@root]# ls /NETBSD/
lost+found
[root@root]# echo hello > /NETBSD/hello
[root@root]# cat /NETBSD/hello
hello
[root@root]# umount /dev/loop3
[root@root]# losetup -d /dev/loop3
Checking if the partition is encrypted
-------------------------------------------------------
[root@root]# mount /dev/hda2 /NETBSD/
mount: you must specify the filesystem type
Mouting it using password
--------------------------------------
[root@root]# losetup -e xor /dev/loop3 /dev/hda2
Password:
[root@root]# mount /dev/loop3 /NETBSD/
[root@root]# ls /NETBSD/
hello lost+found
But after mounting the partitiion, it doesn't provide any security and
the files will
be accessible by everyone who has the right to access it. The protection
is that it
will ask for passwords when mounting that partition, so if somebody steals
the computer after a power-off, he will not be able to mount and see the
files under
the encrypted partition.
Regards
Suneesh
Lei Yang wrote:
>Hello,
>
>I am trying to play around loopback device and want to set up an
>encrypted loopback filesystem. I did the following things:
>
>1. losetup -e serpent /dev/loop0 /etc/crypt
>/ect/crypt: Is a directory
>
>So I tried: losetup -e serpent /dev/loop0 /etc/cryptfile and this time
>cryptfile is a plain txt file.
>
>Enter passwd...
>
>2. mkfs -t ext2 /dev/loop0
>3. mount -t ext2 /dev/loop0 /mnt/crypt
>
>After this, how do I verify that anything happened that has enabled
>encryption? I can't understand where the encrypted filesystem lies in
>here:( Plus, when we say 'encrypted', which file is on earth encrypted?
>Is that files and data in /mnt/crypt are encrypted form of
>/etc/cryptfile? Really confused.
>
>TIA!
>
>Lei
>
>
>--
>Kernelnewbies: Help each other learn about the Linux kernel.
>Archive: http://mail.nl.linux.org/kernelnewbies/
>FAQ: http://kernelnewbies.org/faq/
>
>
>
>
>
--
Suneesh T P,
Senior Associate, Embedded,
NatureSoft Pvt Ltd.
Mailto: suneesh@naturesoft.net
WebSite: www.nature-soft.com
--------------060208010304080905090807
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit
Hi
Using losetup you can set a loop device for a particular partition and
it will ask
passwords for the same. After this one can mount that loop device to a
some
mount point. If the password is not correct, the mount will fail.
For eg:
[root@root]# losetup -e xor /dev/loop3 /dev/hda2
Password:
[root@root]# mkfs -t ext2 /dev/loop3 100
[root@root]# mount /dev/loop3
/NETBSD/
[root@root]# ls /NETBSD class="moz-txt-tag">/
lost+found
[root@root]# echo hello > /NETBSD/hello
[root@root]# cat /NETBSD/hello
hello
[root@root]# umount /dev/loop3
[root@root]# losetup -d /dev/loop3
Checking if the partition is encrypted
-------------------------------------------------------
[root@root]# mount /dev/hda2
/NETBSD/
mount: you must specify the filesystem type
Mouting it using password
--------------------------------------
[root@root]# losetup -e xor /dev/loop3 /dev/hda2
Password:
[root@root]# mount /dev/loop3
/NETBSD/
[root@root]# ls /NETBSD class="moz-txt-tag">/
hello lost+found
But after mounting the partitiion, it doesn't provide any security and
the files will
be accessible by everyone who has the right to access it. The
protection is that it
will ask for passwords when mounting that partition, so if somebody
steals
the computer after a power-off, he will not be able to mount and see
the files under
the encrypted partition.
Regards
Suneesh
Lei Yang wrote:
cite="mid1091472748.5577.26.camel@bijar.nec-labs.com">
Hello,
I am trying to play around loopback device and want to set up an
encrypted loopback filesystem. I did the following things:
1. losetup -e serpent /dev/loop0 /etc/crypt
/ect/crypt: Is a directory
So I tried: losetup -e serpent /dev/loop0 /etc/cryptfile and this time
cryptfile is a plain txt file.
Enter passwd...
2. mkfs -t ext2 /dev/loop0
3. mount -t ext2 /dev/loop0 /mnt/crypt
After this, how do I verify that anything happened that has enabled
encryption? I can't understand where the encrypted filesystem lies in
here:( Plus, when we say 'encrypted', which file is on earth encrypted?
Is that files and data in /mnt/crypt are encrypted form of
/etc/cryptfile? Really confused.
TIA!
Lei
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:
FAQ:
--
Suneesh T P,
Senior Associate, Embedded,
NatureSoft Pvt Ltd.
Mailto:
WebSite:
--------------060208010304080905090807--
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive: http://mail.nl.linux.org/kernelnewbies/
FAQ: http://kernelnewbies.org/faq/