LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 11-19-2005, 01:34 PM   #1
big_ds
LQ Newbie
 
Registered: Nov 2005
Posts: 5

Rep: Reputation: 0
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?

Last edited by big_ds; 11-19-2005 at 01:43 PM.
 
Old 11-19-2005, 03:00 PM   #2
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,334

Rep: Reputation: 547Reputation: 547Reputation: 547Reputation: 547Reputation: 547Reputation: 547
"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
 
Old 11-19-2005, 03:09 PM   #3
nukkel
Member
 
Registered: Mar 2003
Location: Belgium
Distribution: Hardened gentoo
Posts: 323

Rep: Reputation: 30
If you type the wrong password for losetup, you'll also get this error message...
 
Old 11-20-2005, 04:18 AM   #4
big_ds
LQ Newbie
 
Registered: Nov 2005
Posts: 5

Original Poster
Rep: Reputation: 0
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.
 
Old 11-20-2005, 04:38 AM   #5
nukkel
Member
 
Registered: Mar 2003
Location: Belgium
Distribution: Hardened gentoo
Posts: 323

Rep: Reputation: 30
Maybe a filesystem check (e2fsck) can tell more?
 
Old 11-20-2005, 05:04 AM   #6
big_ds
LQ Newbie
 
Registered: Nov 2005
Posts: 5

Original Poster
Rep: Reputation: 0
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>
 
Old 11-20-2005, 06:46 AM   #7
nukkel
Member
 
Registered: Mar 2003
Location: Belgium
Distribution: Hardened gentoo
Posts: 323

Rep: Reputation: 30
Does it work OK on the system you created the file on (slackware) ?

I'm running out of ideas here
 
Old 11-20-2005, 07:29 AM   #8
big_ds
LQ Newbie
 
Registered: Nov 2005
Posts: 5

Original Poster
Rep: Reputation: 0
Yes, it woks fine on slackware.
 
Old 11-22-2005, 03:12 AM   #9
big_ds
LQ Newbie
 
Registered: Nov 2005
Posts: 5

Original Poster
Rep: Reputation: 0
Is it possible, that I need a key to decrypt it?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
perl problem? apache problem? cgi problem? WorldBuilder Linux - Software 1 09-17-2003 07:45 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 11:52 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration