All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Alsenz <janalsenz@student.ethz.ch>
To: The development of GRUB 2 <grub-devel@gnu.org>
Subject: Re: GRUB hardened boot framework
Date: Sat, 28 Feb 2009 00:10:09 +0100	[thread overview]
Message-ID: <49A872D1.5010608@student.ethz.ch> (raw)
In-Reply-To: <49A86F7B.8030201@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1870 bytes --]

phcoder wrote:
>>
>> I'm no crypto expert, but I was under the impression that when the
>> data is
>> encrypted, measurement comes "for free": if someone tampered it, you'd be
>> unable to decrypt.  Is this correct?
>>
> It's not. Encryption is permutation
> E_{key,sector} (P) -> C
> Which permutes transforms plaintext P to ciphertext P. Without knowing
> the key an attacker still can reuse the values he has already seen (e.g.
> if he has an image of FS at previous date).
> He can also replace the sector with anything. He can't predict to what
> it will be decrypted but not to what it originally was
> Additionally most current modes subdivide sectors in 16-byte blocks. And
> how a block is encrypted depends on previous but not next blocks in
> sector. Then if attacker knows where the authentication is he can
> rewrite this place with anything. It will decrypt to garbage and with
> some quite high probability it won't crash and will let the attacker in.
> With XTS block encryptions depends neither on previous nor on next block
> . So attacker doesn't even need the authenthication code to be at the
> end of the sector.
> In various CBC modes if an attacker replaces sector A with sector B
> first block of sector B will decrypt to garbage but the rest will
> decrypt just fine. It can be used for e.g. launching printk to output
> the encryption keys.
> In conclusion encryption doesn't check for modifications. Some
> encryption systems do it additionally through separate mechanism but
> encryption itself does no such thing

If the code that does the authentication is loaded from the encrypted partition,
without being checked, this is true, but we assume, that core.img is already
loaded (and checked), so the authentication code is not on the encrypted
partition, and can detect any tampering.

Greets,

Jan


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

  parent reply	other threads:[~2009-02-27 23:12 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-22 13:27 GRUB trusted boot framework Jan Alsenz
2009-02-22 13:56 ` phcoder
2009-02-22 15:12   ` Jan Alsenz
2009-02-22 15:42     ` phcoder
2009-02-22 16:48       ` Jan Alsenz
2009-02-22 17:15         ` phcoder
2009-02-22 16:07 ` Vesa Jääskeläinen
2009-02-22 18:31   ` Jan Alsenz
2009-02-22 18:45     ` Vesa Jääskeläinen
2009-02-22 19:16       ` Jan Alsenz
2009-02-22 21:16         ` phcoder
2009-02-22 23:04           ` Jan Alsenz
2009-02-22 23:55             ` phcoder
2009-02-23  7:51               ` Jan Alsenz
2009-02-27 20:42 ` Robert Millan
2009-02-27 21:56   ` GRUB hardened " Jan Alsenz
2009-02-27 22:15     ` phcoder
2009-02-27 22:22     ` Robert Millan
2009-02-27 22:55       ` phcoder
2009-02-27 23:08         ` Robert Millan
2009-02-27 23:16           ` phcoder
2009-02-27 23:10         ` Jan Alsenz [this message]
2009-02-27 23:18           ` phcoder
2009-02-27 23:26             ` Robert Millan
2009-02-28  0:07               ` Jan Alsenz

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=49A872D1.5010608@student.ethz.ch \
    --to=janalsenz@student.ethz.ch \
    --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.