SlideShare a Scribd company logo
1 of 34
Looking into trusted and
encrypted keys
April, 2018, SUSE Labs Taipei technology sharing day, Taipei
Joey Lee
SUSE Labs Taipei
2
Agenda
• Key Retention Service
• Trusted Key
• Encrypted key
• TODO
– Reads protection of keyring, kernel lockdown
– EFI kernel master key
• Q&A
Key Retention Service
4
Kernel Key Retention Service
• This service allows cryptographic keys,
authentication tokens, cross-domain user mappings,
and similar to be cached in the kernel for the use of
filesystems and other kernel services. [1]
• Any kind of authentication or access information can
be stored as a key; it is essentially an opaque chunk
of data that is only interpreted by the kernel
subsystem that is interested in it. [2]
5
Key Retention Service
Keyrings
(system, session, user...)
Kernel
Userspace
TPM
(option)
eCryptfs
VFS
xfs ext4
jfs
...
keyctl
syscalls
(add, update, read, reoke...)
IMA/EVM
device mapper
request key
kernel modulesnetwork
dm-crypt
seal/unseal
Initrd
keyctl
(add, update, read, reoke...)
syscalls
6
Key and payload
struct key
- A serial number
- A type
- A description (for maching a key in a search)
- Access control information
- An expiry time
- A payload
- State
Kernel Key Retention Service [1]
KEY
Payload
user_key_payload
trusted_key_payload
encrypted_key_payload
...
[union key_payload]
7
Trusted and Encrypted Keys
• Introduced since v2.6.38 kernel
– Contribued by IBM
● Mimi Zohar <zohar@us.ibm.com>
● Roberto Sassu <roberto.sassu@polito.it>
● David Safford <safford@us.ibm.com>
…
• 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. [4]
Trusted Key
9
Trusted key
• 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. [4]
• The same key can have many saved blobs under
different PCR values, so multiple boots are easily
supported. [4]
10
Create trusted key (flow)
New key
(random plaintext)
00. request from
PCR
1, 2, 3...
SRK
(Storage Root Key)
TPM
PCR_INFO[3]
01. read from(option)
02.seal
Trusted key
(plaintext + TPM_STORED_DATA)
TPM_STORED_DATA[3]
random byes
03. request from(option)
04. Extend a PCR for capping
(option)RNG
11
Trusted key payload
key_len
rcu
trusted_key_payload
blob_len
Migratable
(0|1 permission to reseal)
key
(unsealed plaintext)
blob
(sealed blob)
(TPM_STORED_DATA)
key_len
blob_len
V4.17-rc
12
Format in trusted key
• "keyctl print" returns an ascii hex copy of the sealed
key, which is in standard TPM_STORED_DATA
format. [4]
• 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. [4]
13
Create a trusted key
TPM_STORED_DATA [3]
serial number
14
Save/Load a trusted key
15
Create a trusted key (in kernel)
• keyctl add trusted kmk "new 32" @u
security/keys
drivers/char/tpm
04. tpm_get_random
05. tpm_seal_trusted (TPM 2.0)
06-1. tpm_get_random
06-2. tpm_pcr_extend
00. trusted_instantiate
01. trusted_options_alloc
02. trusted_payload_alloc
03. datablob_parse
05. key_seal (TPM 1.0)
06. pcrlock
V4.17-rc
16
Load a trusted key (in kernel)
• keyctl add trusted kmk "load `cat kmk.blob`" @u
security/keys
drivers/char/tpm
04. tpm_unseal_trusted (TPM 2.0)
05-1. tpm_get_random
05-2. tpm_pcr_extend
00. trusted_instantiate
01. trusted_options_alloc
02. trusted_payload_alloc
03. datablob_parse
04. key_unseal (TPM 1.0)
05. pcrlock
V4.17-rc
Encrypted Key
18
Encrypted key
• Encrypted keys do not depend on a TPM, and are
faster, as they use AES for encryption/decryption.
[4]
• 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. [4]
• The decrypted portion of encrypted keys can contain
either a simple symmetric key or a more complex
structure. [4]
19
Create/Pipe encrypted key (flow)
Authentication
Key
KMK
(encrypted key or user key)
Encryption
Key
04. hash with
AUTH_KEY
string
02. hash with
ENC_KEY string
System/User
Keyring
derive
New key
(plaintext)
IV
(initialization vector)
Random
Pool
derive
00.getfrom
00.getfrom
01. request from
03. encrypt
03.
New key
(ciphertext)
05. signing
AES
encrypt
HMAC
sign
05. signing
Encrypted key
(ciphertext + signature)
20
Encrypted key payload
rcu
encrypted_key_payload
address points to datablob
char *format
char *master_desc
char *datalen
u8 *iv
u8 *encrypted_data
length of data
unsigned short datablob_len
unsigned short decrypted_datalen
unsigned short payload_datalen
encrypted_key_format
decrypted_data point
payload_data
(decrypted data + datablob + hmac)
datablob
decrypted data
hmac
V4.17-rc
21
Encrypted key payload_data
payload_data[0]
descrypted data
encrypted_data
decrypted_datalen
datablob_len
datablob
format
(default or encryptfs)
master_desc
(master key name
Trusted: or user:)
datalen
(decrypted key length string)
iv
(initialization vector)
hmac
(signature of datablob)
save to userland
V4.17-rc
22
Create a encrypted key
serial number
<format> <master-key name> <decrypted data length> <iv + encrypted data + hmac>
23
Save/Load a encrypted key
TODO
25
Kernel lockdown and keys
• [GIT PULL] Kernel lockdown for secure boot
– David Howells<dhowells@redhat.com>
– The Kernel Lockdown feature is designed to prevent both
direct and indirect access to a running kernel image,
attempting to protect against unauthorised modification of
the kernel image and to prevent access to security and
cryptographic data located in kernel memory, whilst still
permitting driver modules to be loaded.
– Kees Cook: Chrome OS does not use UEFI, and we still
want this patch series, as it plugs all the known
"intentional" escalation paths from uid-0 to ring-0.
– Linus said that the lockdown mechanism should not be
binded with secure boot.
26
Kernel lockdown and keys (cont.)
• The sensitive data should not be accessed when root be
compromised.
– plaintext in trusted key
– decrypted data in encrypted key
– EVM key
– dm-encrypt key
…
• Lockdown the reads functions
– /dev/mem, /dev/kmem, /dev/kcore
– bpf, kprobes, perf
– Hibernation
– Kexec/Kdump
...
27
EFI kernel master key
• Current two master key types:
– User key: The master user key should therefore be loaded
in as secure a way as possible, preferably early in boot. [4]
The user space environment needs authorization.
– Encrypted key: It needs TPM. And it should be sealed to
specific boot PCR values against boot and offline attacks.
28
EFI kernel master key (cont.)
• A New KEK type
• EFI stub generates key and stores in EFI boot
services variable. Kernel loads the key when booting.
• Pros
– It doesn’t rely on user space.
– It doesn’t need TPM.
– Can be loaded by kernel in early boot stage.
• Cons: It relies on firmware layer and secure boot
– Consumed limited NVRAM space
– Buggy firmware may earse or break the key
Q&A
30
Reference
• [1] Documentation/security/keys/core.rst, Linux
Kernel v4.17-rc
• [2] Kernel key management, Jake Edge, LWN.net,
November 21, 2006
• [3] TPM Main Part 2 TPM Structures Specification
version 1.2 Level 2 Revision 116, TCG Published, 1
March 2011
• [4] Documentation/security/keys/trusted-
encrypted.rst, Linux Kernel v4.17-rc
Thank you.
31
Feedback to
jlee@suse.com
Corporate Headquarters
Maxfeldstrasse 5
90409 Nuremberg
Germany
+49 911 740 53 0 (Worldwide)
www.suse.com
Join us on:
www.opensuse.org
33
Unpublished Work of SUSE. All Rights Reserved.
This work is an unpublished work and contains confidential, proprietary and trade secret information of SUSE.
Access to this work is restricted to SUSE employees who have a need to know to perform tasks within the scope of
their assignments. No part of this work may be practiced, performed, copied, distributed, revised, modified, translated,
abridged, condensed, expanded, collected, or adapted without the prior written consent of SUSE.
Any use or exploitation of this work without authorization could subject the perpetrator to criminal and civil liability.
General Disclaimer
This document is not to be construed as a promise by any participating company to develop, deliver, or market a
product. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making
purchasing decisions. SUSE makes no representations or warranties with respect to the contents of this document,
and specifically disclaims any express or implied warranties of merchantability or fitness for any particular purpose. The
development, release, and timing of features or functionality described for SUSE products remains at the sole
discretion of SUSE. Further, SUSE reserves the right to revise this document and to make changes to its content, at
any time, without obligation to notify any person or entity of such revisions or changes. All SUSE marks referenced in
this presentation are trademarks or registered trademarks of Novell, Inc. in the United States and other countries. All
third-party trademarks are the property of their respective owners.

More Related Content

What's hot

LAS16-111: Easing Access to ARM TrustZone – OP-TEE and Raspberry Pi 3
LAS16-111: Easing Access to ARM TrustZone – OP-TEE and Raspberry Pi 3LAS16-111: Easing Access to ARM TrustZone – OP-TEE and Raspberry Pi 3
LAS16-111: Easing Access to ARM TrustZone – OP-TEE and Raspberry Pi 3Linaro
 
Secure boot general
Secure boot generalSecure boot general
Secure boot generalPrabhu Swamy
 
Active directory
Active directory Active directory
Active directory deshvikas
 
LISA2019 Linux Systems Performance
LISA2019 Linux Systems PerformanceLISA2019 Linux Systems Performance
LISA2019 Linux Systems PerformanceBrendan Gregg
 
CentOS Linux Server Hardening
CentOS Linux Server HardeningCentOS Linux Server Hardening
CentOS Linux Server HardeningMyOwn Telco
 
Secure Boot on ARM systems – Building a complete Chain of Trust upon existing...
Secure Boot on ARM systems – Building a complete Chain of Trust upon existing...Secure Boot on ARM systems – Building a complete Chain of Trust upon existing...
Secure Boot on ARM systems – Building a complete Chain of Trust upon existing...Linaro
 
Test Lab Guide: Windows Server 2012 R2 Base Configuration
Test Lab Guide: Windows Server 2012 R2 Base ConfigurationTest Lab Guide: Windows Server 2012 R2 Base Configuration
Test Lab Guide: Windows Server 2012 R2 Base ConfigurationTiago Henrique Ribeiro Ferreira
 
Shell Scripting in Linux
Shell Scripting in LinuxShell Scripting in Linux
Shell Scripting in LinuxAnu Chaudhry
 
Introduction to Shell script
Introduction to Shell scriptIntroduction to Shell script
Introduction to Shell scriptBhavesh Padharia
 
NS-3(Network Simulator 3) 소개
NS-3(Network Simulator 3) 소개NS-3(Network Simulator 3) 소개
NS-3(Network Simulator 3) 소개공학코드
 
Linux kernel debugging
Linux kernel debuggingLinux kernel debugging
Linux kernel debugginglibfetion
 
LCU14-103: How to create and run Trusted Applications on OP-TEE
LCU14-103: How to create and run Trusted Applications on OP-TEELCU14-103: How to create and run Trusted Applications on OP-TEE
LCU14-103: How to create and run Trusted Applications on OP-TEELinaro
 
Android bootup process
Android bootup processAndroid bootup process
Android bootup processSanjay Kumar
 
Her yönüyle linux sistem ve network güvenliği
Her yönüyle linux sistem ve network güvenliğiHer yönüyle linux sistem ve network güvenliği
Her yönüyle linux sistem ve network güvenliğiAhmet Han
 
Android SDK Tutorial | Edureka
Android SDK Tutorial | EdurekaAndroid SDK Tutorial | Edureka
Android SDK Tutorial | EdurekaEdureka!
 
Trusted firmware deep_dive_v1.0_
Trusted firmware deep_dive_v1.0_Trusted firmware deep_dive_v1.0_
Trusted firmware deep_dive_v1.0_Linaro
 

What's hot (20)

LAS16-111: Easing Access to ARM TrustZone – OP-TEE and Raspberry Pi 3
LAS16-111: Easing Access to ARM TrustZone – OP-TEE and Raspberry Pi 3LAS16-111: Easing Access to ARM TrustZone – OP-TEE and Raspberry Pi 3
LAS16-111: Easing Access to ARM TrustZone – OP-TEE and Raspberry Pi 3
 
Secure boot general
Secure boot generalSecure boot general
Secure boot general
 
Active directory
Active directory Active directory
Active directory
 
LISA2019 Linux Systems Performance
LISA2019 Linux Systems PerformanceLISA2019 Linux Systems Performance
LISA2019 Linux Systems Performance
 
ASM
ASMASM
ASM
 
CentOS Linux Server Hardening
CentOS Linux Server HardeningCentOS Linux Server Hardening
CentOS Linux Server Hardening
 
Secure Boot on ARM systems – Building a complete Chain of Trust upon existing...
Secure Boot on ARM systems – Building a complete Chain of Trust upon existing...Secure Boot on ARM systems – Building a complete Chain of Trust upon existing...
Secure Boot on ARM systems – Building a complete Chain of Trust upon existing...
 
Test Lab Guide: Windows Server 2012 R2 Base Configuration
Test Lab Guide: Windows Server 2012 R2 Base ConfigurationTest Lab Guide: Windows Server 2012 R2 Base Configuration
Test Lab Guide: Windows Server 2012 R2 Base Configuration
 
Linux commands
Linux commandsLinux commands
Linux commands
 
Kablosuz Ağlarda Adli Analiz
Kablosuz Ağlarda Adli AnalizKablosuz Ağlarda Adli Analiz
Kablosuz Ağlarda Adli Analiz
 
Shell Scripting in Linux
Shell Scripting in LinuxShell Scripting in Linux
Shell Scripting in Linux
 
Introduction to Shell script
Introduction to Shell scriptIntroduction to Shell script
Introduction to Shell script
 
NS-3(Network Simulator 3) 소개
NS-3(Network Simulator 3) 소개NS-3(Network Simulator 3) 소개
NS-3(Network Simulator 3) 소개
 
Linux kernel debugging
Linux kernel debuggingLinux kernel debugging
Linux kernel debugging
 
LCU14-103: How to create and run Trusted Applications on OP-TEE
LCU14-103: How to create and run Trusted Applications on OP-TEELCU14-103: How to create and run Trusted Applications on OP-TEE
LCU14-103: How to create and run Trusted Applications on OP-TEE
 
Android bootup process
Android bootup processAndroid bootup process
Android bootup process
 
Her yönüyle linux sistem ve network güvenliği
Her yönüyle linux sistem ve network güvenliğiHer yönüyle linux sistem ve network güvenliği
Her yönüyle linux sistem ve network güvenliği
 
Android SDK Tutorial | Edureka
Android SDK Tutorial | EdurekaAndroid SDK Tutorial | Edureka
Android SDK Tutorial | Edureka
 
Nfs
NfsNfs
Nfs
 
Trusted firmware deep_dive_v1.0_
Trusted firmware deep_dive_v1.0_Trusted firmware deep_dive_v1.0_
Trusted firmware deep_dive_v1.0_
 

Similar to Looking into trusted and encrypted keys

XPDDS17: EFI Secure Boot, Shim and Xen: Current Status and Developments - Da...
XPDDS17:  EFI Secure Boot, Shim and Xen: Current Status and Developments - Da...XPDDS17:  EFI Secure Boot, Shim and Xen: Current Status and Developments - Da...
XPDDS17: EFI Secure Boot, Shim and Xen: Current Status and Developments - Da...The Linux Foundation
 
IBM Spectrum Scale Secure- Secure Data in Motion and Rest
IBM Spectrum Scale Secure- Secure Data in Motion and RestIBM Spectrum Scale Secure- Secure Data in Motion and Rest
IBM Spectrum Scale Secure- Secure Data in Motion and RestSandeep Patil
 
Meet up slides_mumbai_05022020_final
Meet up slides_mumbai_05022020_finalMeet up slides_mumbai_05022020_final
Meet up slides_mumbai_05022020_finalAkshata Sawant
 
What's New in Security for IBM i?
What's New in Security for IBM i?What's New in Security for IBM i?
What's New in Security for IBM i?HelpSystems
 
Breaking hardware enforced security with hypervisors
Breaking hardware enforced security with hypervisorsBreaking hardware enforced security with hypervisors
Breaking hardware enforced security with hypervisorsPriyanka Aash
 
Review of Hardware based solutions for trusted cloud computing.pptx
Review of Hardware based solutions for trusted cloud computing.pptxReview of Hardware based solutions for trusted cloud computing.pptx
Review of Hardware based solutions for trusted cloud computing.pptxssusere142fe
 
Securing Your Resources with Short-Lived Certificates!
Securing Your Resources with Short-Lived Certificates!Securing Your Resources with Short-Lived Certificates!
Securing Your Resources with Short-Lived Certificates!All Things Open
 
BKK16-110 A Gentle Introduction to Trusted Execution and OP-TEE
BKK16-110 A Gentle Introduction to Trusted Execution and OP-TEEBKK16-110 A Gentle Introduction to Trusted Execution and OP-TEE
BKK16-110 A Gentle Introduction to Trusted Execution and OP-TEELinaro
 
How to do Cryptography right in Android Part Two
How to do Cryptography right in Android Part TwoHow to do Cryptography right in Android Part Two
How to do Cryptography right in Android Part TwoArash Ramez
 
Developing for Industrial IoT with Linux OS on DragonBoard™ 410c: Session 4
Developing for Industrial IoT with Linux OS on DragonBoard™ 410c: Session 4Developing for Industrial IoT with Linux OS on DragonBoard™ 410c: Session 4
Developing for Industrial IoT with Linux OS on DragonBoard™ 410c: Session 4Qualcomm Developer Network
 
Intro to the sel4 Microkernel
Intro to the sel4 MicrokernelIntro to the sel4 Microkernel
Intro to the sel4 MicrokernelMatthew Russell
 
XPDDS18: Design Session - SGX deep dive and SGX Virtualization Discussion, Ka...
XPDDS18: Design Session - SGX deep dive and SGX Virtualization Discussion, Ka...XPDDS18: Design Session - SGX deep dive and SGX Virtualization Discussion, Ka...
XPDDS18: Design Session - SGX deep dive and SGX Virtualization Discussion, Ka...The Linux Foundation
 
HCLOS.Reduce to 600 dpi average quality
HCLOS.Reduce to 600 dpi average qualityHCLOS.Reduce to 600 dpi average quality
HCLOS.Reduce to 600 dpi average qualityVinayak Wadhwa
 
Quick-and-Easy Deployment of a Ceph Storage Cluster with SLES
Quick-and-Easy Deployment of a Ceph Storage Cluster with SLESQuick-and-Easy Deployment of a Ceph Storage Cluster with SLES
Quick-and-Easy Deployment of a Ceph Storage Cluster with SLESJan Kalcic
 
Attack your Trusted Core
Attack your Trusted CoreAttack your Trusted Core
Attack your Trusted CoreDi Shen
 
KoprowskiT_SQLSatHolland_SQLServerSecurityInTheCloud
KoprowskiT_SQLSatHolland_SQLServerSecurityInTheCloudKoprowskiT_SQLSatHolland_SQLServerSecurityInTheCloud
KoprowskiT_SQLSatHolland_SQLServerSecurityInTheCloudTobias Koprowski
 
Automotive OTA Security For The Connected Vehicle (ASRG Secure Our Streets 2022)
Automotive OTA Security For The Connected Vehicle (ASRG Secure Our Streets 2022)Automotive OTA Security For The Connected Vehicle (ASRG Secure Our Streets 2022)
Automotive OTA Security For The Connected Vehicle (ASRG Secure Our Streets 2022)Benny Meisels
 

Similar to Looking into trusted and encrypted keys (20)

EFI Secure Key
EFI Secure KeyEFI Secure Key
EFI Secure Key
 
XPDDS17: EFI Secure Boot, Shim and Xen: Current Status and Developments - Da...
XPDDS17:  EFI Secure Boot, Shim and Xen: Current Status and Developments - Da...XPDDS17:  EFI Secure Boot, Shim and Xen: Current Status and Developments - Da...
XPDDS17: EFI Secure Boot, Shim and Xen: Current Status and Developments - Da...
 
IBM Spectrum Scale Secure- Secure Data in Motion and Rest
IBM Spectrum Scale Secure- Secure Data in Motion and RestIBM Spectrum Scale Secure- Secure Data in Motion and Rest
IBM Spectrum Scale Secure- Secure Data in Motion and Rest
 
Meet up slides_mumbai_05022020_final
Meet up slides_mumbai_05022020_finalMeet up slides_mumbai_05022020_final
Meet up slides_mumbai_05022020_final
 
Integrity Protection for Embedded Systems
Integrity Protection for Embedded SystemsIntegrity Protection for Embedded Systems
Integrity Protection for Embedded Systems
 
What's New in Security for IBM i?
What's New in Security for IBM i?What's New in Security for IBM i?
What's New in Security for IBM i?
 
Breaking hardware enforced security with hypervisors
Breaking hardware enforced security with hypervisorsBreaking hardware enforced security with hypervisors
Breaking hardware enforced security with hypervisors
 
Review of Hardware based solutions for trusted cloud computing.pptx
Review of Hardware based solutions for trusted cloud computing.pptxReview of Hardware based solutions for trusted cloud computing.pptx
Review of Hardware based solutions for trusted cloud computing.pptx
 
Securing Your Resources with Short-Lived Certificates!
Securing Your Resources with Short-Lived Certificates!Securing Your Resources with Short-Lived Certificates!
Securing Your Resources with Short-Lived Certificates!
 
BKK16-110 A Gentle Introduction to Trusted Execution and OP-TEE
BKK16-110 A Gentle Introduction to Trusted Execution and OP-TEEBKK16-110 A Gentle Introduction to Trusted Execution and OP-TEE
BKK16-110 A Gentle Introduction to Trusted Execution and OP-TEE
 
How to do Cryptography right in Android Part Two
How to do Cryptography right in Android Part TwoHow to do Cryptography right in Android Part Two
How to do Cryptography right in Android Part Two
 
Developing for Industrial IoT with Linux OS on DragonBoard™ 410c: Session 4
Developing for Industrial IoT with Linux OS on DragonBoard™ 410c: Session 4Developing for Industrial IoT with Linux OS on DragonBoard™ 410c: Session 4
Developing for Industrial IoT with Linux OS on DragonBoard™ 410c: Session 4
 
Intro to the sel4 Microkernel
Intro to the sel4 MicrokernelIntro to the sel4 Microkernel
Intro to the sel4 Microkernel
 
XPDDS18: Design Session - SGX deep dive and SGX Virtualization Discussion, Ka...
XPDDS18: Design Session - SGX deep dive and SGX Virtualization Discussion, Ka...XPDDS18: Design Session - SGX deep dive and SGX Virtualization Discussion, Ka...
XPDDS18: Design Session - SGX deep dive and SGX Virtualization Discussion, Ka...
 
HCLOS.Reduce to 600 dpi average quality
HCLOS.Reduce to 600 dpi average qualityHCLOS.Reduce to 600 dpi average quality
HCLOS.Reduce to 600 dpi average quality
 
Quick-and-Easy Deployment of a Ceph Storage Cluster with SLES
Quick-and-Easy Deployment of a Ceph Storage Cluster with SLESQuick-and-Easy Deployment of a Ceph Storage Cluster with SLES
Quick-and-Easy Deployment of a Ceph Storage Cluster with SLES
 
Attack your Trusted Core
Attack your Trusted CoreAttack your Trusted Core
Attack your Trusted Core
 
KoprowskiT_SQLSatHolland_SQLServerSecurityInTheCloud
KoprowskiT_SQLSatHolland_SQLServerSecurityInTheCloudKoprowskiT_SQLSatHolland_SQLServerSecurityInTheCloud
KoprowskiT_SQLSatHolland_SQLServerSecurityInTheCloud
 
Automotive OTA Security For The Connected Vehicle (ASRG Secure Our Streets 2022)
Automotive OTA Security For The Connected Vehicle (ASRG Secure Our Streets 2022)Automotive OTA Security For The Connected Vehicle (ASRG Secure Our Streets 2022)
Automotive OTA Security For The Connected Vehicle (ASRG Secure Our Streets 2022)
 
Configure ssh cell
Configure ssh cellConfigure ssh cell
Configure ssh cell
 

More from SUSE Labs Taipei

Locked down openSUSE Tumbleweed kernel
Locked down openSUSE Tumbleweed kernelLocked down openSUSE Tumbleweed kernel
Locked down openSUSE Tumbleweed kernelSUSE Labs Taipei
 
SUSE shim and things related to it
SUSE shim and things related to itSUSE shim and things related to it
SUSE shim and things related to itSUSE Labs Taipei
 
Multi-signed Kernel Module
Multi-signed Kernel ModuleMulti-signed Kernel Module
Multi-signed Kernel ModuleSUSE Labs Taipei
 
ACPI Debugging from Linux Kernel
ACPI Debugging from Linux KernelACPI Debugging from Linux Kernel
ACPI Debugging from Linux KernelSUSE Labs Taipei
 
Profiling the ACPICA Namespace and Event Handing
Profiling the ACPICA Namespace and Event HandingProfiling the ACPICA Namespace and Event Handing
Profiling the ACPICA Namespace and Event HandingSUSE Labs Taipei
 
Kernel debug log and console on openSUSE
Kernel debug log and console on openSUSEKernel debug log and console on openSUSE
Kernel debug log and console on openSUSESUSE Labs Taipei
 
The bright future of SUSE and openSUSE
The bright future of SUSE and openSUSEThe bright future of SUSE and openSUSE
The bright future of SUSE and openSUSESUSE Labs Taipei
 
Convert your package to multibuild on Open Build Service
Convert your package to multibuild on Open Build ServiceConvert your package to multibuild on Open Build Service
Convert your package to multibuild on Open Build ServiceSUSE Labs Taipei
 
Linux Linux Traffic Control
Linux Linux Traffic ControlLinux Linux Traffic Control
Linux Linux Traffic ControlSUSE Labs Taipei
 
Use bonding driver with ethernet
Use bonding driver with ethernetUse bonding driver with ethernet
Use bonding driver with ethernetSUSE Labs Taipei
 
Use build service API in your program
Use build service API in your programUse build service API in your program
Use build service API in your programSUSE Labs Taipei
 
eBPF Trace from Kernel to Userspace
eBPF Trace from Kernel to UserspaceeBPF Trace from Kernel to Userspace
eBPF Trace from Kernel to UserspaceSUSE Labs Taipei
 
Develop and Maintain a Distro with Open Build Service
Develop and Maintain a Distro with Open Build ServiceDevelop and Maintain a Distro with Open Build Service
Develop and Maintain a Distro with Open Build ServiceSUSE Labs Taipei
 

More from SUSE Labs Taipei (20)

Locked down openSUSE Tumbleweed kernel
Locked down openSUSE Tumbleweed kernelLocked down openSUSE Tumbleweed kernel
Locked down openSUSE Tumbleweed kernel
 
SUSE shim and things related to it
SUSE shim and things related to itSUSE shim and things related to it
SUSE shim and things related to it
 
Multi-signed Kernel Module
Multi-signed Kernel ModuleMulti-signed Kernel Module
Multi-signed Kernel Module
 
ACPI Debugging from Linux Kernel
ACPI Debugging from Linux KernelACPI Debugging from Linux Kernel
ACPI Debugging from Linux Kernel
 
Profiling the ACPICA Namespace and Event Handing
Profiling the ACPICA Namespace and Event HandingProfiling the ACPICA Namespace and Event Handing
Profiling the ACPICA Namespace and Event Handing
 
Kernel debug log and console on openSUSE
Kernel debug log and console on openSUSEKernel debug log and console on openSUSE
Kernel debug log and console on openSUSE
 
The bright future of SUSE and openSUSE
The bright future of SUSE and openSUSEThe bright future of SUSE and openSUSE
The bright future of SUSE and openSUSE
 
eBPF maps 101
eBPF maps 101eBPF maps 101
eBPF maps 101
 
Convert your package to multibuild on Open Build Service
Convert your package to multibuild on Open Build ServiceConvert your package to multibuild on Open Build Service
Convert your package to multibuild on Open Build Service
 
Ixgbe internals
Ixgbe internalsIxgbe internals
Ixgbe internals
 
Linux Linux Traffic Control
Linux Linux Traffic ControlLinux Linux Traffic Control
Linux Linux Traffic Control
 
Use bonding driver with ethernet
Use bonding driver with ethernetUse bonding driver with ethernet
Use bonding driver with ethernet
 
Use build service API in your program
Use build service API in your programUse build service API in your program
Use build service API in your program
 
Hands-on ethernet driver
Hands-on ethernet driverHands-on ethernet driver
Hands-on ethernet driver
 
eBPF Trace from Kernel to Userspace
eBPF Trace from Kernel to UserspaceeBPF Trace from Kernel to Userspace
eBPF Trace from Kernel to Userspace
 
S4 sig-check-lpc-20130918
S4 sig-check-lpc-20130918S4 sig-check-lpc-20130918
S4 sig-check-lpc-20130918
 
openSUSE12.2 Review
openSUSE12.2 ReviewopenSUSE12.2 Review
openSUSE12.2 Review
 
