From: Milan Broz <mbroz@redhat.com>
To: dm-crypt@saout.de
Subject: Re: [dm-crypt] Replacing cryptoloop with dm-crypt in Debian with twofish and offset
Date: Wed, 13 Apr 2011 15:57:37 +0200 [thread overview]
Message-ID: <4DA5ABD1.3030509@redhat.com> (raw)
In-Reply-To: <20110413132105.GB12090@tansi.org>
On 04/13/2011 03:21 PM, Arno Wagner wrote:
> Hi,
>
> one thing that I immediately see is that losetup
> specifies the offset in bytes, while cryptsetup uses
> sectors (of 512 bytes).
>
> Maybe try
>
> cryptsetup create -c twofish -o 5 testAB /dev/sdb1
yes, and there are many more options - because the losetup
exists in many versions, you need to check what exactly
it uses - then just setup parameters accordingly.
- note offset bytes vs sectors (see above)
- sometimes you need to set not only offset but also IV offset (to the same value)
- note encryption mode (probably you need "-c twofish-cbc-plain")
- key size (for 128 bits use "-s 128")
- hash algorithm for passphrase (perhaps ripemd160, maybe sha256)
Example (I am using loop-aes patched losetup here, so it may be quite different for you):
losetup-aes -e aes128 -o 2560 /dev/loop0 /dev/sdb
is equivalent to
cryptsetup create -o 5 --skip 5 -c aes-cbc-plain -s 128 -h sha256 <name> /dev/sdb
but as I said, it depends which losetup you are using, it is quite mess sometimes:-)
(and it cannot be autodetected easily...)
Milan
next prev parent reply other threads:[~2011-04-13 13:57 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-13 10:04 [dm-crypt] Replacing cryptoloop with dm-crypt in Debian with twofish and offset Admin bonnefoy.eu
2011-04-13 13:21 ` Arno Wagner
2011-04-13 13:57 ` Milan Broz [this message]
-- strict thread matches above, loose matches on Subject: below --
2011-04-14 14:00 Admin bonnefoy.eu
2011-04-14 16:48 ` Arno Wagner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4DA5ABD1.3030509@redhat.com \
--to=mbroz@redhat.com \
--cc=dm-crypt@saout.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox