linux-security-module.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sumit Garg <sumit.garg@linaro.org>
To: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Cc: Jens Wiklander <jens.wiklander@linaro.org>,
	dhowells@redhat.com, Jonathan Corbet <corbet@lwn.net>,
	jejb@linux.ibm.com, Mimi Zohar <zohar@linux.ibm.com>,
	James Morris <jmorris@namei.org>,
	"Serge E. Hallyn" <serge@hallyn.com>,
	Casey Schaufler <casey@schaufler-ca.com>,
	Ard Biesheuvel <ard.biesheuvel@linaro.org>,
	Daniel Thompson <daniel.thompson@linaro.org>,
	Stuart Yoder <stuart.yoder@arm.com>,
	Janne Karhunen <janne.karhunen@gmail.com>,
	"open list:ASYMMETRIC KEYS" <keyrings@vger.kernel.org>,
	linux-integrity@vger.kernel.org,
	linux-security-module@vger.kernel.org,
	Linux Doc Mailing List <linux-doc@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	linux-arm-kernel <linux-arm-kernel@lists.infradead.org>,
	"tee-dev @ lists . linaro . org" <tee-dev@lists.linaro.org>
Subject: Re: [Patch v3 6/7] doc: keys: Document usage of TEE based Trusted Keys
Date: Fri, 1 Nov 2019 15:04:18 +0530	[thread overview]
Message-ID: <CAFA6WYMkE928v-v76gGtWmsS0PwRp-OHUtkS0+Ts4V6x0AKBqQ@mail.gmail.com> (raw)
In-Reply-To: <20191031214745.GG10507@linux.intel.com>

On Fri, 1 Nov 2019 at 03:17, Jarkko Sakkinen
<jarkko.sakkinen@linux.intel.com> wrote:
>
> On Thu, Oct 31, 2019 at 07:28:42PM +0530, Sumit Garg wrote:
> > Provide documentation for usage of TEE based Trusted Keys via existing
> > user-space "keyctl" utility. Also, document various use-cases.
> >
> > Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
>
> This is the most important commit in order for someone who don't deal
> that much with ARM TEE to get right.
>

I agree that documentation needs to be updated and your following
comments seems to be somewhat similar to comments from Mimi here [1].

> Until this commit is right, I don't
> unfortunately have much to say about other commits.

Isn't this statement contradicting with your earlier statement
regarding the right order would be to complete TEE patches review
first and then come up with documentation here [2]?

[1] https://lore.kernel.org/linux-integrity/1568025601.4614.253.camel@linux.ibm.com/
[2] https://lore.kernel.org/linux-integrity/20190909163643.qxmzpcggi567hmhv@linux.intel.com/

> Instead of making disjoint islands, you should edit trusted-encrypted.rst
> so that it describes commonalities and differences.
>
> What the document currently describes is the usage model. It could be a
> section of its own. In that you should describe first the common
> parameters and separetely the backend specific parametrs.
>
> From kernel internals (there could be a section with this name)  the
> document describe the key generation e.g. is the hardware used and how
> it is used, is there salting with krng and so forth.

BTW, here is the info regarding RNG provided by OP-TEE (an open-source
TEE implementation).

It's either direct output from hardware based RNG (if platform
supports one) [3] or a software based Fortuna CSPRNG (executing in
trusted environment) [4] which is seeded via multiple entropy sources
as described here [5].

Overall, I think salting this with krng sounds reasonable to address
single RNG source concern. So I would suggest to have a common wrapper
API that would do salting of trust source (TPM or TEE) RNG output with
krng.

[3] https://github.com/OP-TEE/optee_os/blob/master/core/crypto/rng_hw.c
[4] https://github.com/OP-TEE/optee_os/blob/master/core/crypto/rng_fortuna.c
[5] https://github.com/OP-TEE/optee_os/blob/master/core/include/crypto/crypto.h#L272

-Sumit

>
> /Jarkko

  reply	other threads:[~2019-11-01  9:34 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-31 13:58 [Patch v3 0/7] Introduce TEE based Trusted Keys support Sumit Garg
2019-10-31 13:58 ` [Patch v3 1/7] tee: optee: allow kernel pages to register as shm Sumit Garg
2019-10-31 13:58 ` [Patch v3 2/7] tee: enable support to register kernel memory Sumit Garg
2019-10-31 13:58 ` [Patch v3 3/7] tee: add private login method for kernel clients Sumit Garg
2019-10-31 13:58 ` [Patch v3 4/7] KEYS: trusted: Add generic trusted keys framework Sumit Garg
2019-10-31 13:58 ` [Patch v3 5/7] KEYS: trusted: Introduce TEE based Trusted Keys Sumit Garg
2019-10-31 13:58 ` [Patch v3 6/7] doc: keys: Document usage of " Sumit Garg
2019-10-31 21:47   ` Jarkko Sakkinen
2019-11-01  9:34     ` Sumit Garg [this message]
2019-11-01 20:19       ` Jarkko Sakkinen
2019-11-04  6:58         ` Sumit Garg
2019-11-04 20:55           ` Jarkko Sakkinen
2019-10-31 13:58 ` [Patch v3 7/7] MAINTAINERS: Add entry for " Sumit Garg

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=CAFA6WYMkE928v-v76gGtWmsS0PwRp-OHUtkS0+Ts4V6x0AKBqQ@mail.gmail.com \
    --to=sumit.garg@linaro.org \
    --cc=ard.biesheuvel@linaro.org \
    --cc=casey@schaufler-ca.com \
    --cc=corbet@lwn.net \
    --cc=daniel.thompson@linaro.org \
    --cc=dhowells@redhat.com \
    --cc=janne.karhunen@gmail.com \
    --cc=jarkko.sakkinen@linux.intel.com \
    --cc=jejb@linux.ibm.com \
    --cc=jens.wiklander@linaro.org \
    --cc=jmorris@namei.org \
    --cc=keyrings@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-integrity@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=serge@hallyn.com \
    --cc=stuart.yoder@arm.com \
    --cc=tee-dev@lists.linaro.org \
    --cc=zohar@linux.ibm.com \
    /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;
as well as URLs for NNTP newsgroup(s).