oS KDE Repos & MM
oS KDE Repos & MMoS KDE Repos & MM
oS KDE Repos & MM
 
Develop and Maintain a Distro with Open Build Service
Develop and Maintain a Distro with Open Build ServiceDevelop and Maintain a Distro with Open Build Service
Develop and Maintain a Distro with Open Build Service
 
Coscup 2012-urfkill
Coscup 2012-urfkillCoscup 2012-urfkill
Coscup 2012-urfkill
 

Recently uploaded

Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)jennyeacort
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaHanief Utama
 
Buds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in NoidaBuds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in Noidabntitsolutionsrishis
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...OnePlan Solutions
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEOrtus Solutions, Corp
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureDinusha Kumarasiri
 
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odishasmiwainfosol
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesŁukasz Chruściel
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样umasea
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作qr0udbr0
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmSujith Sukumaran
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...Christina Lin
 
Xen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfXen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfStefano Stabellini
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...soniya singh
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024StefanoLambiase
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Velvetech LLC
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsAhmed Mohamed
 

Recently uploaded (20)

2.pdf Ejercicios de programación competitiva
2.pdf Ejercicios de programación competitiva2.pdf Ejercicios de programación competitiva
2.pdf Ejercicios de programación competitiva
 
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief Utama
 
Buds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in NoidaBuds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in Noida
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with Azure
 
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New Features
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalm
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
 
Xen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfXen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdf
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML Diagrams
 

