From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-it0-f49.google.com ([209.85.214.49]:38886 "EHLO mail-it0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725841AbeG3FY1 (ORCPT ); Mon, 30 Jul 2018 01:24:27 -0400 Received: by mail-it0-f49.google.com with SMTP id v71-v6so14961655itb.3 for ; Sun, 29 Jul 2018 20:51:29 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <1532910912.4337.75.camel@linux.ibm.com> References: <1532910912.4337.75.camel@linux.ibm.com> From: rishi gupta Date: Mon, 30 Jul 2018 09:21:08 +0530 Message-ID: Subject: Re: How to generate and load evm-key in TPM less systems To: Mimi Zohar Cc: linux-integrity@vger.kernel.org, Dave Chinner , "Theodore Y. Ts'o" , zohar@linux.vnet.ibm.com, James Bottomley Content-Type: multipart/alternative; boundary="0000000000005cdcd505722f604e" Sender: linux-integrity-owner@vger.kernel.org List-ID:
Thanks Mimi for giving insight. Suppose I generate both master and evm-key (both are symmetric keys as per my understanding) and save them in trustzone protected area. Everytime kernel boots a driver reads these keys and loads in appropriate keyring. Will this be correct approach.

Because it is an existing product, TPM addition is almost impossible however I have requested team to consider including in next version of the product.



On Mon, Jul 30, 2018 at 6:05 AM, Mimi Zohar <zohar@linux.ibm.com> wrote:
[Cc'ing James Bottomley]

On Sun, 2018-07-29 at 23:46 +0530, rishi gupta wrote:
> Hi Integrity team,
>
> IMA is working fine in our embedded linux product and now we are trying to
> implement EVM. Our system does not have TPM but have trustzone and crypto
> engine. My question is:
>
> 1. What is the standard practice to generate and load evm-key in systems
> that does not have TPM.

TPMs are really cheap. Convince your product group to include a TPM?

"encrypted" keys can be decrypted either by a "trusted" or a "user"
type key, but the latter is not considered safe and should be limited
to test environments.

Udit Agarwal recently suggested defining a new key type named "secure"
keys, but didn't explain what made them secure. The "secure" key type
was limited to CAAM.

> 2. Suppose we have an encrypted key which has been decrypted and loaded in
> kernel. Isn't it an attacker can analyse RAM and get the evm-key. Am I
> missing something here.

No, what you're saying is true. In a secure, locked down environment
analyzing kernel memory (should still) requires root privileges.

Mimi


From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:32880 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728553AbeG3CHz (ORCPT ); Sun, 29 Jul 2018 22:07:55 -0400 Received: from pps.filterd (m0098404.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w6U0Y9hK056093 for ; Sun, 29 Jul 2018 20:35:29 -0400 Received: from e06smtp01.uk.ibm.com (e06smtp01.uk.ibm.com [195.75.94.97]) by mx0a-001b2d01.pphosted.com with ESMTP id 2khr5gr6db-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Sun, 29 Jul 2018 20:35:29 -0400 Received: from localhost by e06smtp01.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 30 Jul 2018 01:35:27 +0100 Subject: Re: How to generate and load evm-key in TPM less systems From: Mimi Zohar To: rishi gupta , linux-integrity@vger.kernel.org, Dave Chinner , "Theodore Y. Ts'o" , zohar@linux.vnet.ibm.com Cc: James Bottomley Date: Sun, 29 Jul 2018 20:35:12 -0400 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Message-Id: <1532910912.4337.75.camel@linux.ibm.com> Sender: linux-integrity-owner@vger.kernel.org List-ID: [Cc'ing James Bottomley] On Sun, 2018-07-29 at 23:46 +0530, rishi gupta wrote: > Hi Integrity team, > > IMA is working fine in our embedded linux product and now we are trying to > implement EVM. Our system does not have TPM but have trustzone and crypto > engine. My question is: > > 1. What is the standard practice to generate and load evm-key in systems > that does not have TPM. TPMs are really cheap. Convince your product group to include a TPM? "encrypted" keys can be decrypted either by a "trusted" or a "user" type key, but the latter is not considered safe and should be limited to test environments. Udit Agarwal recently suggested defining a new key type named "secure" keys, but didn't explain what made them secure. The "secure" key type was limited to CAAM. > 2. Suppose we have an encrypted key which has been decrypted and loaded in > kernel. Isn't it an attacker can analyse RAM and get the evm-key. Am I > missing something here. No, what you're saying is true. In a secure, locked down environment analyzing kernel memory (should still) requires root privileges. Mimi From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-it0-f46.google.com ([209.85.214.46]:37474 "EHLO mail-it0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726776AbeG2Trr (ORCPT ); Sun, 29 Jul 2018 15:47:47 -0400 Received: by mail-it0-f46.google.com with SMTP id h20-v6so13875754itf.2 for ; Sun, 29 Jul 2018 11:16:30 -0700 (PDT) MIME-Version: 1.0 From: rishi gupta Date: Sun, 29 Jul 2018 23:46:09 +0530 Message-ID: Subject: How to generate and load evm-key in TPM less systems To: linux-integrity@vger.kernel.org, Dave Chinner , "Theodore Y. Ts'o" , zohar@linux.vnet.ibm.com Content-Type: multipart/alternative; boundary="0000000000000ea3f00572275805" Sender: linux-integrity-owner@vger.kernel.org List-ID:
Hi Integrity team,

IMA is working fine in our embedded linux product and now we are trying to implement EVM. Our system does not have TPM but have trustzone and crypto engine. My question is:

1. What is the standard practice to generate and load evm-key in systems that does not have TPM.
2. Suppose we have an encrypted key which has been decrypted and loaded in kernel. Isn't it an attacker can analyse RAM and get the evm-key. Am I missing something here.

Regards,
Rishi