LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Security (https://www.linuxquestions.org/questions/linux-security-4/)
-   -   Problem with decrypion (https://www.linuxquestions.org/questions/linux-security-4/problem-with-decrypion-384678/)

big_ds 11-19-2005 01:34 PM

Problem with decryption
 
Hi!

I've encrypted a file in Slackware 10.2 with the following commands:
Code:

dd if=/dev/urandom of=/mnt/sda4/enc.img bs=1024k count=700
losetup -e twofish /dev/loop0 /mnt/sda4/enc.img
mkfs.ext2 /dev/loop0

When I'm trying to decrypt this image in Mandriva 2006 Free whit this commands:
Code:

losetup -e twofish /dev/loop0 /mnt/sda4/enc.img
mount /dev/loop0 /mnt/enc

I get this error message:
Code:

mount: you must specify the filesystem type
loop, cryptoloop and twofish modules are loaded into kernel.
The kernel in Slackware is vanilla 2.6.14.2, and I use the original kernel in Mandriva.

Anyone can help me how to decrypt this image in Mandriva?

jailbait 11-19-2005 03:00 PM

"mount: you must specify the filesystem type"

You need to add the filesystem type to your mount command:

mount -t ext2 /dev/loop0 /mnt/enc

----------------------------
Steve Stites

nukkel 11-19-2005 03:09 PM

If you type the wrong password for losetup, you'll also get this error message...

big_ds 11-20-2005 04:18 AM

With mount -t ext2, I get this:

mount: wrong fs type, bad option, bad superblock on /dev/loop0,
missing codepage or other error
In some cases useful info is found in syslog - try
dmesg | tail or so

Password is correct.

nukkel 11-20-2005 04:38 AM

Maybe a filesystem check (e2fsck) can tell more?

big_ds 11-20-2005 05:04 AM

Code:

# e2fsck /dev/loop0
e2fsck 1.38 (30-Jun-2005)
Couldn't find ext2 superblock, trying backup blocks...
e2fsck: Bad magic number in super-block while trying to open /dev/loop0

The superblock could not be read or does not describe a correct ext2
filesystem.  If the device is valid and it really contains an ext2
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
    e2fsck -b 8193 <device>


nukkel 11-20-2005 06:46 AM

Does it work OK on the system you created the file on (slackware) ?

I'm running out of ideas here :(

big_ds 11-20-2005 07:29 AM

Yes, it woks fine on slackware.

big_ds 11-22-2005 03:12 AM

Is it possible, that I need a key to decrypt it?


All times are GMT -5. The time now is 05:15 AM.