public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Albert ARIBAUD <albert.u.boot@aribaud.net>
To: u-boot@lists.denx.de
Subject: [U-Boot] AES: Encryption of u-boot.img
Date: Sun, 15 Sep 2013 08:08:35 +0200	[thread overview]
Message-ID: <20130915080835.44798b38@lilith> (raw)
In-Reply-To: <523327D0.6050708@gmail.com>

Hi bin4ry,

On Fri, 13 Sep 2013 16:57:20 +0200, bin4ry <0xbin4ry@gmail.com> wrote:

> Hi everyone,
> 
> I want to implement a minimal secure boot architecture into u-boot by
> letting the u-boot.img be decrypted during SPL execution. Thus, the
> u-boot.img is present on the MMC in an encrypted version. I already
> implemented a basic AES-128 en-/decryption algorithm into the SPL.

What's the point of encrypting the whole binary? Secure boot usually
uses authentication, not encryption, of the payload that is to be
secured: instead of decrypting several hundreds of KBs, you hash them
(which is faster) and decrypt only the few hundreds bits of the
encrypted hash in order to compare both hashes (but trust chain remains
the same of course).

Note: if you chose payload encryption over authentication (hash
encryption) because you are worried about collision, preimage or even
second preimage resistance, then you should just go with use a stronger
hash function. Besides, for a small and compact payload such as a
bootloader, the risks of collisions are reduced because there is less
room in the input space.

Amicalement,
-- 
Albert.

  parent reply	other threads:[~2013-09-15  6:08 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-13  6:46 [U-Boot] [PATCH 1/4] powerpc/p1010rdb: remove unused cpld_show Shengzhou Liu
2013-09-13  6:46 ` [U-Boot] [PATCH 2/4] powerpc/eeprom: update MAX_NUM_PORTS to adapt non-256-bytes EEPROM Shengzhou Liu
2013-09-13 15:13   ` York Sun
2013-09-16  9:55     ` Liu Shengzhou-B36685
2013-09-13  6:46 ` [U-Boot] [PATCH 3/4] board/p1010rdb: add pin mux and sdhc support in any boot Shengzhou Liu
2013-09-13  6:46 ` [U-Boot] [PATCH 4/4] powerpc/p1010rdb: add p1010rdb-pb support with updating p1010rdb-pa Shengzhou Liu
2013-09-13 14:57   ` [U-Boot] AES: Encryption of u-boot.img bin4ry
2013-09-13 17:28     ` Michael Trimarchi
2013-09-30  7:28       ` bin4ry
2013-09-15  6:08     ` Albert ARIBAUD [this message]
2013-09-30  7:51       ` bin4ry
2013-10-05 10:03         ` Albert ARIBAUD

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=20130915080835.44798b38@lilith \
    --to=albert.u.boot@aribaud.net \
    --cc=u-boot@lists.denx.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox