From: David Woodhouse <dwmw2@infradead.org>
To: David Howells <dhowells@redhat.com>,
Juerg Haefliger <juerg.haefliger@hpe.com>
Cc: linux-kernel@vger.kernel.org, keyrings@vger.kernel.org
Subject: Re: [PATCH v2] scripts/sign-file.c: Add support for signing with a raw signature
Date: Wed, 10 Feb 2016 10:25:13 +0000 [thread overview]
Message-ID: <1455099913.365.9.camel@infradead.org> (raw)
In-Reply-To: <7614.1455099176@warthog.procyon.org.uk>
[-- Attachment #1: Type: text/plain, Size: 0 bytes --]
[-- Attachment #2: Type: text/plain, Size: 1882 bytes --]
On Wed, 2016-02-10 at 10:12 +0000, David Howells wrote:
> Juerg Haefliger <juerg.haefliger@hpe.com> wrote:
>
> > This patch adds support for signing a kernel module with a raw
> > detached PKCS#7 signature/message.
> >
> > The signature is not converted and is simply appended to the module so
> > it needs to be in the right format. Using openssl, a valid signature can
> > be generated like this:
> > $ openssl smime -sign -nocerts -noattr -binary -in -inkey \
> > -signer -outform der -out
> >
> > The resulting raw signature from the above command is (more or less)
> > identical to the raw signature that sign-file itself can produce like
> > this:
> > $ scripts/sign-file -d
>
> What's the usage case for this? Can it be done instead with openssl PKCS#11?
Ah, right. That's what it was doing. Yeah, I have a vague recollection
of looking at this as we were doing the conversion to C, and concluding
that it was indeed a hackish workaround for the fact that the existing
setup didn't allow using external crypto devices via PKCS#11.
If you want to generate your signatures using external hardware, then
using sign-file with a PKCS#11 key definitely seems like the way to do
it. I believe I even tested it with the p11-kit remote mechanism, doing
the signing on a remote system over SSH.
There doesn't seem to be much of an excuse for doing otherwise on
security grounds — if this is the build system and you're going to
trust the modules which were built here, then copying them to separate
system and producing the signatures there is not really any different
to just allowing this system to invoke the signature-creation for
itself via PKCS#11, is it?
--
--
David Woodhouse Open Source Technology Centre
David.Woodhouse@intel.com Intel Corporation
[-- Attachment #3: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 5691 bytes --]
next prev parent reply other threads:[~2016-02-10 10:25 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-30 9:18 [PATCH] " Juerg Haefliger
2016-02-03 20:34 ` David Howells
2016-02-04 9:07 ` Juerg Haefliger
2016-02-04 10:42 ` David Howells
2016-02-03 20:45 ` David Howells
2016-02-04 11:09 ` [PATCH v2] " Juerg Haefliger
2016-02-09 16:44 ` David Howells
2016-02-10 10:12 ` David Howells
2016-02-10 10:25 ` David Woodhouse [this message]
2016-02-10 13:07 ` Juerg Haefliger
2016-02-10 13:24 ` Juerg Haefliger
2016-02-18 9:26 ` Juerg Haefliger
2016-02-18 17:23 ` David Howells
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=1455099913.365.9.camel@infradead.org \
--to=dwmw2@infradead.org \
--cc=dhowells@redhat.com \
--cc=juerg.haefliger@hpe.com \
--cc=keyrings@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/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
Powered by JetHome