From: Milan Broz <mbroz@redhat.com>
To: Jussi.Laako@nokia.com
Cc: dm-crypt@saout.de, Alexander.Valitov@digia.com, agk@redhat.com
Subject: Re: [dm-crypt] [PATCH] support OpenSSL's libcrypto and make libgcrypt optional
Date: Thu, 29 Jul 2010 14:01:52 +0200 [thread overview]
Message-ID: <4C516DB0.4030508@redhat.com> (raw)
In-Reply-To: <C875C5F4.1B612%jussi.laako@nokia.com>
On 07/28/2010 10:33 AM, Jussi.Laako@nokia.com wrote:
> In some embedded environments, like in some where MeeGo is used, it is
> needed to reduce number of packages with duplicate functionality in order to
> save flash space. Thus we have created a patch to add optional support for
> OpenSSL's libcrypto as well as make libgcrypt optional, making it possible
> to build cryptsetup in environments lacking either one. Or to support both,
> if that makes any sense.
Hi,
I intentionally removed plugin interface and [lib]cryptsetup now depends
on libgcrypt.
Well, since that decision I found some problems in gcrypt (which upstream
refused to fix) so seems there is now yet another reason to support more
crypto backends. (It should support gcrypt, nss, openssl at least).
But I do not want to use runtime plugin architecture but compile time
decision only.
So for you patch:
- seems you are reverting some configure options which are not needed,
I think it is enough to have someting like --with-crypto=[gcrypt,openssl,nss]
or so.
- setup_backend is not needed, it will always depend on device-mapper
(did I miss anything? it is not used even in your patch...just defined there)
- using #ifdef is not ideal, mainly in crypto code - it is easy to break
algorithm when using wrong defines. It need properly define crypto backend
callbacks and switch only its implementations. And include tests
(I have already PBKDF2 testvectors test, that should be used for all backends.)
- I think openssl backend function should not duplicate all the code
for every algorithm
- you added some "sync" calls to test - is it another problem?
(should not be needed at all)
- there is still hardcoded gcrypt logic on some places (including api-test),
so it still links to gcrypt, all regression tests must run with all supported
backends. Probably some basic list of must-have algorithms should be defined
for crypto backends. (e.g. I am using whirlpool hash for testing, not all crypto
backend support it currently.)
So, in general, I agree we should support more crypto backends.
Are you ok with supporting this in compile time only (so there is always
only one backend in compiled binaries - depends on distro preference)?
If so, I'll add this to my TODO list for next versions.
Thanks,
Milan
next prev parent reply other threads:[~2010-07-29 12:02 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-28 8:33 [dm-crypt] [PATCH] support OpenSSL's libcrypto and make libgcrypt optional Jussi.Laako
2010-07-29 12:01 ` Milan Broz [this message]
2010-07-29 12:27 ` Arno Wagner
2010-07-30 11:46 ` Valitov Alexander
2010-07-30 14:21 ` Jussi.Laako
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=4C516DB0.4030508@redhat.com \
--to=mbroz@redhat.com \
--cc=Alexander.Valitov@digia.com \
--cc=Jussi.Laako@nokia.com \
--cc=agk@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 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.