From: Arno Wagner <arno@wagner.name>
To: dm-crypt@saout.de
Subject: Re: [dm-crypt] Key-Slot Checker Tool
Date: Sun, 9 Sep 2012 23:40:09 +0200 [thread overview]
Message-ID: <20120909214009.GA9465@tansi.org> (raw)
In-Reply-To: <20120909133512.GA27154@tansi.org>
On Sun, Sep 09, 2012 at 03:35:12PM +0200, Arno Wagner wrote:
> On Sun, Sep 09, 2012 at 10:27:44AM +0200, Milan Broz wrote:
[...]
> > (And the same random test perhaps should be in tests for large
> > enough blocks - see tests/differ.c, there is nice fixme :-)
>
> Will have a look.
Question for that, is the "R" option one random thing
replaced with another random thing? If so, I can fix
that test by XORing both and calculating entropy on the
result.
Will still require -lm for the log() though.
And an update on the 0.85 threshold: I have checked 10 Million
random 512B blocks and the sample entroy never went below 0.92.
For larger blocks the probability will be even lower. I think
0.85 is quite adequate as threshold.
However, the test in differ.c will probably need to go
back to a count of differing bits for blocks significantly
smaller than 512B or use a lower threshold. Is it used for
small blocks, e.g. keys?
Arno
> > I am just not sure introducing floating point in libcryptsetup
> > is good idea.
>
> While this can be done without, it is really hard. Basically
> you eiher need to simulate the logarithm in fixed-point integer
> or build up huffman tree as direct entropy estimator. Easiest way
> would probably be fixed-point and a 1000-entry table for the
> log().
>
> > But perhaps this can be compile time option,
> > if some ancient/embedded CPU/distro has problems here,
> > so it can be compiled-out.
>
> I like that idea much better.
>
> So, next step, make it use luks.h and put it in misc/ ?
>
> Arno
> --
> Arno Wagner, Dr. sc. techn., Dipl. Inform., Email: arno@wagner.name
> GnuPG: ID: 1E25338F FP: 0C30 5782 9D93 F785 E79C 0296 797F 6B50 1E25 338F
> ----
> 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
> _______________________________________________
> 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: 1E25338F FP: 0C30 5782 9D93 F785 E79C 0296 797F 6B50 1E25 338F
----
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
prev parent reply other threads:[~2012-09-09 21:40 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-09 0:41 [dm-crypt] Key-Slot Checker Tool Arno Wagner
2012-09-09 8:27 ` Milan Broz
2012-09-09 13:35 ` Arno Wagner
2012-09-09 21:40 ` Arno Wagner [this message]
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=20120909214009.GA9465@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.