SlideShare a Scribd company logo
Signature verification of
hibernate snapshot
September, 2013, LPC 2013, New Orleans

Joey Lee
Problem
●

●

On a multi-boot machine, hacker use any hole in
another UEFI trusted OS to modify the hibernate
snapshot image in swap partition.
Through uswsusp, userspace can take the
snapshot of memory then modify it. Upload it
back to memory then trigger the restore.

© SUSE, All rights reserved.
Idea
●

●

●

Jiri Kosina: Let EFI bootloader generates keypair then pass to kernel for sign hibernate
image.
Fundamental point: Trust the boot time
variable is secure when UEFI secure boot
enabled.
Attempt to protect snapshot image integrity.

© SUSE, All rights reserved.
Steps (when hibernate)
●

●

●

●

shim bootloader geneates key-pair and put keys
to non-volatile boot time varaibles.
EFI stub kernel loads private key before
ExitBootServices().
Hibernate subsystem copy the private key to a
empty page to keep it for sign snapshot when
hibernate launched.
Kernel generates signature of snapshot image
then put the signature to snapshot header.
Current reserved max size of signature is 512
bytes.

© SUSE, All rights reserved.
Steps (when hibernate restore)
●

●

After hibernate loaded snapshot image from
swap to temporary memory space, kernel uses
the public key from runtime volatile variable to
verify the signature that's stored in snapshot
header.
Then depend on sig_enforce
●

●

OFF: taint kernel and produce complain log
when signature check fail
ON: fail the hiberntae restore, then finish
boot process when signature check fail.

© SUSE, All rights reserved.
How to enable sig_enforce?
●

●

Use snapshot_sig_enforce kernel parameter.
Set kernel config then enable UEFI secure boot:
EFI_SECURE_BOOT_SNAPSHOT_SIG_ENFO
RCE

© SUSE, All rights reserved.
EFI variable name and GUID
●

GUID:
●

●

S4SignKey [BT][NV]→ private key
●

●

fe141863-c070-478e-b8a3-878a5dc9ef21
PKCS#8 _uncompressed_ private key format

S4WakeKey [RT][V] → public key
●

X.509 format

© SUSE, All rights reserved.
When shim should generate keys?
●

●

When system boot, and shim didn't find key-pair
When shim found GenS4Key EFI variable from
kernel:
●

●

●

GenS4Key-fe141863-c070-478e-b8a3878a5dc9ef21
[RT][NV]
Kernel or userspace write GenS4Key
variable to '1' when hibernate launched.
Kernel will delete GenS4Key in system boot.

© SUSE, All rights reserved.
Implementation Parts
●

Key-pair generator in shim
●

●

●

Author: Gary Lin
https://github.com/lcp/shim/tree/s4-key-upstream

Asymmetric Keys in Kernel:
●

●

●

Implemented PKCS#8 and PKCS#1 RSA private key parser
Add signature generation API and implement signature
generation logic in PKCS#1 (RFC3447 sec 8.2.2)

Hibernate in Kernel:
●

CONFIG_SNAPSHOT_VERIFICATION=y

●

Maintain and forward private key.

●

Avoid private key included in snapshot image.s

●

Sign snapshot image: generate signature then put it to snapshot
header.

© SUSE, All rights reserved.
Performance of hash (machine 1)
●

CPU:
●

●
●

Intel(R) Core(TM) i5 CPU
x86_64, ssse3

Normal
●

SHA1: 150.80 MB/s

●

SHA256: 59.19 MB/s

●
●

650 @ 3.20GHz

SHA512: 78.44 MB/s

Builded ssse3 support (v3.10 later)
●

SHA1: 195.60 MB/s

●

SHA256: 82.76 MB/s

●

SHA512: 120.60 MB/s

© SUSE, All rights reserved.
Performance of hash (machine 2)
●

CPU:
●

●
●

Intel(R) CPU @ 2.60GHz
x86_64, ssse3, avx, avx2

Normal
●

●

SHA256: 163.23 MB/s

●
●

SHA1: 436.42 MB/s
SHA512: 228.67 MB/s

Builded ssse3, avx, avx2 support (v3.10 later)
●

SHA1: 609.66 MB/s <=== fastest

●

SHA256: 242.03 MB/s

●

SHA512: 344.87 MB/s <=== more secure

© SUSE, All rights reserved.
Performance of hash (summary)
●

Speed between SHA1, SHA256, SHA512
●

●

SHA1 is 1.8 times of SHA512

●
●

SHA1 is 2.5 times of SHA256
SHA512 is 1.4 times of SHA256

Enabled ssse3
●

●

39% improved on SHA256

●
●

29% improved on SHA1
53% improved on SHA512

Enabled ssse3, avx, avx2
●

39% improved on SHA1

●

48% improved on SHA256

●

50% improved on SHA512

© SUSE, All rights reserved.
Performance of hash (summary)
●

Machine 1:
●

Best performance
–
–

●

SHA1: 195.60 MB/s on ssse3, avx, avx2
snapshot image grown to 3GB, then need 15.7 seconds for hash

SHA512's best performance
–
–

●

120.60 MB/s on ssse3, avx, avx2
snapshot image grown to 3GB, then need 25.4 seconds for hash

Machine 2:
●

Best performance
–
–

●

SHA1: 609.66 MB/s on ssse3, avx, avx2
snapshot image grown to 3GB, then need 5 seconds for hash

SHA512's best performasnce
–

344.87 MB/s on ssse3, avx, avx2

–

snapshot image grown to 3GB, then need 8.9 seconds for hash

© SUSE, All rights reserved.
Patch status
●

V4 RFC patches sent to kernel upstream and openSUSE kernel for
reviewing:
●

●
●

[RFC V4 PATCH 00/15] Signature verification of hibernate snapshot
https://lkml.org/lkml/2013/9/14/183

Following kernel experts gave suggestions:
●

Hibernate

●

Matt Fleming <matt@console-pimps.org>

EFI

●
●

Pavel Machek <pavel@ucw.cz>
Dmitry Kasatkin <dmitry.kasatkin@gmail.com>

Asymmetric keys

Followed Pavel and Matt's suggestions, already fix in V2, V3 patches

© SUSE, All rights reserved.
TODO
●

V5 patches:
●

●

●

Implement Dmitry Kasatkin's suggestions to
Asymmetric keys.
Should we remove the kernel config to user
for select hash algorithms?

Function add:
●

●

Kernel pass random number seed by EFI
variable to shim.
Encript snapshot image before sign it?

© SUSE, All rights reserved.
Corporate Headquarters

Maxfeldstrasse 5
90409 Nuremberg
Germany
© SUSE, All rights reserved.

+49 911 740 53 0 (Worldwide)
+www.suse.com

Join us on:
www.opensuse.org
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

ODP
Use build service API in your program
SUSE Labs Taipei
 
ODP
Coscup 2012-urfkill
SUSE Labs Taipei
 
ODP
Develop and Maintain a Distro with Open Build Service
SUSE Labs Taipei
 
ODP
Use bonding driver with ethernet
SUSE Labs Taipei
 
PDF
Getting Started on Packaging Apps with Open Build Service
Andi Sugandi
 
PDF
SCAP for openSUSE
Kazuki Omo
 
PDF
How to make multi-boot USB drive for LiveCD iso images on EFI/UEFI and BIOS
Kentaro Hatori
 
PDF
Robert collins openstack on openstack 201304162
OpenStack Foundation
 
Use build service API in your program
SUSE Labs Taipei
 
Coscup 2012-urfkill
SUSE Labs Taipei
 
Develop and Maintain a Distro with Open Build Service
SUSE Labs Taipei
 
Use bonding driver with ethernet
SUSE Labs Taipei
 
Getting Started on Packaging Apps with Open Build Service
Andi Sugandi
 
SCAP for openSUSE
Kazuki Omo
 
