Managing Security in FPGA-Based Embedded Systems
Managing Security in FPGA-Based Embedded Systems
https://www.researchgate.net/publication/220651247
CITATIONS
READS
50
325
7 authors, including:
Timothy Sherwood
Ryan Kastner
SEE PROFILE
SEE PROFILE
Timothy E. Levin
Thuy D. Nguyen
SEE PROFILE
All content following this page was uploaded by Timothy E. Levin on 21 May 2014.
The user has requested enhancement of the downloaded file.
SEE PROFILE
Managing Security in FPGA-Based Embedded Systems
Ted Huffmire
Naval Postgraduate School
Brett Brotherton
Special Technologies Laboratory
Timothy Sherwood
University of California, Santa Barbara
Ryan Kastner
University of California, San Diego
external memory.
However, techniques beyond bitstream encryption
are necessary to ensure FPGA design security. To
save time and money, FPGA systems are typically
cobbled together from a collection of existing computational cores, often obtained
from third parties.
These cores can be subverted during the design phase,
by tampering with the tools used to translate the design to the cores or by
tampering with the cores themselves. Building every core and tool from scratch is
not economically feasible in most cases, and subversion can affect both third-party
cores and cores developed in-house. Therefore, embedded designers need
methods for securely composing systems comprising
both trusted and untrusted components.
Reconfigurable systems
Several examples of FPGA applications can help illustrate the utility of FPGAs,
along with the need for
increased security. We choose encryption, avionics,
and computer vision examples because these applications demand high throughput and
strong security.
We also provide background on FPGA architecture
and design flows to review the nuts and bolts of this
useful technology.
1
Motivating examples
FPGAs are a natural platform for the implementation of cryptographic algorithms,
given the large
number of bit-level operations required in modern
block ciphers. Because transformations also require
shifting or permuting bits, these operations can be
wired into the FPGA, thus incurring extremely low
overhead, and with parallelism where appropriate.
FPGA-based implementations of MD5, SHA-2, and
various other cryptographic functions have exploited
this sort of bit-level operation. Even public-key
cryptographic systems have been built atop FPGAs.
Similarly, there are various FPGA-based intrusiondetection systems (IDS).
All this work centers around exploiting FPGAs
to speed cryptographic or intrusion-detection primitives, but it is not concerned
with protecting the
FPGAs themselves. Researchers are just now starting to realize the security
ramifications of building
such systems around FPGAs.
Cryptographic systems such as encryption devices
require strong isolation to segregate plaintext (red)
from ciphertext (black). Typically, red and black
networks (as well as related storage and I/O media)
are attached to the device responsible for encrypting
and decrypting data and enforcing the security policy; this policy ensures that
unencrypted information
is unavailable to the black network.
In more concrete terms, Figure 1 shows an embedded system with its components
divided into two domains, which we have illustrated with different shading. One
domain consists of MicroBlaze0 (a processor), an RS-232 interface, and a distinct
memory partition. The other domain consists of MicroBlaze1, an
Ethernet interface, and another distinct partition of
memory. Both domains share an AES (Advanced Encryption Standard) encryption core,
and all the components are connected over the on-chip peripheral
bus (OPB), which contains policy enforcement logic
to prevent unintended information flows between domains. An authentication function
to interpret data
from a biometric iris scanner (which might be attached to the RS-232 port) could be
added to such
a layout. However, if the authentication required a
high degree of trustworthiness, the implementation
MicroBlaze0
MicroBlaze1
RS-232
interface
Authentication
module
DDR
SDRAM
AES
encryption
core
Ethernet
interface
To network
Design flow
Figure 2 shows some of the many different design
flows used to compose a single modern embedded system. The FPGA implementation
relies on several sophisticated software tools created by many different
people and organizations. Special-purpose processing
cores, such as an AES core, can be distributed in the
form of the hardware description language (HDL),
netlists (which are a list of logical gates and their interconnections), or a
bitstream. These cores can be
designed by hand, or they can be automatically generated by design tools. For
example, the Xilinx Embedded Development Kit (EDK) generates a soft microprocessor
on which C code can be executed. There
are even tools that convert C code to HDL, including
Mentor Graphics Catapult C and Celoxica.
An example of an especially complex design flow is
AccelDSP, which first translates Matlab algorithms
into HDL; logic synthesis then translates this HDL
into a netlist. Next, a synthesis tool uses a placeand-route algorithm to convert
this netlist into a bitstream, with the final result being an implementation
of a specialized signal-processing core. Security vulnerabilities can be introduced
into the life cycle inadvertently because designers sometimes leave “hooks”
(features included to simplify later changes or additions) in the finished design.
In addition, the life cycle
can be subverted when engineers inject unintended
functionality, some of which might be malicious, into
both tools and cores.
FPGA architecture
BRAM
Place
and
route
Soft
DSP
core
BRAM
Netlist
Bitstream
SRAM block
Logi c
synthesis
Place
and
route
BRAM
HDL
AccelDSP
Netlist
BRAM
Logic
synthesis
HDL
Matlab
algorithms
Soft
μP core
C code
C
Compiler
Executable
μP
BRAM
Celoxica
BRAM
BRAM
DSP
application
C code
BRAM
Matlab
DRAM
DRAM
DRAM
DRAM
DRAM
DRAM
DRAM
Hard
μP core
BRAM
Soft
μP core
DRAM
Soft
AES
core
DRAM
DRAM
DRAM
DRAM
μP
FPGA chip
Figure 2: A modern FPGA-based embedded system in which distinct cores with different
pedigrees and various trust requirements occupy the same silicon. Reconfigurable
logic, hardwired soft-processor cores, SRAM
(static RAM) blocks, and other soft IP cores all share the FPGA and the same off-
chip memory. (BRAM:
block RAM; DSP: digital-signal processing; HDL: hardware description language; µP:
microprocessor.)
Design-tool subversion
The subversion of design tools could easily result in
malicious design being loaded onto a device. For example, a malicious design could
physically destroy
the FPGA by causing the device to short circuit.
In fact, major design-tool developers have few or
no checks in place to ensure that attacks on specific functionality are not
included. However, we are
not proposing a method that makes possible the use
of subverted design tools to create a trusted core.
Rather, our methods make it possible to safely combine trusted cores, developed
with trusted tools (perhaps using in-house tools that might not be fully optimized)
with untrusted cores. FPGA manufacturers
such as Xilinx provide signed cores that embedded
designers can trust. Freely available cores obtained
• Did the manufacturer insert unintended functionality into the FPGA fabric? Was
the device
tampered with en route from the factory to the
Bitstream protection
consumer?
• Does one of the cores in the design have a flaw
(intentional or otherwise) that an attacker could
exploit? Have the design tools been tampered
with?
security
solu-
chain’s optimization functions, and the resulting designs would likely sacrifice
some measure of performance for additional security. Existing research on
trusted compilers could be exploited to minimize
the development effort. A critical function of lifecycle protection is to ensure
that the output (and
transitively the input) does not contain malicious
artifacts.8 Testing can also help ensure fidelity to requirements and common failure
modes. For example,
it should consider the location of the system’s entry
points, its dependencies, and its behavior during failure.
Life-cycle management also includes delivery and
maintenance. Trusted delivery ensures that the
FPGA has not been tampered with from manufacturing to customer delivery. For an
FPGA, maintenance includes updates to the configuration, which
can occur remotely on some FPGAs. For example,
a vendor might release an improved version of the
bitstream that fixes bugs in the earlier version.
Life-cycle management
Clearly, industry needs an approach to ensure the
trustworthiness of all the tools involved in the complex FPGA design flow. Industry
already deals with
this life-cycle management problem with software
configuration management, which covers operating
systems, security kernels, applications, and compilers. Configuration management
stores software in a
repository and assigns it a version number. The reputation of a tool’s specific
version is based on how
extensively is has been evaluated and tested, the extent of its adoption by
practitioners, and whether it
has a history of generating output with a security
flaw. The rationale behind taking a snapshot in time
of a particular version of a tool is that later versions
of the tool might be flawed. For example, because
automatic updates can introduce system flaws, it is
often more secure to delay upgrades until the new
version has been thoroughly tested.
A similar strategy is needed for life-cycle protection
of hardware to provide accountability in the development process, including control
of the development
environment and tools, as well as trusted delivery
of the chips from the factory. Both cores and tools
should be placed under a configuration management
system. Ideally, it should be possible to verify that
the output of each stage of the design flow faithfully
implements the input to that stage through the use
of formal methods such as model checking. However,
such static analysis suffers from the problem of false
positives, and a complete security analysis of a complex tool chain is not possible
with current technology, owing to the exponential explosion in the number
of states that must be checked.
An alternative is to build a custom set of trusted
tools for security-critical hardware. This tool chain
would implement a subset of the commercial tool
Secure architecture
Programmability of FPGAs is a major advantage for
providing on-chip security, but this malleability introduces unique
vulnerabilities. Industry is reluctant
to add security features to ASICs, because the editcompile-run cycle cost can be
prohibitive. FPGAs,
on the other hand, provide the opportunity to incorporate self-protective security
mechanisms at a far
lower cost.
Memory protection. One example of a runtime
security mechanism we can build into reconfigurable
hardware is memory protection. On most embedded
devices, memory is flat and unprotected. A reference
monitor, a well-understood concept from computer
security, can enforce a policy that specifies the legal
sharing of memory (and other computing resources)
among cores on a chip.9 A reference monitor is an access control mechanism that
possesses three properties: it is self protecting, its enforcement mechanisms
cannot be bypassed, and it can be subjected to analysis that ensures its
correctness and completeness.10
Reference monitors are useful in composing systems
6
them, which they call a fence.
Tags. As opposed to explicitly monitoring attempts to access memory, the ability to
track inforCore 1
Core 2
mation and its transformation as it flows through a
system is a useful primitive for composing secure systems. A tag is metadata that
can be attached to individual pieces of system data. Tags can be used as
security labels, and, thanks to their flexibility, they
can tag data in an FPGA at different granularities.
For example, a tag can be associated with an individual bit, byte, word, or larger
data chunk. Once
Core 3
this data is tagged, static analysis can be used to
Core 4
test that tags are tightly bound to data and are immutable within a given program.
Although techniques currently exist to enhance general-purpose
processor with tags such that only the most privileged
Moat CLB
Core CLB
IOB
software level can add or change a tag, automatic
methods of adding tags to other types of cores are
needed for tags to be useful as a runtime protection
Figure 3: Sample layout for a design with four cores
mechanism. Early experiments in tagged architecand a moat size of two. There are
several different
tures should be carefully assessed to avoid previous
drawbridge configurations between the cores. (IOB:
pitfalls.13
I/O block; CLB: configuration logic block.)
Secure communication. To get work done, cores
must communicate with one another and therefore
cannot be completely isolated. Current cores can
communicate via either shared memory, direct connections, or a shared bus. (RF
communication might
be possible in the future). For communication via
shared memory, the reference monitor can enforce the
security policy as a function of its ability to control
access to memory in general. For communication via
direct connections, static analysis can verify that only
specified direct connections are permitted, as we discussed earlier. Such
interconnect-tracing techniques
can be applied at both the device and board levels.
Communication via a shared bus must address several threats. If traffic sent over the
bus is encrypted,
snooping is not a problem. To address covert channels resulting from bus
contention, every core can be
given a fixed slice of time to use the bus. Although
various optimizations have been proposed, this type
of multiplexing is clearly inefficient, because a core’s
needs can change over time.
because they are small and do not require any knowledge of a core’s inner workings.
Spatial isolation. Although synthesis tools can
generate designs in which the cores are intertwined,
increasing the possibility of interference, FPGAs provide a powerful means of
isolation. Because applications are mapped spatially to the device, we can isolate
computation resources such as cores in space by
controlling the layout function,11 as Figure 3 shows.
A side benefit of the use of physical isolation of components is that it more
cleanly modularizes the system. Checks for the design’s correctness are easier
because all parts of the chip that are not relevant to
the component under test can be masked.
McLean and Moore provide similar concurrent
work.12 Although they do not provide extensive details, they appear to be using a
similar technique to
isolate regions of the chip by placing a buffer between
7
Future work
tational cores from different sources are combined using commercial tools, the
current state of embeddedsystems security leaves much to be desired. Industry and
its customers can no longer take hardware
security for granted. Clearly, embedded-design practitioners must become acquainted
with these problems and with related new developments from the
computer security research field, such as the security primitives we’ve described
here. Practitioners
must also adapt the rich body of life-cycle management tools and techniques that
have been created for
trustworthy software development and apply them to
hardware design. A path toward ensuring the security of the tools and the resulting
product is necessary to provide accountability throughout the development process.
The holistic approach to system design we’ve described here is a significant step in
that
direction.
Acknowledgments
We thank the anonymous reviewers for their comments. This research was funded in
part by National
Science Foundation grant CNS-0524771 and NSF Career grant CCF-0448654.
References
1. K. Compton and S. Hauck, “Reconfigurable
Computing: A Survey of Systems and Software,”
ACM Computing Surveys, vol. 34, no. 2, June
2002, pp. 171-210.
2. P. Schaumont et al., “A Quick Safari through
the Reconfiguration Jungle,” Proc. 38th Design
Automation Conf. (DAC 01), ACM Press, 2001,
pp. 172-177.
3. D. McGrath, “Gartner Dataquest Analyst Gives ASIC, FPGA Markets Clean
Bill of Health,” EE Times, 13 June 2005,
http://www.eetimes.com/news/latest/archive/?
archiveDate=06/18/2005.
4. R. Milanowski and M.
sourcing Poses Unique
9
11