From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sumit Garg Date: Wed, 06 May 2020 09:52:16 +0000 Subject: [PATCH v4 3/4] doc: trusted-encrypted: updates with TEE as a new trust source Message-Id: <1588758017-30426-4-git-send-email-sumit.garg@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit List-Id: References: <1588758017-30426-1-git-send-email-sumit.garg@linaro.org> In-Reply-To: <1588758017-30426-1-git-send-email-sumit.garg@linaro.org> To: jarkko.sakkinen@linux.intel.com, zohar@linux.ibm.com, jejb@linux.ibm.com Cc: tee-dev@lists.linaro.org, daniel.thompson@linaro.org, Sumit Garg , op-tee@lists.trustedfirmware.org, corbet@lwn.net, janne.karhunen@gmail.com, linux-doc@vger.kernel.org, jmorris@namei.org, linux-kernel@vger.kernel.org, dhowells@redhat.com, linux-security-module@vger.kernel.org, keyrings@vger.kernel.org, Markus.Wamser@mixed-mode.de, casey@schaufler-ca.com, linux-integrity@vger.kernel.org, jens.wiklander@linaro.org, linux-arm-kernel@lists.infradead.org, serge@hallyn.com Update documentation for Trusted and Encrypted Keys with TEE as a new trust source. Following is brief description of updates: - Add a section to demostrate a list of supported devices along with their security properties/guarantees. - Add a key generation section. - Updates for usage section including differences specific to a trust source. Signed-off-by: Sumit Garg --- Documentation/security/keys/trusted-encrypted.rst | 203 ++++++++++++++++++---- 1 file changed, 171 insertions(+), 32 deletions(-) diff --git a/Documentation/security/keys/trusted-encrypted.rst b/Documentation/security/keys/trusted-encrypted.rst index 50ac8bc..4764a6d 100644 --- a/Documentation/security/keys/trusted-encrypted.rst +++ b/Documentation/security/keys/trusted-encrypted.rst @@ -6,30 +6,161 @@ Trusted and Encrypted Keys are two new key types added to the existing kernel key ring service. Both of these new types are variable length symmetric keys, and in both cases all keys are created in the kernel, and user space sees, stores, and loads only encrypted blobs. Trusted Keys require the availability -of a Trusted Platform Module (TPM) chip for greater security, while Encrypted -Keys can be used on any system. All user level blobs, are displayed and loaded -in hex ascii for convenience, and are integrity verified. +of a Trust Source for greater security, while Encrypted Keys can be used on any +system. All user level blobs, are displayed and loaded in hex ascii for +convenience, and are integrity verified. -Trusted Keys use a TPM both to generate and to seal the keys. Keys are sealed -under a 2048 bit RSA key in the TPM, and optionally sealed to specified PCR -(integrity measurement) values, and only unsealed by the TPM, if PCRs and blob -integrity verifications match. A loaded Trusted Key can be updated with new -(future) PCR values, so keys are easily migrated to new pcr values, such as -when the kernel and initramfs are updated. The same key can have many saved -blobs under different PCR values, so multiple boots are easily supported. -TPM 1.2 -------- +Trust Source +====== -By default, trusted keys are sealed under the SRK, which has the default -authorization value (20 zeros). This can be set at takeownership time with the -trouser's utility: "tpm_takeownership -u -z". +Trust Source provides the source of security for the Trusted Keys, on which +basis Trusted Keys establishes a Trust model with its user. A Trust Source could +differ from one system to another depending on its security requirements. It +could be either an off-chip device or an on-chip device. Following section +demostrates a list of supported devices along with their security properties/ +guarantees: -TPM 2.0 -------- + * Root of trust for storage -The user must first create a storage key and make it persistent, so the key is -available after reboot. This can be done using the following commands. + (1) TPM (Trusted Platform Module: hardware device) + + Rooted to Storage Root Key (SRK) which never leaves the TPM that + provides crypto operation to establish root of trust for storage. + + (2) TEE (Trusted Execution Environment: OP-TEE based on Arm TrustZone) + + Rooted to Hardware Unique Key (HUK) which is generally burnt in on-chip + fuses and is accessible to TEE only. + + * Execution isolation + + (1) TPM + + Fixed set of operations running in isolated execution environment. + + (2) TEE + + Customizable set of operations running in isolated execution + environment verified via Secure/Trusted boot process. + + * Optional binding to platform integrity state + + (1) TPM + + Keys can be optionally sealed to specified PCR (integrity measurement) + values, and only unsealed by the TPM, if PCRs and blob integrity + verifications match. A loaded Trusted Key can be updated with new + (future) PCR values, so keys are easily migrated to new PCR values, + such as when the kernel and initramfs are updated. The same key can + have many saved blobs under different PCR values, so multiple boots are + easily supported. + + (2) TEE + + Relies on Secure/Trusted boot process for platform integrity. It can + be extended with TEE based measured boot process. + + * On-chip versus off-chip + + (1) TPM + + Off-chip device connected via serial bus (like I2C, SPI etc.) exposing + physical access which represents an attack surface that can be + mitigated via tamper detection. + + (2) TEE + + On-chip functionality, immune to this attack surface. + + * Memory attacks (DRAM based like attaching a bus monitor etc.) + + (1) TPM + + Immune to these attacks as it doesn’t make use of system DRAM. + + (2) TEE + + An implementation based on TrustZone protected DRAM is susceptible to + such attacks. In order to mitigate these attacks one needs to rely on + on-chip secure RAM to store secrets or have the entire TEE + implementation based on on-chip secure RAM. An alternative mitigation + would be to use encrypted DRAM. + + * Side-channel attacks (cache, memory, CPU or time based) + + (1) TPM + + Immune to side-channel attacks as its resources are isolated from the + main OS. + + (2) TEE + + A careful implementation is required to mitigate against these attacks + for resources which are shared (eg. shared memory) with the main OS. + Cache and CPU based side-channel attacks can be mitigated via + invalidating caches and CPU registers during context switch to and from + the secure world. + To mitigate against time based attacks, one needs to have time + invariant implementations (like crypto algorithms etc.). + + * Resistance to physical attacks (power analysis, electromagnetic emanation, + probes etc.) + + (1) TPM + + Provides limited protection utilizing tamper resistance. + + (2) TEE + + Provides no protection by itself, relies on the underlying platform for + features such as tamper resistance. + + +Key Generation +======= + +Trusted Keys +------------ + +New keys are created from trust source generated random numbers, and are +encrypted/decrypted using trust source storage root key. + + * TPM (hardware device) based RNG + + Strength of random numbers may vary from one device manufacturer to + another. + + * TEE (OP-TEE based on Arm TrustZone) based RNG + + RNG is customizable as per platform needs. It can either be direct output + from platform specific hardware RNG or a software based Fortuna CSPRNG + which can be seeded via multiple entropy sources. + +Encrypted Keys +-------------- + +Encrypted keys do not depend on a trust source, and are faster, as they use AES +for encryption/decryption. New keys are created from kernel generated random +numbers, and are encrypted/decrypted using a specified ‘master’ key. The +‘master’ key can either be a trusted-key or user-key type. The main disadvantage +of encrypted keys is that if they are not rooted in a trusted key, they are only +as secure as the user key encrypting them. The master user key should therefore +be loaded in as secure a way as possible, preferably early in boot. + + +Usage +==+ +Trusted Keys usage: TPM +----------------------- + +TPM 1.2: By default, trusted keys are sealed under the SRK, which has the +default authorization value (20 zeros). This can be set at takeownership time +with the TrouSerS utility: "tpm_takeownership -u -z". + +TPM 2.0: The user must first create a storage key and make it persistent, so the +key is available after reboot. This can be done using the following commands. With the IBM TSS 2 stack:: @@ -79,14 +210,21 @@ TPM_STORED_DATA format. The key length for new keys are always in bytes. Trusted Keys can be 32 - 128 bytes (256 - 1024 bits), the upper limit is to fit within the 2048 bit SRK (RSA) keylength, with all necessary structure/padding. -Encrypted keys do not depend on a TPM, and are faster, as they use AES for -encryption/decryption. New keys are created from kernel generated random -numbers, and are encrypted/decrypted using a specified 'master' key. The -'master' key can either be a trusted-key or user-key type. The main -disadvantage of encrypted keys is that if they are not rooted in a trusted key, -they are only as secure as the user key encrypting them. The master user key -should therefore be loaded in as secure a way as possible, preferably early in -boot. +Trusted Keys usage: TEE +----------------------- + +Usage:: + + keyctl add trusted name "new keylen" ring + keyctl add trusted name "load hex_blob" ring + keyctl print keyid + +"keyctl print" returns an ascii hex copy of the sealed key, which is in format +specific to TEE device implementation. The key length for new keys are always +in bytes. Trusted Keys can be 32 - 128 bytes (256 - 1024 bits). + +Encrypted Keys usage +-------------------- The decrypted portion of encrypted keys can contain either a simple symmetric key or a more complex structure. The format of the more complex structure is @@ -104,8 +242,8 @@ Where:: format:= 'default | ecryptfs | enc32' key-type:= 'trusted' | 'user' - Examples of trusted and encrypted key usage: +-------------------------------------------- Create and save a trusted key named "kmk" of length 32 bytes. @@ -151,7 +289,7 @@ Load a trusted key from the saved blob:: f1f8fff03ad0acb083725535636addb08d73dedb9832da198081e5deae84bfaf0409c22b e4a8aea2b607ec96931e6f4d4fe563ba -Reseal a trusted key under new pcr values:: +Reseal (TPM specific) a trusted key under new PCR values:: $ keyctl update 268728824 "update pcrinfo=`cat pcr.blob`" $ keyctl print 268728824 @@ -165,11 +303,12 @@ Reseal a trusted key under new pcr values:: 7ef6a24defe4846104209bf0c3eced7fa1a672ed5b125fc9d8cd88b476a658a4434644ef df8ae9a178e9f83ba9f08d10fa47e4226b98b0702f06b3b8 + The initial consumer of trusted keys is EVM, which at boot time needs a high -quality symmetric key for HMAC protection of file metadata. The use of a +quality symmetric key for HMAC protection of file metadata. The use of a trusted key provides strong guarantees that the EVM key has not been -compromised by a user level problem, and when sealed to specific boot PCR -values, protects against boot and offline attacks. Create and save an +compromised by a user level problem, and when sealed to a platform integrity +state, protects against boot and offline attacks. Create and save an encrypted key "evm" using the above trusted key "kmk": option 1: omitting 'format':: -- 2.7.4 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 63449C4725E for ; Wed, 6 May 2020 09:41:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3E0F42075E for ; Wed, 6 May 2020 09:41:26 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="Tqs/yGb/" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729192AbgEFJlZ (ORCPT ); Wed, 6 May 2020 05:41:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33188 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1729072AbgEFJlY (ORCPT ); Wed, 6 May 2020 05:41:24 -0400 Received: from mail-pl1-x643.google.com (mail-pl1-x643.google.com [IPv6:2607:f8b0:4864:20::643]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2C383C061A10 for ; Wed, 6 May 2020 02:41:23 -0700 (PDT) Received: by mail-pl1-x643.google.com with SMTP id t16so260584plo.7 for ; Wed, 06 May 2020 02:41:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=SlXuatNEebWvbmP7CKvAyoHRGK5SXnJzIr6kq4voDlQ=; b=Tqs/yGb/eL0VSifFGk/ngdQDPkJpIA8MkpRoLRtgxuAIFNN87JAiEBFhk033MO0ieu fN2HkGG/rwSqeF7HAFkuyhb5LxrsSaOsQ7PPqN+ZmJlqvf9PxPozaob3NZ8RmFdgDFbP NGfAZqcSVeXz+MCGw/AJdzl0/9pW6olPEh1zQoeDwu8/tG51an0qOQTkBPGrQ0cwOihW a0ZxZj1WVqKramj1XaTmwNbgR3WPEPK4SqFt/PUrh6HLpkEDva+MRkzNGUi1i/u2135J SVqSoVMHRqmEb/xmJ3rSDNY9aFM2/tp9P3if50Au3hH0t0MmHMUsaPX3ALmOupHVd7/a r2qw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=SlXuatNEebWvbmP7CKvAyoHRGK5SXnJzIr6kq4voDlQ=; b=LoXjZYztb/sUg6+MmrtZlC93EfBjAv4jbxWbMFtmK/NSg2svInTWnPiCTIVyNSOHGx fAZ9vXSr01+Hnmcf1Mbl7UZKaRIakOV6hi47lBUCBLx40Nag05w4G2sLY5L9XXLH9xc6 XH5wt6hbBL1DliUk3psAePz7EWvL0SuxFemNLsTAYm7dj63xCMk59zAjhZvgKAj+TSSw 8p/bK1FCh0x3//+qCWC2sc+BIbUNvheCubUiMYGjMgbSY7ixmktBjgAjUgH5i+XtbO4/ JM1DrFYkr/9iD4Iujbf2tlv3788PCLZxVV4Z26wCS4mOx+RXxlmQpgqab4rZiJOcGexP L4dw== X-Gm-Message-State: AGi0PuayNGL8khsj2B+ZQS3Gmhi3qGsdML3bUexz7cpWIATa3vKHGNJL q49lqiJNl9ptqyTdpY/ZqGv76g== X-Google-Smtp-Source: APiQypIGUY9ehi5r6OOjFpQ4c6AIKsFBEyc2pS42FuTYpDDF0UGGkcxjiiaUJtAiAjyMKrUGRuQXBQ== X-Received: by 2002:a17:902:56c:: with SMTP id 99mr7095466plf.124.1588758082507; Wed, 06 May 2020 02:41:22 -0700 (PDT) Received: from localhost.localdomain ([117.252.68.141]) by smtp.gmail.com with ESMTPSA id a2sm1337360pfg.106.2020.05.06.02.41.13 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 06 May 2020 02:41:21 -0700 (PDT) From: Sumit Garg To: jarkko.sakkinen@linux.intel.com, zohar@linux.ibm.com, jejb@linux.ibm.com Cc: dhowells@redhat.com, jens.wiklander@linaro.org, corbet@lwn.net, jmorris@namei.org, serge@hallyn.com, casey@schaufler-ca.com, janne.karhunen@gmail.com, daniel.thompson@linaro.org, Markus.Wamser@mixed-mode.de, keyrings@vger.kernel.org, linux-integrity@vger.kernel.org, linux-security-module@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, op-tee@lists.trustedfirmware.org, tee-dev@lists.linaro.org, Sumit Garg Subject: [PATCH v4 3/4] doc: trusted-encrypted: updates with TEE as a new trust source Date: Wed, 6 May 2020 15:10:16 +0530 Message-Id: <1588758017-30426-4-git-send-email-sumit.garg@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1588758017-30426-1-git-send-email-sumit.garg@linaro.org> References: <1588758017-30426-1-git-send-email-sumit.garg@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Update documentation for Trusted and Encrypted Keys with TEE as a new trust source. Following is brief description of updates: - Add a section to demostrate a list of supported devices along with their security properties/guarantees. - Add a key generation section. - Updates for usage section including differences specific to a trust source. Signed-off-by: Sumit Garg --- Documentation/security/keys/trusted-encrypted.rst | 203 ++++++++++++++++++---- 1 file changed, 171 insertions(+), 32 deletions(-) diff --git a/Documentation/security/keys/trusted-encrypted.rst b/Documentation/security/keys/trusted-encrypted.rst index 50ac8bc..4764a6d 100644 --- a/Documentation/security/keys/trusted-encrypted.rst +++ b/Documentation/security/keys/trusted-encrypted.rst @@ -6,30 +6,161 @@ Trusted and Encrypted Keys are two new key types added to the existing kernel key ring service. Both of these new types are variable length symmetric keys, and in both cases all keys are created in the kernel, and user space sees, stores, and loads only encrypted blobs. Trusted Keys require the availability -of a Trusted Platform Module (TPM) chip for greater security, while Encrypted -Keys can be used on any system. All user level blobs, are displayed and loaded -in hex ascii for convenience, and are integrity verified. +of a Trust Source for greater security, while Encrypted Keys can be used on any +system. All user level blobs, are displayed and loaded in hex ascii for +convenience, and are integrity verified. -Trusted Keys use a TPM both to generate and to seal the keys. Keys are sealed -under a 2048 bit RSA key in the TPM, and optionally sealed to specified PCR -(integrity measurement) values, and only unsealed by the TPM, if PCRs and blob -integrity verifications match. A loaded Trusted Key can be updated with new -(future) PCR values, so keys are easily migrated to new pcr values, such as -when the kernel and initramfs are updated. The same key can have many saved -blobs under different PCR values, so multiple boots are easily supported. -TPM 1.2 -------- +Trust Source +============ -By default, trusted keys are sealed under the SRK, which has the default -authorization value (20 zeros). This can be set at takeownership time with the -trouser's utility: "tpm_takeownership -u -z". +Trust Source provides the source of security for the Trusted Keys, on which +basis Trusted Keys establishes a Trust model with its user. A Trust Source could +differ from one system to another depending on its security requirements. It +could be either an off-chip device or an on-chip device. Following section +demostrates a list of supported devices along with their security properties/ +guarantees: -TPM 2.0 -------- + * Root of trust for storage -The user must first create a storage key and make it persistent, so the key is -available after reboot. This can be done using the following commands. + (1) TPM (Trusted Platform Module: hardware device) + + Rooted to Storage Root Key (SRK) which never leaves the TPM that + provides crypto operation to establish root of trust for storage. + + (2) TEE (Trusted Execution Environment: OP-TEE based on Arm TrustZone) + + Rooted to Hardware Unique Key (HUK) which is generally burnt in on-chip + fuses and is accessible to TEE only. + + * Execution isolation + + (1) TPM + + Fixed set of operations running in isolated execution environment. + + (2) TEE + + Customizable set of operations running in isolated execution + environment verified via Secure/Trusted boot process. + + * Optional binding to platform integrity state + + (1) TPM + + Keys can be optionally sealed to specified PCR (integrity measurement) + values, and only unsealed by the TPM, if PCRs and blob integrity + verifications match. A loaded Trusted Key can be updated with new + (future) PCR values, so keys are easily migrated to new PCR values, + such as when the kernel and initramfs are updated. The same key can + have many saved blobs under different PCR values, so multiple boots are + easily supported. + + (2) TEE + + Relies on Secure/Trusted boot process for platform integrity. It can + be extended with TEE based measured boot process. + + * On-chip versus off-chip + + (1) TPM + + Off-chip device connected via serial bus (like I2C, SPI etc.) exposing + physical access which represents an attack surface that can be + mitigated via tamper detection. + + (2) TEE + + On-chip functionality, immune to this attack surface. + + * Memory attacks (DRAM based like attaching a bus monitor etc.) + + (1) TPM + + Immune to these attacks as it doesn’t make use of system DRAM. + + (2) TEE + + An implementation based on TrustZone protected DRAM is susceptible to + such attacks. In order to mitigate these attacks one needs to rely on + on-chip secure RAM to store secrets or have the entire TEE + implementation based on on-chip secure RAM. An alternative mitigation + would be to use encrypted DRAM. + + * Side-channel attacks (cache, memory, CPU or time based) + + (1) TPM + + Immune to side-channel attacks as its resources are isolated from the + main OS. + + (2) TEE + + A careful implementation is required to mitigate against these attacks + for resources which are shared (eg. shared memory) with the main OS. + Cache and CPU based side-channel attacks can be mitigated via + invalidating caches and CPU registers during context switch to and from + the secure world. + To mitigate against time based attacks, one needs to have time + invariant implementations (like crypto algorithms etc.). + + * Resistance to physical attacks (power analysis, electromagnetic emanation, + probes etc.) + + (1) TPM + + Provides limited protection utilizing tamper resistance. + + (2) TEE + + Provides no protection by itself, relies on the underlying platform for + features such as tamper resistance. + + +Key Generation +============== + +Trusted Keys +------------ + +New keys are created from trust source generated random numbers, and are +encrypted/decrypted using trust source storage root key. + + * TPM (hardware device) based RNG + + Strength of random numbers may vary from one device manufacturer to + another. + + * TEE (OP-TEE based on Arm TrustZone) based RNG + + RNG is customizable as per platform needs. It can either be direct output + from platform specific hardware RNG or a software based Fortuna CSPRNG + which can be seeded via multiple entropy sources. + +Encrypted Keys +-------------- + +Encrypted keys do not depend on a trust source, and are faster, as they use AES +for encryption/decryption. New keys are created from kernel generated random +numbers, and are encrypted/decrypted using a specified ‘master’ key. The +‘master’ key can either be a trusted-key or user-key type. The main disadvantage +of encrypted keys is that if they are not rooted in a trusted key, they are only +as secure as the user key encrypting them. The master user key should therefore +be loaded in as secure a way as possible, preferably early in boot. + + +Usage +===== + +Trusted Keys usage: TPM +----------------------- + +TPM 1.2: By default, trusted keys are sealed under the SRK, which has the +default authorization value (20 zeros). This can be set at takeownership time +with the TrouSerS utility: "tpm_takeownership -u -z". + +TPM 2.0: The user must first create a storage key and make it persistent, so the +key is available after reboot. This can be done using the following commands. With the IBM TSS 2 stack:: @@ -79,14 +210,21 @@ TPM_STORED_DATA format. The key length for new keys are always in bytes. Trusted Keys can be 32 - 128 bytes (256 - 1024 bits), the upper limit is to fit within the 2048 bit SRK (RSA) keylength, with all necessary structure/padding. -Encrypted keys do not depend on a TPM, and are faster, as they use AES for -encryption/decryption. New keys are created from kernel generated random -numbers, and are encrypted/decrypted using a specified 'master' key. The -'master' key can either be a trusted-key or user-key type. The main -disadvantage of encrypted keys is that if they are not rooted in a trusted key, -they are only as secure as the user key encrypting them. The master user key -should therefore be loaded in as secure a way as possible, preferably early in -boot. +Trusted Keys usage: TEE +----------------------- + +Usage:: + + keyctl add trusted name "new keylen" ring + keyctl add trusted name "load hex_blob" ring + keyctl print keyid + +"keyctl print" returns an ascii hex copy of the sealed key, which is in format +specific to TEE device implementation. The key length for new keys are always +in bytes. Trusted Keys can be 32 - 128 bytes (256 - 1024 bits). + +Encrypted Keys usage +-------------------- The decrypted portion of encrypted keys can contain either a simple symmetric key or a more complex structure. The format of the more complex structure is @@ -104,8 +242,8 @@ Where:: format:= 'default | ecryptfs | enc32' key-type:= 'trusted' | 'user' - Examples of trusted and encrypted key usage: +-------------------------------------------- Create and save a trusted key named "kmk" of length 32 bytes. @@ -151,7 +289,7 @@ Load a trusted key from the saved blob:: f1f8fff03ad0acb083725535636addb08d73dedb9832da198081e5deae84bfaf0409c22b e4a8aea2b607ec96931e6f4d4fe563ba -Reseal a trusted key under new pcr values:: +Reseal (TPM specific) a trusted key under new PCR values:: $ keyctl update 268728824 "update pcrinfo=`cat pcr.blob`" $ keyctl print 268728824 @@ -165,11 +303,12 @@ Reseal a trusted key under new pcr values:: 7ef6a24defe4846104209bf0c3eced7fa1a672ed5b125fc9d8cd88b476a658a4434644ef df8ae9a178e9f83ba9f08d10fa47e4226b98b0702f06b3b8 + The initial consumer of trusted keys is EVM, which at boot time needs a high -quality symmetric key for HMAC protection of file metadata. The use of a +quality symmetric key for HMAC protection of file metadata. The use of a trusted key provides strong guarantees that the EVM key has not been -compromised by a user level problem, and when sealed to specific boot PCR -values, protects against boot and offline attacks. Create and save an +compromised by a user level problem, and when sealed to a platform integrity +state, protects against boot and offline attacks. Create and save an encrypted key "evm" using the above trusted key "kmk": option 1: omitting 'format':: -- 2.7.4 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DB2B9C4725E for ; Wed, 6 May 2020 09:42:12 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A77672082E for ; Wed, 6 May 2020 09:42:12 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="I5IyXwU6"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="Tqs/yGb/" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A77672082E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=f57psZmgn87jEqD02Sb01u3N6akPu8YKWvA8gsXBIqw=; b=I5IyXwU6jksg/Q HwyJ0boO1KcrKEDUUGEhDKR6mgbCTjFOrcTh03VsCABQ5tgQsGislDHjbFwnLHiYnFVD6xj6H69rc 9X1wvBMFXFjFmya2/1ZM8coPlAIywkqaN7Nqn2m7Ict897fL6p8Kpl1IXK1+CXEQL3kQe8V8WCFAo ha0foW2JStW1gJjXhQQUWDtFug193wiWXv7Pkgpfjdc4kgn3G0+FS5IoozE+Art7vVG2AjZohixQH hZoZlupl6EWa1TtKKDwBo98rOJhE9pAUYTtShqfHnB4YXEEn+qjJzWHeoWeNX0ffG0/7vOM3eb9e+ xq++i4CbH+tFh+qareVQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jWGZ9-0005JT-QX; Wed, 06 May 2020 09:42:11 +0000 Received: from mail-pl1-x644.google.com ([2607:f8b0:4864:20::644]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jWGYN-0004c7-D7 for linux-arm-kernel@lists.infradead.org; Wed, 06 May 2020 09:41:26 +0000 Received: by mail-pl1-x644.google.com with SMTP id m7so264551plt.5 for ; Wed, 06 May 2020 02:41:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=SlXuatNEebWvbmP7CKvAyoHRGK5SXnJzIr6kq4voDlQ=; b=Tqs/yGb/eL0VSifFGk/ngdQDPkJpIA8MkpRoLRtgxuAIFNN87JAiEBFhk033MO0ieu fN2HkGG/rwSqeF7HAFkuyhb5LxrsSaOsQ7PPqN+ZmJlqvf9PxPozaob3NZ8RmFdgDFbP NGfAZqcSVeXz+MCGw/AJdzl0/9pW6olPEh1zQoeDwu8/tG51an0qOQTkBPGrQ0cwOihW a0ZxZj1WVqKramj1XaTmwNbgR3WPEPK4SqFt/PUrh6HLpkEDva+MRkzNGUi1i/u2135J SVqSoVMHRqmEb/xmJ3rSDNY9aFM2/tp9P3if50Au3hH0t0MmHMUsaPX3ALmOupHVd7/a r2qw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=SlXuatNEebWvbmP7CKvAyoHRGK5SXnJzIr6kq4voDlQ=; b=FTw9e1GzjHR4GjZbfkYohglAuhO7resPOhlUWZSqhxRdQUSpB3YhWitpbnMP0orQs1 tjglrqB2TZBiR6UNnEvQvfp72YHyHkUfAjLMa/fMbcC/QgtYkdvuDJzs9t7Edtql6zDk yv5/bxzu01DsW+mj0sRwiss86n+1XDp+wKZmRcAnhQaKPqBfir1ZUIoJ9syA4mwvs0ZA 7pAEMI1/ywaDH7pCIUVoyS3iz6+atIH702W3Jm4fybXKIiLsgHl66wzk6twkUFQ3gdY4 t5G61wRu3m+YuQpiJSlnIC6tw266cwrW/jlfqUMFA9+u2I8WmWn6DTo07D5Y0uIMmrD7 edsQ== X-Gm-Message-State: AGi0PuYVlD++i5f7jMnhhuXmOettdTBZ2KfBNgJQYiood7EDGQ3rdDzF hjTMYpzC9yQCbt0YG83V67MQwQ== X-Google-Smtp-Source: APiQypIGUY9ehi5r6OOjFpQ4c6AIKsFBEyc2pS42FuTYpDDF0UGGkcxjiiaUJtAiAjyMKrUGRuQXBQ== X-Received: by 2002:a17:902:56c:: with SMTP id 99mr7095466plf.124.1588758082507; Wed, 06 May 2020 02:41:22 -0700 (PDT) Received: from localhost.localdomain ([117.252.68.141]) by smtp.gmail.com with ESMTPSA id a2sm1337360pfg.106.2020.05.06.02.41.13 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 06 May 2020 02:41:21 -0700 (PDT) From: Sumit Garg To: jarkko.sakkinen@linux.intel.com, zohar@linux.ibm.com, jejb@linux.ibm.com Subject: [PATCH v4 3/4] doc: trusted-encrypted: updates with TEE as a new trust source Date: Wed, 6 May 2020 15:10:16 +0530 Message-Id: <1588758017-30426-4-git-send-email-sumit.garg@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1588758017-30426-1-git-send-email-sumit.garg@linaro.org> References: <1588758017-30426-1-git-send-email-sumit.garg@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200506_024123_539885_8849759B X-CRM114-Status: GOOD ( 20.60 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: tee-dev@lists.linaro.org, daniel.thompson@linaro.org, Sumit Garg , op-tee@lists.trustedfirmware.org, corbet@lwn.net, janne.karhunen@gmail.com, linux-doc@vger.kernel.org, jmorris@namei.org, linux-kernel@vger.kernel.org, dhowells@redhat.com, linux-security-module@vger.kernel.org, keyrings@vger.kernel.org, Markus.Wamser@mixed-mode.de, casey@schaufler-ca.com, linux-integrity@vger.kernel.org, jens.wiklander@linaro.org, linux-arm-kernel@lists.infradead.org, serge@hallyn.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org VXBkYXRlIGRvY3VtZW50YXRpb24gZm9yIFRydXN0ZWQgYW5kIEVuY3J5cHRlZCBLZXlzIHdpdGgg VEVFIGFzIGEgbmV3CnRydXN0IHNvdXJjZS4gRm9sbG93aW5nIGlzIGJyaWVmIGRlc2NyaXB0aW9u IG9mIHVwZGF0ZXM6CgotIEFkZCBhIHNlY3Rpb24gdG8gZGVtb3N0cmF0ZSBhIGxpc3Qgb2Ygc3Vw cG9ydGVkIGRldmljZXMgYWxvbmcgd2l0aAogIHRoZWlyIHNlY3VyaXR5IHByb3BlcnRpZXMvZ3Vh cmFudGVlcy4KLSBBZGQgYSBrZXkgZ2VuZXJhdGlvbiBzZWN0aW9uLgotIFVwZGF0ZXMgZm9yIHVz YWdlIHNlY3Rpb24gaW5jbHVkaW5nIGRpZmZlcmVuY2VzIHNwZWNpZmljIHRvIGEgdHJ1c3QKICBz b3VyY2UuCgpTaWduZWQtb2ZmLWJ5OiBTdW1pdC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