How to make multi-boot USB drive for LiveCD iso images on EFI/UEFI and BIOS
Kentaro Hatori
 
Robert collins openstack on openstack 201304162
OpenStack Foundation
 

What's hot (20)

PDF
iscsid remains stopped in redhat EL 6
Ashwin Pawar
 
PDF
Instalar MySQL CentOS
Moisés Elías Araya
 
PDF
DNF Failed To Open Cache
VCP Muthukrishna
 
PPTX
Centos
sandyy12
 
PDF
Habilitar repositorio EPEL RHEL
Moisés Elías Araya
 
ODP
Looking into trusted and encrypted keys
SUSE Labs Taipei
 
PDF
My sql 5.6 master slave and master-master replication.step by step configurat...
Pawan Kumar
 
PPTX
Rhel6 vs rhel7
Ratna Likhita
 
PDF
Introduction to FreeNAS development by John Hixson
iXsystems
 
PDF
Sweden11
Dru Lavigne
 
PDF
Install and Configure Ubuntu for Hadoop Installation for beginners
Shilpa Hemaraj
 
PDF
Fosscon2013
Dru Lavigne
 
PDF
J Ruby On Rails Presentation
railsconf
 
PDF
Snort296x centos6x 2
Trinh Tuan
 
PPTX
CentOS Virt SIG - Community virtualization packages on an immutable core
The Linux Foundation
 
PPT
Anthony McKeown Drupal Presentation
Tony McKeown
 
PDF
XPDS13: Xenserver-core: What it is, how it is built and how to get involved -...
The Linux Foundation
 
PPTX
Hadoop single cluster installation
Minh Tran
 
PDF
IPS: Image Packaging System
Eric Sproul
 
PPT
Its3 Drupal
guest954945a
 
iscsid remains stopped in redhat EL 6
Ashwin Pawar
 
Instalar MySQL CentOS
Moisés Elías Araya
 
DNF Failed To Open Cache
VCP Muthukrishna
 
Centos
sandyy12
 
Habilitar repositorio EPEL RHEL
Moisés Elías Araya
 
Looking into trusted and encrypted keys
SUSE Labs Taipei
 
My sql 5.6 master slave and master-master replication.step by step configurat...
Pawan Kumar
 
Rhel6 vs rhel7
Ratna Likhita
 
Introduction to FreeNAS development by John Hixson
iXsystems
 
Sweden11
Dru Lavigne
 
Install and Configure Ubuntu for Hadoop Installation for beginners
Shilpa Hemaraj
 
Fosscon2013
Dru Lavigne
 
J Ruby On Rails Presentation
railsconf
 
Snort296x centos6x 2
Trinh Tuan
 
CentOS Virt SIG - Community virtualization packages on an immutable core
The Linux Foundation
 
Anthony McKeown Drupal Presentation
Tony McKeown
 
XPDS13: Xenserver-core: What it is, how it is built and how to get involved -...
The Linux Foundation
 
Hadoop single cluster installation
Minh Tran
 
IPS: Image Packaging System
Eric Sproul
 
Its3 Drupal
guest954945a
 
Ad

Similar to S4 sig-check-lpc-20130918 (20)

ODP
Signature verification of hibernate snapshot
joeylikernel
 
PDF
EFI Secure Key
SUSE Labs Taipei
 
PDF
XPDDS17: EFI Secure Boot, Shim and Xen: Current Status and Developments - Da...
The Linux Foundation
 
PDF
SUSE shim and things related to it
SUSE Labs Taipei
 
PDF
Lt2013 uefisb.talk
Udo Seidel
 
PDF
SUSE, Hadoop and Big Data Update. Stephen Mogg, SUSE UK
huguk
 
PDF
Distro Recipes 2013: Secure Boot and Linux: several issues, one solution
Anne Nicolas
 
PDF
Deploying SUSE Cloud in a Multi-Hypervisor Enterprise Environment
Rick Ashford
 
PDF
2013 linux days final
RandomShare
 
PDF
Intel software guard extension
DESMOND YUEN
 
PPTX
Clear Linux OS - Architecture Overview
Open Source Technology Center MeetUps
 
PDF
A Reimplementation of NetBSD Based on a Microkernel by Andrew S. Tanenbaum
eurobsdcon
 
PDF
Keep up with openSUSE Packaging
nebezpecna_sit
 
ODP
Signature verification of kernel module and kexec
joeylikernel
 
PDF
Beyond Bios Implementing the Unified Extensible Firmware Interface with Intel...
molamoajju
 
PDF
Code Signing with CPK
Zhi Guan
 
PPT
Rhce ppt
Mohammed Ben
 
PDF
stackconf 2020 | Speeding up Linux disk encryption by Ignat Korchagin
NETWAYS
 
ODP
OS Security Hardening for SAP HANA
Dirk Oppenkowski
 
PDF
Ceph_in_a_Windows_world
suncbing1
 
Signature verification of hibernate snapshot
joeylikernel
 
EFI Secure Key
SUSE Labs Taipei
 
XPDDS17: EFI Secure Boot, Shim and Xen: Current Status and Developments - Da...
The Linux Foundation
 
SUSE shim and things related to it
SUSE Labs Taipei
 
Lt2013 uefisb.talk
Udo Seidel
 
SUSE, Hadoop and Big Data Update. Stephen Mogg, SUSE UK
huguk
 
Distro Recipes 2013: Secure Boot and Linux: several issues, one solution
Anne Nicolas
 
Deploying SUSE Cloud in a Multi-Hypervisor Enterprise Environment
Rick Ashford
 
2013 linux days final
RandomShare
 
Intel software guard extension
DESMOND YUEN
 
Clear Linux OS - Architecture Overview
Open Source Technology Center MeetUps
 
A Reimplementation of NetBSD Based on a Microkernel by Andrew S. Tanenbaum
eurobsdcon
 
Keep up with openSUSE Packaging
nebezpecna_sit
 
Signature verification of kernel module and kexec
joeylikernel
 
Beyond Bios Implementing the Unified Extensible Firmware Interface with Intel...
molamoajju
 
Code Signing with CPK
Zhi Guan
 
Rhce ppt
Mohammed Ben
 
stackconf 2020 | Speeding up Linux disk encryption by Ignat Korchagin
NETWAYS
 
OS Security Hardening for SAP HANA
Dirk Oppenkowski
 
Ceph_in_a_Windows_world
suncbing1
 
Ad

More from SUSE Labs Taipei (14)

PDF
Locked down openSUSE Tumbleweed kernel
SUSE Labs Taipei
 
PDF
Multi-signed Kernel Module
SUSE Labs Taipei
 
PDF
ACPI Debugging from Linux Kernel
SUSE Labs Taipei
 
PDF
Profiling the ACPICA Namespace and Event Handing
SUSE Labs Taipei
 
PDF
Kernel debug log and console on openSUSE
SUSE Labs Taipei
 
PDF
The bright future of SUSE and openSUSE
SUSE Labs Taipei
 
ODP
eBPF maps 101
SUSE Labs Taipei
 
ODP
Convert your package to multibuild on Open Build Service
SUSE Labs Taipei
 
PDF
Ixgbe internals
SUSE Labs Taipei
 
PDF
Linux Linux Traffic Control
SUSE Labs Taipei
 
PDF
Hands-on ethernet driver
SUSE Labs Taipei
 
PDF
eBPF Trace from Kernel to Userspace
SUSE Labs Taipei
 
ODP
openSUSE12.2 Review
SUSE Labs Taipei
 
ODP
oS KDE Repos & MM
SUSE Labs Taipei
 
Locked down openSUSE Tumbleweed kernel
SUSE Labs Taipei
 
Multi-signed Kernel Module
SUSE Labs Taipei
 
ACPI Debugging from Linux Kernel
SUSE Labs Taipei
 
Profiling the ACPICA Namespace and Event Handing
SUSE Labs Taipei
 
Kernel debug log and console on openSUSE
SUSE Labs Taipei
 
The bright future of SUSE and openSUSE
SUSE Labs Taipei
 
eBPF maps 101
SUSE Labs Taipei
 
Convert your package to multibuild on Open Build Service
SUSE Labs Taipei
 
Ixgbe internals
SUSE Labs Taipei
 
Linux Linux Traffic Control
SUSE Labs Taipei
 
Hands-on ethernet driver
SUSE Labs Taipei
 
eBPF Trace from Kernel to Userspace
SUSE Labs Taipei
 
openSUSE12.2 Review
SUSE Labs Taipei
 
oS KDE Repos & MM
SUSE Labs Taipei
 

Recently uploaded (20)

PDF
How Open Source Changed My Career by abdelrahman ismail
a0m0rajab1
 
PPTX
The-Ethical-Hackers-Imperative-Safeguarding-the-Digital-Frontier.pptx
sujalchauhan1305
 
PDF
Oracle AI Vector Search- Getting Started and what's new in 2025- AIOUG Yatra ...
Sandesh Rao
 
PPTX
Simple and concise overview about Quantum computing..pptx
mughal641
 
PDF
The Future of Mobile Is Context-Aware—Are You Ready?
iProgrammer Solutions Private Limited
 
PDF
SparkLabs Primer on Artificial Intelligence 2025
SparkLabs Group
 
PDF
Make GenAI investments go further with the Dell AI Factory
Principled Technologies
 
PDF
Peak of Data & AI Encore - Real-Time Insights & Scalable Editing with ArcGIS
Safe Software
 
PDF
Economic Impact of Data Centres to the Malaysian Economy
flintglobalapac
 
PDF
MASTERDECK GRAPHSUMMIT SYDNEY (Public).pdf
Neo4j
 
PDF
AI Unleashed - Shaping the Future -Starting Today - AIOUG Yatra 2025 - For Co...
Sandesh Rao
 
PDF
Research-Fundamentals-and-Topic-Development.pdf
ayesha butalia
 
PDF
Get More from Fiori Automation - What’s New, What Works, and What’s Next.pdf
Precisely
 
PPTX
The Future of AI & Machine Learning.pptx
pritsen4700
 
PPTX
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
PDF
Orbitly Pitch Deck|A Mission-Driven Platform for Side Project Collaboration (...
zz41354899
 
PDF
Software Development Methodologies in 2025
KodekX
 
PPTX
Agile Chennai 18-19 July 2025 Ideathon | AI Powered Microfinance Literacy Gui...
AgileNetwork
 
PPTX
cloud computing vai.pptx for the project
vaibhavdobariyal79
 
PPTX
AI in Daily Life: How Artificial Intelligence Helps Us Every Day
vanshrpatil7
 
How Open Source Changed My Career by abdelrahman ismail
a0m0rajab1
 
The-Ethical-Hackers-Imperative-Safeguarding-the-Digital-Frontier.pptx
sujalchauhan1305
 
Oracle AI Vector Search- Getting Started and what's new in 2025- AIOUG Yatra ...
Sandesh Rao
 
Simple and concise overview about Quantum computing..pptx
mughal641
 
The Future of Mobile Is Context-Aware—Are You Ready?
iProgrammer Solutions Private Limited
 
SparkLabs Primer on Artificial Intelligence 2025
SparkLabs Group
 
Make GenAI investments go further with the Dell AI Factory
Principled Technologies
 
Peak of Data & AI Encore - Real-Time Insights & Scalable Editing with ArcGIS
Safe Software
 
Economic Impact of Data Centres to the Malaysian Economy
flintglobalapac
 
MASTERDECK GRAPHSUMMIT SYDNEY (Public).pdf
Neo4j
 
AI Unleashed - Shaping the Future -Starting Today - AIOUG Yatra 2025 - For Co...
Sandesh Rao
 
Research-Fundamentals-and-Topic-Development.pdf
ayesha butalia
 
Get More from Fiori Automation - What’s New, What Works, and What’s Next.pdf
Precisely
 
The Future of AI & Machine Learning.pptx
pritsen4700
 
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
Orbitly Pitch Deck|A Mission-Driven Platform for Side Project Collaboration (...
zz41354899
 
Software Development Methodologies in 2025
KodekX
 
Agile Chennai 18-19 July 2025 Ideathon | AI Powered Microfinance Literacy Gui...
AgileNetwork
 
cloud computing vai.pptx for the project
vaibhavdobariyal79
 
AI in Daily Life: How Artificial Intelligence Helps Us Every Day
vanshrpatil7
 

S4 sig-check-lpc-20130918

  • 1. Signature verification of hibernate snapshot September, 2013, LPC 2013, New Orleans Joey Lee
  • 2. Problem ● ● On a multi-boot machine, hacker use any hole in another UEFI trusted OS to modify the hibernate snapshot image in swap partition. Through uswsusp, userspace can take the snapshot of memory then modify it. Upload it back to memory then trigger the restore. © SUSE, All rights reserved.
  • 3. Idea ● ● ● Jiri Kosina: Let EFI bootloader generates keypair then pass to kernel for sign hibernate image. Fundamental point: Trust the boot time variable is secure when UEFI secure boot enabled. Attempt to protect snapshot image integrity. © SUSE, All rights reserved.
  • 4. Steps (when hibernate) ● ● ● ● shim bootloader geneates key-pair and put keys to non-volatile boot time varaibles. EFI stub kernel loads private key before ExitBootServices(). Hibernate subsystem copy the private key to a empty page to keep it for sign snapshot when hibernate launched. Kernel generates signature of snapshot image then put the signature to snapshot header. Current reserved max size of signature is 512 bytes. © SUSE, All rights reserved.
  • 5. Steps (when hibernate restore) ● ● After hibernate loaded snapshot image from swap to temporary memory space, kernel uses the public key from runtime volatile variable to verify the signature that's stored in snapshot header. Then depend on sig_enforce ● ● OFF: taint kernel and produce complain log when signature check fail ON: fail the hiberntae restore, then finish boot process when signature check fail. © SUSE, All rights reserved.
  • 6. How to enable sig_enforce? ● ● Use snapshot_sig_enforce kernel parameter. Set kernel config then enable UEFI secure boot: EFI_SECURE_BOOT_SNAPSHOT_SIG_ENFO RCE © SUSE, All rights reserved.
  • 7. EFI variable name and GUID ● GUID: ● ● S4SignKey [BT][NV]→ private key ● ● fe141863-c070-478e-b8a3-878a5dc9ef21 PKCS#8 _uncompressed_ private key format S4WakeKey [RT][V] → public key ● X.509 format © SUSE, All rights reserved.
  • 8. When shim should generate keys? ● ● When system boot, and shim didn't find key-pair When shim found GenS4Key EFI variable from kernel: ● ● ● GenS4Key-fe141863-c070-478e-b8a3878a5dc9ef21 [RT][NV] Kernel or userspace write GenS4Key variable to '1' when hibernate launched. Kernel will delete GenS4Key in system boot. © SUSE, All rights reserved.
  • 9. Implementation Parts ● Key-pair generator in shim ● ● ● Author: Gary Lin https://github.com/lcp/shim/tree/s4-key-upstream Asymmetric Keys in Kernel: ● ● ● Implemented PKCS#8 and PKCS#1 RSA private key parser Add signature generation API and implement signature generation logic in PKCS#1 (RFC3447 sec 8.2.2) Hibernate in Kernel: ● CONFIG_SNAPSHOT_VERIFICATION=y ● Maintain and forward private key. ● Avoid private key included in snapshot image.s ● Sign snapshot image: generate signature then put it to snapshot header. © SUSE, All rights reserved.
  • 10. Performance of hash (machine 1) ● CPU: ● ● ● Intel(R) Core(TM) i5 CPU x86_64, ssse3 Normal ● SHA1: 150.80 MB/s ● SHA256: 59.19 MB/s ● ● 650 @ 3.20GHz SHA512: 78.44 MB/s Builded ssse3 support (v3.10 later) ● SHA1: 195.60 MB/s ● SHA256: 82.76 MB/s ● SHA512: 120.60 MB/s © SUSE, All rights reserved.
  • 11. Performance of hash (machine 2) ● CPU: ● ● ● Intel(R) CPU @ 2.60GHz x86_64, ssse3, avx, avx2 Normal ● ● SHA256: 163.23 MB/s ● ● SHA1: 436.42 MB/s SHA512: 228.67 MB/s Builded ssse3, avx, avx2 support (v3.10 later) ● SHA1: 609.66 MB/s <=== fastest ● SHA256: 242.03 MB/s ● SHA512: 344.87 MB/s <=== more secure © SUSE, All rights reserved.
  • 12. Performance of hash (summary) ● Speed between SHA1, SHA256, SHA512 ● ● SHA1 is 1.8 times of SHA512 ● ● SHA1 is 2.5 times of SHA256 SHA512 is 1.4 times of SHA256 Enabled ssse3 ● ● 39% improved on SHA256 ● ● 29% improved on SHA1 53% improved on SHA512 Enabled ssse3, avx, avx2 ● 39% improved on SHA1 ● 48% improved on SHA256 ● 50% improved on SHA512 © SUSE, All rights reserved.
  • 13. Performance of hash (summary) ● Machine 1: ● Best performance – – ● SHA1: 195.60 MB/s on ssse3, avx, avx2 snapshot image grown to 3GB, then need 15.7 seconds for hash SHA512's best performance – – ● 120.60 MB/s on ssse3, avx, avx2 snapshot image grown to 3GB, then need 25.4 seconds for hash Machine 2: ● Best performance – – ● SHA1: 609.66 MB/s on ssse3, avx, avx2 snapshot image grown to 3GB, then need 5 seconds for hash SHA512's best performasnce – 344.87 MB/s on ssse3, avx, avx2 – snapshot image grown to 3GB, then need 8.9 seconds for hash © SUSE, All rights reserved.
  • 14. Patch status ● V4 RFC patches sent to kernel upstream and openSUSE kernel for reviewing: ● ● ● [RFC V4 PATCH 00/15] Signature verification of hibernate snapshot https://lkml.org/lkml/2013/9/14/183 Following kernel experts gave suggestions: ● Hibernate ● Matt Fleming <[email protected]> EFI ● ● Pavel Machek <[email protected]> Dmitry Kasatkin <[email protected]> Asymmetric keys Followed Pavel and Matt's suggestions, already fix in V2, V3 patches © SUSE, All rights reserved.
  • 15. TODO ● V5 patches: ● ● ● Implement Dmitry Kasatkin's suggestions to Asymmetric keys. Should we remove the kernel config to user for select hash algorithms? Function add: ● ● Kernel pass random number seed by EFI variable to shim. Encript snapshot image before sign it? © SUSE, All rights reserved.
  • 16. Corporate Headquarters Maxfeldstrasse 5 90409 Nuremberg Germany © SUSE, All rights reserved. +49 911 740 53 0 (Worldwide) +www.suse.com Join us on: www.opensuse.org
  • 17. 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.

Editor's Notes

  • #2: &lt;編號&gt;
  • #3: &lt;編號&gt;
  • #4: &lt;編號&gt;
  • #5: &lt;編號&gt;
  • #6: &lt;編號&gt;
  • #7: &lt;編號&gt;
  • #8: &lt;編號&gt;
  • #9: &lt;編號&gt;
  • #10: &lt;編號&gt;
  • #11: &lt;編號&gt;
  • #12: &lt;編號&gt;
  • #13: &lt;編號&gt;
  • #14: &lt;編號&gt;
  • #15: &lt;編號&gt;
  • #16: &lt;編號&gt;
  • #17: &lt;編號&gt;
  • #18: &lt;編號&gt;