LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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
 
LinkBack Search this Thread
Old 09-12-2005, 06:33 AM   #1
tola555
LQ Newbie
 
Registered: Sep 2005
Posts: 20

Rep: Reputation: 0
Hdd decryption, password is known


Hi, I have encrypted my disk in suse 9.2 and now cant get it work in debian sarge.

I have copy of fstab, mtab, boot.crypto, cryptotab from suse.

I have to use loop_fish2 kernel module but I dont have it. Where I can get it?

###mtab
....
/dev/sda1 /mnt/m reiserfs rw,loop=/dev/loop1,encryption=twofish256,acl,user_xattr,commit=600 0 0
###

in fstab there is nothing about /dev/sda1

###cryptotab
/dev/loop0 /dev/hda7 /nii reiserfs twofish256 acl,user_xattr
/dev/loop1 /dev/sda1 /mnt/m reiserfs twofish256 acl,user_xattr
/dev/loop2 /dev/hda8 /mnt/dok reiserfs twofish256 acl,user_xattr
###

###boot.crypto
....
case "$crypto" in
twofish*) modprobe loop_fish2 ;;
esac
....
setprompt
losetup -t $TIMEOUT -e $crypto $loopdev $physdev < $REDIRECT > $REDIRECT 2>&1
unsetprompt
...
###
have found that suse 9.1 and 9.2 uses twofish256, 256 Bits key length and kernel module name is loop_fish2, Initialization vector (IV) is constant

How would it be debian way to get my disk work in debian? Firstly, I think I have to get loop_fish2 module but I cant find it. and why there is "< $REDIRECT > $REDIRECT 2>&1" in boot.crypto?

I have backup of that disc on cds so dont afraid to give your opinion

thanx

Last edited by tola555; 09-12-2005 at 07:52 AM.
 
Old 09-12-2005, 11:17 AM   #2
TruckStuff
Member
 
Registered: Apr 2002
Posts: 498

Rep: Reputation: 30
try
Code:
# modprobe loop_twofish
 
Old 09-12-2005, 11:52 AM   #3
tola555
LQ Newbie
 
Registered: Sep 2005
Posts: 20

Original Poster
Rep: Reputation: 0
Quote:
Originally posted by TruckStuff
try
Code:
# modprobe loop_twofish
# modprobe loop_twofish
FATAL: Module loop_twofish not found.


# modprobe loop_fish
FATAL: Module loop_fish not found.

# modprobe loop_fish2
FATAL: Module loop_fish2 not found.

have tried this already
 
Old 09-13-2005, 08:52 AM   #4
TruckStuff
Member
 
Registered: Apr 2002
Posts: 498

Rep: Reputation: 30
OK, you need to find out what the name of the module is on Deb. If Deb is like most other distros, all your kernel modules will be in /lib/modules/<kernel version>/kernel/. You can determine your kernel version by running
Code:
uname -r
at the command prompt. You can also do
Code:
cd /lib/modules/`uname -r`/kernel/
to get to the correct dir. Then start browsing through the modules to see which ones are available to you. Your cypto modules will likely be in /lib/modules/`uname -r`/kernel/crypto, but there may be some others in /lib/modules/`uname -r`/kernel/drivers/block or /lib/modules/`uname -r`/kernel/arch/i386/crypto. Module file names will end in .ko, so if you find a module you want to load, e.g. twofish.ko, simply do a
Code:
modprobe twofish
as root to load it.

If you cannot find the correct module, you will probably need to recompile a new kernel with the support for the neccesary modules.
 
Old 09-13-2005, 12:35 PM   #5
tola555
LQ Newbie
 
Registered: Sep 2005
Posts: 20

Original Poster
Rep: Reputation: 0
its not working
made that way:
#modprobe twofish
#modprobe cryptoloop <- just in case

added /dev/sda1 /mnt/m reiserfs rw,loop=/dev/loop0,encryption=twofish256,acl,user_xattr,commit=600 0 0 in mtab

#losetup -e twofish256 /dev/loop0 /dev/sda1
Password:

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

http://portal.suse.com/sdb/en/2005/0...system_93.html

found that in suse portal... I have to use 9.2 version, so its loop_fish2 not twofish:
SUSE Version Encryption Name Key Length Kernel Modules Initialization vector (IV)

Prior to 9.1 twofish 160 Bits loop_fish2 constant

9.1 and 9.2 twofish256 256 Bits loop_fish2 constant

9.3 twofish256 256 Bits twofish, cryptoloop block number

so, I cant find any loop_fish2 and if I did found does kernel accept it?
 
Old 09-14-2005, 08:57 AM   #6
TruckStuff
Member
 
Registered: Apr 2002
Posts: 498

Rep: Reputation: 30
OK, there is a lot that doesn't make sense here...
Quote:
added /dev/sda1 /mnt/m reiserfs rw,loop=/dev/loop0,encryption=twofish256,acl,user_xattr,commit=600 0 0 in mtab
Why are you editing /etc/mtab? That file is used by mount to know which file systems are currently mounted. You are forcing mount to believe that the FS is already mounted correctly, which it is not. Everything after that is completely irrelevant.

Next, post the output of
Code:
lsmod
run as root. That will tell you if the correct modules are loaded.
Quote:
found that in suse portal... I have to use 9.2 version, so its loop_fish2 not twofish:
OK, why are you using Suse as a source of information if you are trying to mount this volume and Debian??
 
Old 09-14-2005, 09:47 AM   #7
tola555
LQ Newbie
 
Registered: Sep 2005
Posts: 20

