YubiKey Integration For Full Disk Encryption With Pre Boot Authentication v1.2
YubiKey Integration For Full Disk Encryption With Pre Boot Authentication v1.2
YubiKey Integration For Full Disk Encryption With Pre Boot Authentication v1.2
May 7, 2012
yubico
cococo
Introduction
Yubico is the leading provider of simple, open online identity protection. The companys
flagship product, the YubiKey, uniquely combines driverless USB hardware with open
source software. More than a million users in 100 countries rely on YubiKey strong two-factor
authentication for securing access to computers, mobile devices, networks and online
services. Customers range from individual Internet users to e-governments and Fortune 500
companies. Founded in 2007, Yubico is privately held with offices in California, Sweden and
UK.
Disclaimer
The contents of this document are subject to revision without notice due to continued
progress in methodology, design, and manufacturing. Yubico shall have no liability for any
error or damages of any kind resulting from the use of this document.
The Yubico Software referenced in this document is licensed to you under the terms and
conditions accompanying the software or as otherwise agreed between you or the company
that you are representing.
Trademarks
Yubico and YubiKey are trademarks of Yubico Inc.
Contact Information
Yubico Inc
228 Hamilton Avenue, 3rd Floor
Palo Alto, CA 94301
USA
[email protected]
YubiKey Integration for Full Disk Encryption 2012 Yubico. All rights reserved. Page 2 of 24
yubico
cococo
Contents
Introduction.......................................................................................................................................... 2
Disclaimer............................................................................................................................................ 2
Trademarks ......................................................................................................................................... 2
Contact Information ............................................................................................................................. 2
1 Document Information ..................................................................................................................... 4
1.1 Purpose ................................................................................................................................... 4
1.2 Audience ................................................................................................................................. 4
1.3 References .............................................................................................................................. 4
1.4 Document History .................................................................................................................... 4
1.5 Definitions ................................................................................................................................ 5
2 Background ..................................................................................................................................... 6
3 Introduction...................................................................................................................................... 7
3.1 FDE Special Considerations ................................................................................................... 7
3.2 YubiKey Challenge-Response (HMAC-SHA1) mode ............................................................. 8
4 YubiKey two factor authentication for FDE ................................................................................... 10
4.1 Design Overview ................................................................................................................... 10
4.1.1 Assumptions ...................................................................................................................... 10
4.1.2 Important data structures .................................................................................................. 10
4.1.3 YubiKey provisioning ......................................................................................................... 11
4.1.4 Two factor Pre-Boot-Authentication process .................................................................... 14
4.1.5 Alternate security model .................................................................................................... 17
4.1.6 Multi-user support.............................................................................................................. 18
4.1.7 Support for Windows Screen Saver .................................................................................. 18
4.1.8 Backing up the Shared Secret on a Server ....................................................................... 18
4.1.9 Handling Password Change and Password Synchronization ........................................... 18
4.1.10 Enabling a user to authenticate to multiple computers ................................................. 18
4.1.11 Handling of lost/damaged/unavailable YubiKeys .......................................................... 18
5 Implementation Details .................................................................................................................. 20
5.1 YubiKey personalization library ............................................................................................. 20
5.2 YubiKey challenge-response (C-R) validation library ........................................................... 20
5.3 Third party module dependencies ......................................................................................... 22
5.4 Target platform considerations .............................................................................................. 22
6 Checklist ........................................................................................................................................ 23
YubiKey Integration for Full Disk Encryption 2012 Yubico. All rights reserved. Page 3 of 24
yubico
cococo
1 Document Information
1.1 Purpose
The purpose of this document is to describe how Yubikey USB based two-factor
authentication device can be implemented in a Preboot environment, in particular pre-boot for
Full Disk Encryption (FDE) products.
An important advantage of the proposed implementation is that it does not require any
network connectivity which is not yet commonly available in PBA environments and there are
still some situations where functionality in offline mode is required (e.g. when there is no
network coverage or on an airplane).
1.2 Audience
This document is intended for technical designers and implementers interested in
implementing a YubiKey based strong two factor Pre-Boot Authentication solution for Full
Disk Encryption products.
1.3 References
This document assumes that the reader is already familiar with the YubiKey features,
technical details and the supporting Yubico software and tools listed below: (There is however
also a short introduction to Yubikey in the Background section below.)
http://www.yubico.com/yubikey
2) The "YubiKey Manual" (which provides overview and usage information, including
Challenge-Response capabilities) and other user documentation can be found at
http://www.yubico.com/support/documentation
http://www.yubico.com/personalization-tool
http://www.yubico.com/challenge-response-tools
https://github.com/Yubico/yubikey-personalization
YubiKey Integration for Full Disk Encryption 2012 Yubico. All rights reserved. Page 4 of 24
yubico
cococo
1.5 Definitions
Term Definition
OTP One Time Password
FDE aka WDE Full Disk Encryption aka Whole Disk Encryption
PBA Pre-Boot-Authentication
DEK Disk Encryption Key
SED Self-Encrypting Drive
YubiKey Integration for Full Disk Encryption 2012 Yubico. All rights reserved. Page 5 of 24
yubico
cococo
2 Background
Yubico is a security company founded in 2007, with offices located in London, Stockholm
Sweden and in Sunnyvale California.
Yubicos mission is to make Internet identification secure, easy, and affordable for everyone.
The Company offers a physical authentication device, the YubiKey, which can be used to
provide secure authentication to resources like computing systems, web services and various
applications.
The YubiKey device from Yubico is a tiny key-sized one-button authentication device that acts
as a USB keyboard. It does not require any readers and/or drivers (unlike smart cards for
example) for its operation and works with most popular platforms and operating systems
including Windows, Unix/Linux and Mac OS.
The YubiKey is very convenient to use and friendly to the environment; weighs just 2 grams,
ultra-thin, crush-resistant, waterproof, battery-free, no moving parts and with virtually
unlimited lifetime.
The feature rich YubiKey 2.2 has two configuration slots each of which can be independently
configured in one of the following four modes of operation:
Yubico also offers supporting open source software components that can be directly used or
further extended to meet custom authentication needs.
All these factors have resulted in rapidly growing adoption of YubiKey in consumer as well as
Enterprise applications and markets.
The Challenge-Response mode newly introduced in YubiKey 2.2 opens up interesting new
opportunities of using the YubiKey based authentication in offline mode where no network
connectivity is available.
YubiKey Integration for Full Disk Encryption 2012 Yubico. All rights reserved. Page 6 of 24
yubico
cococo
3 Introduction
This Application Note explains how FDE product vendors can use some of the open source
software components offered by Yubico to quickly and easily implement YubiKey based strong
two-factor Authentication capabilities into their products. The Yubikey will be the second factor
something you have (used in combination with a User name and Password something you
know).
The document covers integration into Pre-Boot Environment that may or may not have network
access as well as briefly covers integration with the host native operating system. Yubikey One
Time Password (OTP) device operating in standard event based OTP mode (generates an
OTP each time the button on the device is pressed) requires network connection in order to get
the OTP validated by a Yubico Validation Server. However, this mode will not easily work in an
offline situation. A good way to implement a strong authentication technology that needs to
work in both online and offline (network connected and without connection) is to use so called
Challenge-Response technique (explained in detail in section 3.2 of this document). Yubikey
can be programmed to work in Challenge- Response mode (HMAC-SHA1).
Before proceeding further, it would be helpful review some FDE specific considerations.
We will now first at a high level walk through some concepts that are naturally fully known by
all FDE vendors but the walkthrough helps to understand how Yubikey needs to be
implemented in order to have a successful integration so bear with us.
FDE solutions normally encrypt all sectors on the hard disk, transparently to the native
operating system, either by the use of an encryption driver or the encryption/decryption may
be performed in hardware (in the computer chipset or on the disk itself Self Encrypting Drive
- SED). Both methods normally use a single key for encrypting sectors on the disk, the Disk
Encryption Key (DEK) for software solutions and Data Encryption Key (DEK) for SED.
Therefore, in order to gain access the computer at power up the user must successfully
authenticate to the PBA to generate (or unlock) the encryption key (DEK) and the PBA
system will provide the encryption driver with the DEK for software solutions and for
SED hardware it
PBA environments most commonly has no or limited network access capabilities and
authentication would still have to work offline so any two- factor authentication solution will
have to be self-sufficient and be able to authenticate the user without relying on a network
connection to access an authentication server.
There are various two-factor authentication options available for many commercial FDE
products. However, most of those options require installation of additional hardware e.g.
YubiKey Integration for Full Disk Encryption 2012 Yubico. All rights reserved. Page 7 of 24
yubico
cococo
smart card readers and/or special drivers. YubiKey on the other hand is simple to use and
has following distinct advantages:
The sections below will walk us through how two-factor authentication using Yubikey in
Challenge/Response mode can be implemented to work seamlessly with FDE
implementations.
Note: We did not discuss TPM (Trusted Platform Module) in the section above or below but it
is an important component that should be mentioned when discussing PBA security. A TPM
chip (currently found in more expensive business class computers) can simplified be thought
of as a smartcard built into the computers motherboard that can be used in addition to the
security methods described. A TPM chip does not replace a YubiKey; instead it complements
the YubiKey by providing yet another layer of security such as providing an integrity check of
the boot environment and more. A TPM chip cannot - unlike the YubiKey - be separated from
the computer and only YubiKey can therefore be brought from computer to computer
securing access on multiple computers using the same YubiKey and because YubiKey can
be removed from the computer when not used it adds a significant hurdle for anyone trying to
gain access to the computer if the computer is lost or stolen.
The following diagram illustrates the working of YubiKey 2.2 in Challenge- Response HMAC-
SHA1 mode.
YubiKey Integration for Full Disk Encryption 2012 Yubico. All rights reserved. Page 8 of 24
yubico
cococo
Please refer to the following links for additional technical details on YubiKey Challenge-
Response mode and the COM API:
http://static.yubico.com/var/uploads/pdfs/YubiKey_Manual_2010-09-16.pdf
http://www.yubico.com/challenge-response-tools
YubiKey Integration for Full Disk Encryption 2012 Yubico. All rights reserved. Page 9 of 24
yubico
cococo
4 YubiKey two factor authentication for FDE
4.1.1 Assumptions
1. A Pre-Boot-Authentication module is already implemented by the FDE vendor
2. The PBA module is written in a programming language that can interface with standard C
libraries provided by Yubico
3. The PBA module is responsible for handling the encryption and validating the integrity of
important secret parameters required by Yubico libraries.
YubiKey Integration for Full Disk Encryption 2012 Yubico. All rights reserved. Page 10 of 24
yubico
cococo
4.1.3 YubiKey provisioning
An important and first step in the process is to provision and assign a YubiKey to a user.
When a YubiKey is assigned to a user for PBA, the following steps will be performed and a
new User Authentication Record (Figure 3 above) will be created and stored in the User
Authentication Database (Figure 4 above):
YubiKey Integration for Full Disk Encryption 2012 Yubico. All rights reserved. Page 11 of 24
yubico
cococo
The following high-level flow diagrams summarize the description below.
YubiKey Integration for Full Disk Encryption 2012 Yubico. All rights reserved. Page 12 of 24
yubico
cococo
YubiKey Integration for Full Disk Encryption 2012 Yubico. All rights reserved. Page 13 of 24
yubico
cococo
Thereafter it will prompt the user for User ID, PIN and YubiKey.
Once the user provides the above inputs the following checks will be performed:
YubiKey Integration for Full Disk Encryption 2012 Yubico. All rights reserved. Page 14 of 24
yubico
cococo
1. A specific User Authentication Record will be identified based on the User ID
provided by the user
3. The Challenge will be presented to the YubiKey using YubiKey personalization library
APIs and a Response will be received. Based on the implementation choice of the
vendor the user may be required to touch the YubiKey button to generate a
Response when the Challenge is presented.
4. The Response will be used to decrypt the encrypted portion of the User
Authentication Record and if the Checksum matches, the decrypted DEK is
successfully retrieved. A new sequence number will be calculated (either
incremented by 1 or selecting a new random value). Please note, instead of the
Checksum, FDE vendors can naturally choose to implement a cryptographic hash
algorithm or simply use a known value that when decrypted is used to verify
successful decryption of the encrypted portion of the User Authentication Record.
5. Steps 7 through 9 described in section 4.1.3 above will be repeated and the User
Authentication Record in the User Authentication Database will be updated
and saved in PBA secure permanent storage.
6. The PBA module will perform its own authentication check on the User ID +
PIN/Password provided by the user and if successful, the PBA process will use the
decrypted DEK to continue with the native OS boot process.
YubiKey Integration for Full Disk Encryption 2012 Yubico. All rights reserved. Page 15 of 24
yubico
cococo
YubiKey Integration for Full Disk Encryption 2012 Yubico. All rights reserved. Page 16 of 24
yubico
cococo
This applies always when the User Authentication Records are stored on a permanent
storage and most of the times when the User Authentication Database is loaded in the
memory during the PBA process. However, there is still a brief interval of time when the key is
held un-encrypted in computer memory (RAM) (Refer to Step 8 in Section 4.1.3 and to Step 6
in Section 4.1.4 above).
YubiKey Integration for Full Disk Encryption 2012 Yubico. All rights reserved. Page 17 of 24
yubico
cococo
The advantage of this scheme isthat when updating the User Authentication Record in Step
6 of Section 4.1.4 above, the YubiKey authentication module does not send the new
Challenge to the YubiKey thereby leaving no scope for USB man-in-the-middle (MIM) attack.
Several challenges and responses can be pre-calculated in advance in order to make the
challenge appear to be random.
YubiKey Integration for Full Disk Encryption 2012 Yubico. All rights reserved. Page 18 of 24
yubico
cococo
The following diagram illustrates some of these concepts applicable in an enterprise
deployment.
YubiKey Integration for Full Disk Encryption 2012 Yubico. All rights reserved. Page 19 of 24
yubico
cococo
5 Implementation Details
This section explains the software modules offered by Yubico, external dependencies and
related implementation details that can be used for implementation of YubiKey support.
The high-level flow diagrams in the previous chapter used color coding for various functions to
visually depict the containers for those functions.
Blocks with white background are typically implemented in the PBA module by the FDE
vendor
Blocks with green background come from a Crypto library explained later in this
chapter
Blocks with blue background come from YubiKey-personalization library explained later
in this chapter
Finally blocks with yellow background are the ones that will be implemented as
YubiKey Challenge-Response validation library by FDE vendor for YubiKey PBA
integration.
1. At the time of user provisioning for programming a YubiKey in C-R HMAC SHA1
mode with the shared secret
2. At the time of PBA process, present a challenge and receive a response from the
YubiKey
FDE vendor should implement the following functions in the YubiKey C-R validation library:
(Note: This section provides only a guideline by listing high-level set of functions that can be
implemented in such a library and does not present a comprehensive list which will depend
on the FDE vendor and product specific details.)
YubiKey Integration for Full Disk Encryption 2012 Yubico. All rights reserved. Page 20 of 24
yubico
cococo
1. Initialization
This function accepts inputs parameters from the calling module (e.g. from PBA module
for Pre-Boot-Authentication or Windows for authenticating a user when screen saver is
active). Some important input parameters are:
a. User Authentication Database
b. System Specific Data
c. Call back function to be called when the User Authentication Database is updated
and needs to be stored in the PBA secure permanent storage (the User Auth.
Database gets updated in cases such as successful user authentication, User
Authentication Record is created or deleted etc.)
2. Provision new User and YubiKey
This function accepts User ID, PIN and a YubiKey to be inserted in a USB port. If User ID
and PIN are valid, the YubiKey is programmed in C-R HMAC-SHA1 mode and a new
User Authentication Record is created.
This function accepts User ID, PIN, DEK, Shared Secret and System Specific Data and
creates a new User Authentication Record
4. Validate YubiKey
This function accepts inputs parameters from the calling module and validates if the User
is using the same YubiKey assigned to the user. Some important input parameters are:
a. User ID
b. PIN
5. Change Password
This function updates the User Authentication Record in case a user changed PBA
PIN/Password. Please note that this function is not responsible of validating the
PIN/Password policy enforcements and confirmation of new password etc. which would
be the responsibility of PBA module developed by the FDE vendor.
a. User ID
b. Original Password
c. New Password
This function is responsible for synchronizing the User Authentication Database (or
relevant parts of it) with the central management Server. This function should identify any
new User Authentication Records created and report them to the server and accept the
records provided by the server and add them to the local User Authentication Database
for the users provisioned on the current computer.
7. Terminate
This function terminates the current active session with the calling module; the PBA is
notified to store the array of user records and then all internal data structures are
released.
YubiKey Integration for Full Disk Encryption 2012 Yubico. All rights reserved. Page 21 of 24
yubico
cococo
5.3 Third party module dependencies
In most cases the FDE vendors will already have a supporting crypto library that is capable of:
In case a library is not available from the vendor, several open source C implementations are
available for the above functions.
Vendors currently looking for a FIPS validated library are encouraged to consider OpenSSL
project (www.openssl.org), which is a free library.
YubiKey Integration for Full Disk Encryption 2012 Yubico. All rights reserved. Page 22 of 24
yubico
cococo
6 Checklist
The checklist in this section lists important considerations and design decisions to be made
when implementing YubiKey two factor authentication for FDE Pre-Boot-Authentication so that
YubiKey integration is a well though-out and functions smoothly.
The information in the checklist should also be used when registering the solution on the
Yubico Wiki Partner page. It will help customers to quickly get an overview how the YubiKey
implementation has been carried out in order for them to gage how well this solution to work
with other YubiKey enabled solutions and applications that they may already use or planning to
use.
YubiKey Integration for Full Disk Encryption 2012 Yubico. All rights reserved. Page 23 of 24
yubico
cococo
same Username, PW
and YubiKey
YubiKey Integration for Full Disk Encryption 2012 Yubico. All rights reserved. Page 24 of 24