Fpga MP
Fpga MP
Milind M. Parelkar
Introduction:
Concerns over FPGA security have prompted FPGA vendors to introduce security
features like bitstream encryption into their FPGAs. For example, the Virtex II Pro family
manufactured by Xilinx has Triple-DES security embedded on the chip [6]. There are
some apprehensions as to whether only encryption of the FPGA bitstream without
bitstream authentication is sufficient to safeguard the design as well as the FPGA itself.
Bitstream encryption serves the purpose of safeguarding IP from an intruder so that your
design cannot be reverse-engineered easily. It still doesn’t prevent an attacker from
putting some gibberish bitstream on to a remotely reconfigurable FPGA which might
potentially destroy the FPGA [7]. Hence, bitstream authentication is an equally important
aspect of FPGA security as bitstream encryption.
mi
Message Data In
mo
Last Data Bit Index b MAC
Data Available
Data Read MAC Valid
Key Available
Key Read HMAC
k
Key Core
Start Data Data Write
End Data
Start Key
FIFO Full
End Key
Start
Reset
Clock
Pin Functions:
Signal Name Mode Port Function
Width
(Bits)
Message Data In IN mi Message data is input to the Core through
this port. Data is input as mi -bit blocks when
the DATA READ signal is asserted. After
the entire block of data (512 bits for SHA-1,
SHA-256 and 1024 bits for SHA-384, SHA-
512) is accepted by the core, DATA READ
is de-asserted and no Input Data is accepted
till DATA READ is asserted again.
Last Data Bit Index IN b The index of the last data bit in the last mi -
bit word should be input through this port.
This is used for message padding and
calculation of the length of the message.
b=log2(mi)
Data Available IN 1 Handshaking signal from the FIFO indicating
that Data is available for input to the core.
Data Read OUT 1 Control signal to the input FIFO in order to
read the available data word.
Key Available IN 1 Handshaking signal from the FIFO indicating
that Key is available for input to the core.
Key Read OUT 1 Control signal to the input key FIFO in order
to read the available word of key.
Key IN k The key for the MAC is input in terms of
words k-bit wide.
Start Data IN 1 A pulse on this signal indicates the beginning
of new message text to be hashed.
End Data IN 1 A pulse on this signal indicates the end of the
current message text to be hashed.
Start Key IN 1 A pulse on this signal indicates the beginning
of key being used for calculating MAC.
End Key IN 1 A pulse on this signal indicates the end of
key being used for calculating MAC.
Start IN 1 This signal indicates start of a MAC
calculation operation for a new message.
Reset IN 1 Master Reset
Clock IN 1 Master Clock
MAC OUT mo MAC is available on this port when the MAC
VALID signal is asserted. The length of the
MAC will be variable depending upon the
algorithm.
MAC Valid OUT 1 Indicates MAC is valid when asserted.
Data Write OUT 1 Control signal to the output FIFO in order to
write the available MAC output.
FIFO Full IN 1 Indicated that FIFO is full and cannot accept
any more data
The top-level entity shown above will be the common interface for all hash functions.
The length of the MAC output will be decided by the hash function used. According to
[8], the length of the MAC should be at least L/2, where L is the length of the hash output
generated by the hash function.
Circuit Operation:
All the SHA functions included in the specification of this project have similar hardware
architectures. The basic concept of all the Hash Functions is the same. All these Hash
functions process an input of arbitrary length and compress it down to a message digest
of fixed length[1,2]. HMACs provide a security feature by virtue of a secret key.
The Message Scheduler Unit accepts an input message block and processes it to produce
a message word per clock cycle. The Message Digest Unit accepts the output of the
Message Scheduler and along with other constants and some arithmetic and logical
operations produces a Message Digest after n iterative rounds. The value of n depends
upon the algorithm. n=80 for SHA-1, SHA-512 and SHA-384, whereas n=64 for SHA-
256.
Language and Tools
Language: VHDL
Tools:
• Simulator: Aldec Active-HDL v6.2, ModelSim
• Synopsis Design Compiler and related tools
• FPGA Synthesis Tools: Synplicity Synplify Pro v7.6.2, Xilinx XST v6.3
• FPGA Implementation Tools: Xilinx ISE v6.3
Testing
VHDL testbench will be used to test the operation of the circuit. Test vectors provided in
the specification for the HMACs in the NIST standard will be used to test the
functionality of the circuit[5,8].
Optimization Criteria:
The optimization criterion for implementation of bitstream authentication algorithms will
be minimum area. As mentioned earlier, the authentication core will be a part of the
FPGA fabric and hence it is fair enough that the added functionality should not lead to a
large area overhead. An area overhead ultimately results in an increase in the cost of the
chip.