Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I've got an old hard disk, containing an encrypted partition with a file system on it. It was created (and used) several years ago, the way it was done back then was using losetup with the twofish encryption (via kernel module loop_fish2) and then mounting the loop device prepared this way.

Nowadays this is not possible out of the box anymore. The kernel module is not part of the distributions, etc.

Does anybody know a way how to achieve my goal?

EDIT:

I found some hints in this cryptsetup manpage to use it with the options --cipher twofish-cbc-null -s 256 -h sha512 but I get a rather surprising error message:

$ sudo cryptsetup --cipher twofish-cbc-null  -s  256 -h sha512 luksOpen /dev/sdd1 dm0
Usage: cryptsetup [-?vyrq] [-?|--help] [--usage] [--version] [-v|--verbose] [--debug]
    [-c|--cipher=STRING] [-h|--hash=STRING] [-y|--verify-passphrase] [-d|--key-file=STRING]
    [--master-key-file=STRING] [--dump-master-key] [-s|--key-size=BITS]
    [-l|--keyfile-size=bytes] [--new-keyfile-size=bytes] [-S|--key-slot=INT]
    [-b|--size=SECTORS] [-o|--offset=SECTORS] [-p|--skip=SECTORS] [-r|--readonly]
    [-i|--iter-time=msecs] [-q|--batch-mode] [-t|--timeout=secs] [-T|--tries=INT]
    [--align-payload=SECTORS] [--header-backup-file=STRING] [--use-random] [--use-urandom]
    [--shared] [--uuid=STRING] [--allow-discards] [--header=STRING]
    [OPTION...] <action> <action-specific>]
cryptsetup: Option --key-size is allowed only for luksFormat, create and loopaesOpen.
To limit read from keyfile use --keyfile-size=(bytes).

An explanation or workaround or any other help on that would also be appreciated :-}

share|improve this question
1  
Couldn't you just recreate what you used to encrypt it and then take the decrypted files and copy them over to the regular drive –  Griffin Mar 8 '13 at 22:35
    
That would mean to set up an old SuSE from around 2007 or so (I'm not sure anymore from when this was, could be some years more or less). That doesn't sound easy. I hoped to be able to mount that thing on a modern ubuntu. –  Alfe Mar 8 '13 at 22:50
    
The only way this would work is if you will to find a distro that supports this module or add the support yourself. –  Ramhound Mar 8 '13 at 23:40
    
I hope there is a workaround using cryptsetup (8) or the kernel module cryptoloop; documentation of those sometimes mention a support for an obsolete loop_fish2. –  Alfe Mar 8 '13 at 23:47

1 Answer 1

up vote 1 down vote accepted

I found a solution:

losetup /dev/loop1 /dev/sdb1 
cryptsetup --hash ripemd160:20 --cipher twofish-cbc-null --key-size 192 create secret_img /dev/loop1
mount /dev/mapper/secret_img /media/mountpoint

I reactivated an old laptop with Ubuntu 8.04 installed on which I solved this issue once, with the help of the Internet back then. Apparently the Internet did not keep the information on how to solve this long enough, so I was lucky to have that old hardware still up and running :) And the code still works on a current Ubuntu 12.04.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.