From: Arno Wagner <arno@wagner.name>
To: dm-crypt@saout.de
Subject: Re: [dm-crypt] --key-file size...
Date: Thu, 24 Jan 2013 16:42:51 +0100 [thread overview]
Message-ID: <20130124154251.GA13496@tansi.org> (raw)
In-Reply-To: <20130124133441.GA8986@li61-168.members.linode.com>
You are using plain dm-crypt (you really should use LUKS).
The man-page says this for key-files for plain mode:
"From a key file: It will be truncated to the key size of the used
cipher or the size given by -s and directly used as binary key. If
the key file is shorter than the key, cryptsetup will quit with an
error."
So nothing wrong.
Arno
On Thu, Jan 24, 2013 at 01:34:42PM +0000, Andrea wrote:
> Hi all,
> and thanks a lot for your work.
> I'm a happy user of cryptsetup.
> I need to store hospital data, and I would like to use a big key
> file.
> Well, I checked for compile limits (Ubuntu 12.10)
> $ cryptsetup --help|grep -i maximum
> Maximum keyfile size: 8192kB, Maximum interactive passphrase length 512 (characters)
>
> Anyway, if I check with the simple script under, it seems cryptsetup ignore
> everything where $size > 32.
>
> What I am doing wrong?
>
> Thanks a lot for your time,
> A.
>
> ------------
>
> #!/bin/bash
>
> fdloopback="/tmp/loopback.dd"
> fdkey="/tmp/key_master"
> fdkeytmp="/tmp/key"
> cryptname="keytest"
>
> dd if=/dev/zero of=$fdloopback bs=1G count=0 seek=1
> nettle-lfib-stream | dd of=$fdkey bs=1K count=8192 iflag=fullblock
>
> losetup /dev/loop0 $fdloopback
> cryptsetup create $cryptname /dev/loop0 --key-file $fdkey
> mkfs.ext4 -q /dev/mapper/$cryptname -F
> sync
> cryptsetup remove $cryptname
> losetup -d /dev/loop0
>
> for size in $(seq 2 2 8192)
> do
> dd if=$fdkey of=$fdkeytmp bs=1 count=$size
> losetup /dev/loop0 $fdloopback
> cryptsetup create $cryptname /dev/loop0 --key-file $fdkeytmp
> fsck /dev/mapper/$cryptname && echo "------> Good, " $size || echo "------> Bad, " $size
> sync
> cryptsetup remove $cryptname
> losetup -d /dev/loop0
> echo "Enter to go on";read trash
> done
> _______________________________________________
> dm-crypt mailing list
> dm-crypt@saout.de
> http://www.saout.de/mailman/listinfo/dm-crypt
--
Arno Wagner, Dr. sc. techn., Dipl. Inform., Email: arno@wagner.name
GnuPG: ID: CB5D9718 FP: 12D6 C03B 1B30 33BB 13CF B774 E35C 5FA1 CB5D 9718
----
One of the painful things about our time is that those who feel certainty
are stupid, and those with any imagination and understanding are filled
with doubt and indecision. -- Bertrand Russell
next prev parent reply other threads:[~2013-01-24 15:42 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-24 13:34 [dm-crypt] --key-file size Andrea
2013-01-24 15:42 ` Arno Wagner [this message]
2013-01-24 17:36 ` Andrea
2013-01-24 23:28 ` Matthias Schniedermeyer
2013-01-25 19:31 ` 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=20130124154251.GA13496@tansi.org \
--to=arno@wagner.name \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.