From: "Vladimir 'φ-coder/phcoder' Serbinenko" <phcoder@gmail.com>
To: grub-devel@gnu.org
Subject: Re: Signature verification in GRUB
Date: Thu, 18 Oct 2012 20:06:11 +0200 [thread overview]
Message-ID: <50804513.8010804@gmail.com> (raw)
In-Reply-To: <alpine.DEB.2.02.1210151408490.29940@salmon-of-wisdom.skyblue-technologies.com>
[-- Attachment #1: Type: text/plain, Size: 2559 bytes --]
On 15.10.2012 23:33, Geoffrey Thomas wrote:
> On Sat, 13 Oct 2012, Vladimir 'φ-coder/phcoder' Serbinenko wrote:
>
>>> First, does GRUB has a mechanism for me to validate a digitally-signed
>>> file of some sort? This could be e.g. a PGP-signed file or something
>>> from `openssl dgst -sign`. I see that GRUB has all the relevant crypto
>>> primitives to do this, but I can't find a command to invoke them. (As
>>> far as I can tell, gcrypt is only used for PBKDF2 and cryptodisk
>>> support?)
>>>
>>
>> I have some code dating from about a year ago but because of my current
>> personal situation it's put on hold for some time.
>
> Do you have something I can start from that you could drop somewhere? I
> haven't begun implementing this yet, and I suspect that starting from
> your code would be helpful for getting this done faster and also doing
> it in a style compatible with upstream.
>
I want to do it myself. I'm likely to get some time for it in December.
> Also, a slightly more generic question -- what's a reasonable format
> here? I'm kind of surprised to find that openssl has no generic command
> to sign a file or verify it's signatures. I could use PGP, but we're
> already using SSL-style certificates for Authenticode, so I'd prefer not
> generate another key with a completely different format. That said, if
> more people will find PGP verification useful, I can implement that.
>
It has to be gnupg signatures.
>> Is there some doc on dm-verify? It may be interesting.
>
> http://code.google.com/p/cryptsetup/wiki/DMVerity
> is the official documentation.
>
> Briefly, you generate a salted hash tree of each block (and in turn of
> the blocks containing the hashes) until you get a root hash. So with a
> trusted way to get the root hash, the original device, and a device/file
> containing the hashes, you can generate a new (read-only) device that
> validates hashes up to the root, and throws an IO error if the data has
> been tampered with.
>
Doesn't sound like best way. MAC-tree would be better cryptographically
(third party would be unable to verify, which is of advantage) and would
be easier to write to.
> The "veritysetup" command in sbin in recent cryptsetup versions can
> generate the hash tree and print out the root hash.
>
>
>
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel
--
Regards
Vladimir 'φ-coder/phcoder' Serbinenko
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 294 bytes --]
next prev parent reply other threads:[~2012-10-18 18:06 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-09 22:54 Signature verification in GRUB Geoffrey Thomas
2012-10-10 0:32 ` Chris Murphy
2012-10-10 1:14 ` Geoffrey Thomas
2012-10-10 18:33 ` Matthew Garrett
2012-10-10 19:07 ` Chris Murphy
2012-10-13 10:36 ` Vladimir 'φ-coder/phcoder' Serbinenko
2012-10-15 21:33 ` Geoffrey Thomas
2012-10-18 18:06 ` Vladimir 'φ-coder/phcoder' Serbinenko [this message]
2012-10-18 18:17 ` Geoffrey Thomas
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=50804513.8010804@gmail.com \
--to=phcoder@gmail.com \
--cc=grub-devel@gnu.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 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.