From: Alban Bedel <alban.bedel-RM9K5IK7kjKj5M59NBduVrNAH6kLmebB@public.gmane.org>
To: Stephen Warren <swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
Cc: Alban Bedel
<alban.bedel-RM9K5IK7kjKj5M59NBduVrNAH6kLmebB@public.gmane.org>,
linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Allen Martin <amartin-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>,
Penny Chiu <pchiu-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
Subject: Re: [tegrarcm PATCH 0/2] Initial support for secured devices
Date: Wed, 11 Nov 2015 19:38:32 +0100 [thread overview]
Message-ID: <20151111193832.10bcad6e@avionic-0020> (raw)
In-Reply-To: <56437303.7090006-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 3205 bytes --]
On Wed, 11 Nov 2015 09:55:31 -0700
Stephen Warren <swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org> wrote:
> On 11/09/2015 10:19 AM, Alban Bedel wrote:
> > This series add the bare minimum to be able to use RCM on secured production
> > devices. For this the CMAC hash just has to be replaced with an RSA-PSS
> > signature, as CryptoPP already provides this algorith it is quiet trivial
> > to implement.
> >
> > Although RCM is now working this doesn't yet allow running the bootloader.
> > The miniloader works and it loads the BCT and bootloader, but the handsoff
> > to the bootloader isn't working yet. I currently suspect the miniloader as
> > the same bootloader works properly when it is flashed on a secured device
> > with the proper signature.
>
> CC += Allen, Penny - please see and comment on the patch series on the
> linux-tegra mailing list. Thanks.
>
> I'm rather hesitant to apply this before it's fully proved to be
> working, i.e. before you actually get the downloaded bootloader to work.
> This is simply because it seems likely the patches will need fixes to
> make them fully work.
I understand this, I mainly wanted to publish the serie. However the RCM
part is working as the miniloader works enough to at least be able to
download the BCT and bootloader.
> Some general questions:
>
> 1) I believe older chips only support only an SBK, whereas newer chips
> support both SBK and (RSA) PKC (or perhaps just PKC). I assume you're
> using a chip fused to enable PKC.
Yes, I only use PKC.
> Are you confident that your changes won't negatively impact a chip
> without either SBK or PKC enabled, or with an SBK enabled (well, I
> imagine that doesn't work right now anyway...).
As long as you don't give a key nothings changes.
> In particular, I wonder about the comment "above "the CMAC hash just
> has to be replaced"; I hope that doesn't impact SBK/non-security-enabled
> chips.
According to the Android BSP doc (Tegra BSP for Android Development
Guide, Security chapter) PKC always override SBK. If an SBK key is set
while in PKC mode it is only loaded in the AES engine, it is not used
to decrypt the bootloader.
> 2) I believe Tegra supports either/both of (a) validating the (BCT and)
> bootloader using the SBK/PKC and (b) encrypting the (BCT and) bootloader
> using the SBK/PKC.
PKC (aka public/private key) only allow signing and SBK (aka symmetric
keys) only allow encrypting.
> Do you know which options your chip is fused for?
I fused it for PKC.
> I wonder if the bootloader isn't running because the chip is expecting to
> decrypt it, yet you're supplying a non-encrypted binary, which of course
> gets corrupted during the decryption process?
I doubt it, first the chip can boot from the signed image I wrote on
the EMMC. Secondly the RCM communication is working, it query the
version and send the miniloader. Finally the miniloader is running as
the BCT and bootloader get downloaded via nv3p.
I currently suspect the miniloader, some steps (like setting the BCT)
might need to be done slightly differently. Or it leave the secure mode
too early, or ...
Alban
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
prev parent reply other threads:[~2015-11-11 18:38 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-09 17:19 [tegrarcm PATCH 0/2] Initial support for secured devices Alban Bedel
[not found] ` <1447089586-24826-1-git-send-email-alban.bedel-RM9K5IK7kjKj5M59NBduVrNAH6kLmebB@public.gmane.org>
2015-11-09 17:19 ` [tegrarcm PATCH 1/2] Remove the operational mode check Alban Bedel
[not found] ` <1447089586-24826-2-git-send-email-alban.bedel-RM9K5IK7kjKj5M59NBduVrNAH6kLmebB@public.gmane.org>
2015-11-11 17:07 ` Stephen Warren
2015-11-09 17:19 ` [tegrarcm PATCH 2/2] Add support for communicating with secured production devices Alban Bedel
[not found] ` <1447089586-24826-3-git-send-email-alban.bedel-RM9K5IK7kjKj5M59NBduVrNAH6kLmebB@public.gmane.org>
2015-11-11 17:25 ` Stephen Warren
[not found] ` <564379ED.4060503-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2015-11-11 18:04 ` Alban Bedel
2015-11-11 16:55 ` [tegrarcm PATCH 0/2] Initial support for secured devices Stephen Warren
[not found] ` <56437303.7090006-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2015-11-11 18:38 ` Alban Bedel [this message]
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=20151111193832.10bcad6e@avionic-0020 \
--to=alban.bedel-rm9k5ik7kjkj5m59nbduvrnah6klmebb@public.gmane.org \
--cc=amartin-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
--cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=pchiu-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
--cc=swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.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