Looking into trusted and encrypted keys

  • 1. Looking into trusted and encrypted keys April, 2018, SUSE Labs Taipei technology sharing day, Taipei Joey Lee SUSE Labs Taipei
  • 2. 2 Agenda • Key Retention Service • Trusted Key • Encrypted key • TODO – Reads protection of keyring, kernel lockdown – EFI kernel master key • Q&A
  • 4. 4 Kernel Key Retention Service • This service allows cryptographic keys, authentication tokens, cross-domain user mappings, and similar to be cached in the kernel for the use of filesystems and other kernel services. [1] • Any kind of authentication or access information can be stored as a key; it is essentially an opaque chunk of data that is only interpreted by the kernel subsystem that is interested in it. [2]
  • 5. 5 Key Retention Service Keyrings (system, session, user...) Kernel Userspace TPM (option) eCryptfs VFS xfs ext4 jfs ... keyctl syscalls (add, update, read, reoke...) IMA/EVM device mapper request key kernel modulesnetwork dm-crypt seal/unseal Initrd keyctl (add, update, read, reoke...) syscalls
  • 6. 6 Key and payload struct key - A serial number - A type - A description (for maching a key in a search) - Access control information - An expiry time - A payload - State Kernel Key Retention Service [1] KEY Payload user_key_payload trusted_key_payload encrypted_key_payload ... [union key_payload]
  • 7. 7 Trusted and Encrypted Keys • Introduced since v2.6.38 kernel – Contribued by IBM ● Mimi Zohar <zohar@us.ibm.com> ● Roberto Sassu <roberto.sassu@polito.it> ● David Safford <safford@us.ibm.com> … • 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. [4]
  • 9. 9 Trusted key • 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. [4] • The same key can have many saved blobs under different PCR values, so multiple boots are easily supported. [4]
  • 10. 10 Create trusted key (flow) New key (random plaintext) 00. request from PCR 1, 2, 3... SRK (Storage Root Key) TPM PCR_INFO[3] 01. read from(option) 02.seal Trusted key (plaintext + TPM_STORED_DATA) TPM_STORED_DATA[3] random byes 03. request from(option) 04. Extend a PCR for capping (option)RNG
  • 11. 11 Trusted key payload key_len rcu trusted_key_payload blob_len Migratable (0|1 permission to reseal) key (unsealed plaintext) blob (sealed blob) (TPM_STORED_DATA) key_len blob_len V4.17-rc
  • 12. 12 Format in trusted key • "keyctl print" returns an ascii hex copy of the sealed key, which is in standard TPM_STORED_DATA format. [4] • 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. [4]
  • 13. 13 Create a trusted key TPM_STORED_DATA [3] serial number
  • 15. 15 Create a trusted key (in kernel) • keyctl add trusted kmk "new 32" @u security/keys drivers/char/tpm 04. tpm_get_random 05. tpm_seal_trusted (TPM 2.0) 06-1. tpm_get_random 06-2. tpm_pcr_extend 00. trusted_instantiate 01. trusted_options_alloc 02. trusted_payload_alloc 03. datablob_parse 05. key_seal (TPM 1.0) 06. pcrlock V4.17-rc
  • 16. 16 Load a trusted key (in kernel) • keyctl add trusted kmk "load `cat kmk.blob`" @u security/keys drivers/char/tpm 04. tpm_unseal_trusted (TPM 2.0) 05-1. tpm_get_random 05-2. tpm_pcr_extend 00. trusted_instantiate 01. trusted_options_alloc 02. trusted_payload_alloc 03. datablob_parse 04. key_unseal (TPM 1.0) 05. pcrlock V4.17-rc
  • 18. 18 Encrypted key • Encrypted keys do not depend on a TPM, and are faster, as they use AES for encryption/decryption. [4] • 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. [4] • The decrypted portion of encrypted keys can contain either a simple symmetric key or a more complex structure. [4]
  • 19. 19 Create/Pipe encrypted key (flow) Authentication Key KMK (encrypted key or user key) Encryption Key 04. hash with AUTH_KEY string 02. hash with ENC_KEY string System/User Keyring derive New key (plaintext) IV (initialization vector) Random Pool derive 00.getfrom 00.getfrom 01. request from 03. encrypt 03. New key (ciphertext) 05. signing AES encrypt HMAC sign 05. signing Encrypted key (ciphertext + signature)
  • 20. 20 Encrypted key payload rcu encrypted_key_payload address points to datablob char *format char *master_desc char *datalen u8 *iv u8 *encrypted_data length of data unsigned short datablob_len unsigned short decrypted_datalen unsigned short payload_datalen encrypted_key_format decrypted_data point payload_data (decrypted data + datablob + hmac) datablob decrypted data hmac V4.17-rc
  • 21. 21 Encrypted key payload_data payload_data[0] descrypted data encrypted_data decrypted_datalen datablob_len datablob format (default or encryptfs) master_desc (master key name Trusted: or user:) datalen (decrypted key length string) iv (initialization vector) hmac (signature of datablob) save to userland V4.17-rc
  • 22. 22 Create a encrypted key serial number <format> <master-key name> <decrypted data length> <iv + encrypted data + hmac>
  • 24. TODO
  • 25. 25 Kernel lockdown and keys • [GIT PULL] Kernel lockdown for secure boot – David Howells<dhowells@redhat.com> – The Kernel Lockdown feature is designed to prevent both direct and indirect access to a running kernel image, attempting to protect against unauthorised modification of the kernel image and to prevent access to security and cryptographic data located in kernel memory, whilst still permitting driver modules to be loaded. – Kees Cook: Chrome OS does not use UEFI, and we still want this patch series, as it plugs all the known "intentional" escalation paths from uid-0 to ring-0. – Linus said that the lockdown mechanism should not be binded with secure boot.
  • 26. 26 Kernel lockdown and keys (cont.) • The sensitive data should not be accessed when root be compromised. – plaintext in trusted key – decrypted data in encrypted key – EVM key – dm-encrypt key … • Lockdown the reads functions – /dev/mem, /dev/kmem, /dev/kcore – bpf, kprobes, perf – Hibernation – Kexec/Kdump ...
  • 27. 27 EFI kernel master key • Current two master key types: – User key: The master user key should therefore be loaded in as secure a way as possible, preferably early in boot. [4] The user space environment needs authorization. – Encrypted key: It needs TPM. And it should be sealed to specific boot PCR values against boot and offline attacks.
  • 28. 28 EFI kernel master key (cont.) • A New KEK type • EFI stub generates key and stores in EFI boot services variable. Kernel loads the key when booting. • Pros – It doesn’t rely on user space. – It doesn’t need TPM. – Can be loaded by kernel in early boot stage. • Cons: It relies on firmware layer and secure boot – Consumed limited NVRAM space – Buggy firmware may earse or break the key
  • 29. Q&A
  • 30. 30 Reference • [1] Documentation/security/keys/core.rst, Linux Kernel v4.17-rc • [2] Kernel key management, Jake Edge, LWN.net, November 21, 2006 • [3] TPM Main Part 2 TPM Structures Specification version 1.2 Level 2 Revision 116, TCG Published, 1 March 2011 • [4] Documentation/security/keys/trusted- encrypted.rst, Linux Kernel v4.17-rc
  • 32.
  • 33. Corporate Headquarters Maxfeldstrasse 5 90409 Nuremberg Germany +49 911 740 53 0 (Worldwide) www.suse.com Join us on: www.opensuse.org 33
  • 34. Unpublished Work of SUSE. All Rights Reserved. This work is an unpublished work and contains confidential, proprietary and trade secret information of SUSE. Access to this work is restricted to SUSE employees who have a need to know to perform tasks within the scope of their assignments. No part of this work may be practiced, performed, copied, distributed, revised, modified, translated, abridged, condensed, expanded, collected, or adapted without the prior written consent of SUSE. Any use or exploitation of this work without authorization could subject the perpetrator to criminal and civil liability. General Disclaimer This document is not to be construed as a promise by any participating company to develop, deliver, or market a product. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. SUSE makes no representations or warranties with respect to the contents of this document, and specifically disclaims any express or implied warranties of merchantability or fitness for any particular purpose. The development, release, and timing of features or functionality described for SUSE products remains at the sole discretion of SUSE. Further, SUSE reserves the right to revise this document and to make changes to its content, at any time, without obligation to notify any person or entity of such revisions or changes. All SUSE marks referenced in this presentation are trademarks or registered trademarks of Novell, Inc. in the United States and other countries. All third-party trademarks are the property of their respective owners.