All of lore.kernel.org
 help / color / mirror / Atom feed
From: bin4ry <0xbin4ry@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] AES: Encryption of u-boot.img
Date: Mon, 30 Sep 2013 09:51:54 +0200	[thread overview]
Message-ID: <52492D9A.3050503@gmail.com> (raw)
In-Reply-To: <20130915080835.44798b38@lilith>

Hi Albert,

so if I get you right the workflow for payload authentication is the
following:

Encryption process:

1. Create hash value H for u-boot.img
2. Encrypt the hash value H with secret K to get encrypted hash values H_enc
3. Store H_enc

Decryption process:

1. Read H_enc
2. Decrypt H_enc using secret K to get plain hash values H
3. Create Hash values H' of u-boot.img
4. Compare H and H'

Did I get you right?

Thanks and best regards,
-b

Am 15.09.2013 08:08, schrieb Albert ARIBAUD:
> 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,

  reply	other threads:[~2013-09-30  7:51 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
2013-09-30  7:51       ` bin4ry [this message]
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=52492D9A.3050503@gmail.com \
    --to=0xbin4ry@gmail.com \
    --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 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.