Original Poster
Rep: Reputation: 0
Quote:
added /dev/sda1 /mnt/m reiserfs rw,loop=/dev/loop0,encryption=twofish256,acl,user_xattr,commit=600 0 0 in mtab
It was in suse mtab, sorry, and I was looking in suse web because I encrypted that disc with suse 9.2. So I have to know what key length and Initialization vector I have to use. I think there is different types of them. Now I'm using debian sarge,

# uname -r
2.6.8-2-686
#modprobe twofish
# losetup -e twofish256 /dev/loop0 /dev/sda1
Password:
ioctl: LOOP_SET_STATUS: Invalid argument, requested cipher or key length (256 bits) not supported by kernel
# cat /proc/crypto
name : md5
module : kernel
type : digest
blocksize : 64
digestsize : 16

name : twofish
module : twofish
type : cipher
blocksize : 16
min keysize : 16
max keysize : 32

# lsmod
Module Size Used by
loop 16424 0
twofish 38720 0
nls_cp437 5696 0
isofs 37272 0
nvidia 3923228 12
ipv6 264740 8
parport_pc 36900 0
parport 41800 1 parport_pc
floppy 61200 0
pcspkr 3592 0
rtc 12760 0
eth1394 21576 0
8139cp 20672 0
ohci1394 35492 0
ieee1394 111512 2 eth1394,ohci1394
pciehp 99020 0
shpchp 101900 0
pci_hotplug 34640 2 pciehp,shpchp
intel_mch_agp 10608 0
intel_agp 22816 1
agpgart 34664 3 nvidia,intel_mch_agp,intel_agp
evdev 9600 0
mousedev 10476 1
tsdev 7392 0
ehci_hcd 32004 0
usbhid 32224 0
uhci_hcd 33136 0
usbcore 119012 5 ehci_hcd,usbhid,uhci_hcd
snd_ice1724 70916 7
snd_ice17xx_ak4xxx 4160 1 snd_ice1724
snd_ac97_codec 86428 1 snd_ice1724
snd_ak4114 9536 1 snd_ice1724
snd_pcm 94632 4 snd_ice1724,snd_ac97_codec,snd_ak4114
snd_timer 26116 3 snd_pcm
snd_page_alloc 10120 1 snd_pcm
snd_ak4xxx_adda 6528 2 snd_ice1724,snd_ice17xx_ak4xxx
snd_mpu401_uart 8096 1 snd_ice1724
snd_rawmidi 26304 1 snd_mpu401_uart
snd_seq_device 9004 1 snd_rawmidi
snd 58500 20 snd_ice1724,snd_ac97_codec,snd_ak4114,snd_pcm,snd_timer,snd_ak4xxx_adda,snd_mpu401_uart,snd_rawmidi, snd_seq_device
soundcore 10336 1 snd
tulip 47168 0
8139too 26112 0
mii 5120 2 8139cp,8139too
dm_mod 59804 0
capability 4520 0
commoncap 7232 1 capability
psmouse 20360 0
ide_cd 42656 0
cdrom 40732 1 ide_cd
reiserfs 250992 2
ext2 71880 0
ext3 127240 0
jbd 62616 1 ext3
mbcache 9348 2 ext2,ext3
ide_generic 1408 0
ide_disk 19296 4
piix 13440 1
ide_core 139940 4 ide_cd,ide_generic,ide_disk,piix
sd_mod 21728 0
ata_piix 8132 0
libata 41700 1 ata_piix
scsi_mod 125228 2 sd_mod,libata
unix 28756 471
font 8320 0
vesafb 6656 0
cfbcopyarea 3872 1 vesafb
cfbimgblt 3040 1 vesafb
cfbfillrect 3776 1 vesafb


# ls /lib/modules/`uname -r`/kernel/crypto
arc4.ko cast6.ko deflate.ko md4.ko sha1.ko tcrypt.ko
blowfish.ko crc32c.ko des.ko michael_mic.ko sha256.ko tea.ko
cast5.ko crypto_null.ko khazad.ko serpent.ko sha512.ko twofish.ko

# ls /lib/modules/`uname -r`/kernel/drivers/block
cciss.ko cryptoloop.ko floppy.ko nbd.ko sx8.ko xd.ko
cpqarray.ko DAC960.ko loop.ko paride umem.ko

# ls /lib/modules/`uname -r`/kernel/arch/i386/crypto
aes-i586.ko
 
Old 09-15-2005, 09:00 AM   #8
TruckStuff
Member
 
Registered: Apr 2002
Posts: 498

Rep: Reputation: 30
Quote:
Originally posted by tola555
# losetup -e twofish256 /dev/loop0 /dev/sda1
Password:
ioctl: LOOP_SET_STATUS: Invalid argument, requested cipher or key length (256 bits) not supported by kernel
Well there is your problem on Deb. Believe it or not, you kernel does not support the 256bit TwoFish cipher. As I said before, you either need to get the correct Deb package to do this, or you need to compile a custom kernel w/ support for this cipher.
 
Old 09-17-2005, 02:32 PM   #9
tola555
LQ Newbie
 
Registered: Sep 2005
Posts: 20

Original Poster
Rep: Reputation: 0
its supporting twofish256 and it works well, i didnt load cryptoloop at first.
but I was afraid that I have to use loop_fish2 and thats the way it is. It is written in suse link above. Now is the real problem - how to start loop_fish2 module in debian. There is something about loop_fish2 in /etc/modules.conf but I don't know how...
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
decryption Program ilnli Programming 9 08-04-2004 02:04 AM
passwd decryption in php questioner Programming 5 02-15-2004 10:35 PM
anyone good with decryption watashiwaotaku7 General 12 11-30-2003 01:42 AM
encyrption&decryption secprovider Programming 2 07-11-2003 10:57 PM
DVD Decryption Problems beforewisdom Linux - Software 2 05-19-2003 01:01 PM


All times are GMT -5. The time now is 06:38 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration