Evaluation of Format - Preserving Encryption Algorithms For Critical Infrastructure Protection
Evaluation of Format - Preserving Encryption Algorithms For Critical Infrastructure Protection
EVALUATION OF FORMAT-
PRESERVING ENCRYPTION
ALGORITHMS FOR CRITICAL
INFRASTRUCTURE PROTECTION
1. Introduction
Legacy industrial control systems were developed and implemented well be-
fore the threats associated with modern networking were recognized. The trend
to interconnect industrial control systems, however, has introduced many se-
curity concerns [26]. The systems were designed for performance, reliability
and safety using proprietary hardware, software and communications protocols.
The communications protocols incorporate basic error detection and correction
functionality, but lack the secure communications capabilities required by mod-
246 CRITICAL INFRASTRUCTURE PROTECTION VIII
2. Background
Encryption is the mathematical manipulation of data in a manner that
makes it unintelligible to unauthorized parties, yet recoverable by intended
recipients [27]. Figure 1 shows the modern cryptography hierarchy. Crypto-
graphic algorithms can be categorized as symmetric or asymmetric algorithms,
also known as private-key or public-key algorithms, respectively. Symmetric
algorithms use the same key for encryption and decryption; the key must be
distributed offline or via a secure key distribution protocol. Asymmetric al-
gorithms use two keys: one for encryption and the other for decryption. One
of the keys (private key) is kept secret by one party; the other key (public
key) can be distributed openly. This resolves the problem of key distribution,
but asymmetric algorithms are typically more complex and computationally
intensive than symmetric algorithms.
Cryptographic algorithms operate as block ciphers or stream ciphers. Stream
ciphers encipher the plaintext one character at a time and concatenate the in-
dependent encryptions to produce the ciphertext. Stream ciphers are fast, but
are prone to weaknesses with regard to integrity protection and authentica-
tion [27]. On the other hand, block ciphers are slower, but their mechanisms
ensure the security properties of confusion and diffusion. Confusion means that
the key does not relate in a simple manner to the ciphertext; it refers to making
the relationship as complex as possible using the key non-uniformly through-
out the encryption process. Diffusion means that changing a single character
in the plaintext causes several characters in the ciphertext to change, and vice
versa [27]. Block ciphers are widely used in modern cryptography, and three in
particular – AES, 3DES and Skipjack – are recommended for use by NIST [6].
248 CRITICAL INFRASTRUCTURE PROTECTION VIII
AES, 3DES and Skipjack are applied to 64-bit or 128-bit blocks of data.
When AES was designed, 128-bit message blocks were commonly used for cryp-
tographic applications [22]. Messages that do not fit the prescribed block size
are padded or truncated. However, many supervisory control and data ac-
quisition (SCADA) systems used in the critical infrastructure do not permit
padding. SCADA systems traditionally use low-bandwidth links and compact
communications protocols such as Modbus and DNP3 [28]. Solutions have been
developed to retrofit security in these systems, but they often incur significant
processing and buffering overhead that cannot be tolerated in systems with
strict timing constraints [28]. A preferred solution is an algorithm that can
transform formatted data into a sequence of symbols such that the encrypted
data has the same format and length as the original data [22].
Figure 2. Feistel structure of the FF1, FF2 and FF3 algorithms [6].
FF2 Algorithm: The FF2 algorithm is derived from the VAES3 algo-
rithm proposed by Vance [29]. Figure 4 describes the FF2 algorithm,
which generates a subkey for the block cipher in the Feistel round func-
tion; this can help protect the original key from side-channel analysis [6].
FF2 differs from FF1 in that it employs a larger tweak with an indepen-
dent tweak radix to allow for additional variation in the cipher.
of the tweaks that are supported. In particular, the FF3 employs a 64-
bit tweak, which is split into right and left halves that are used to add
diffusion to odd and even encryption rounds, respectively.
test, spectral test, non-periodic templates test, overlapping template test, uni-
versal statistical test, random excursion test, random excursion variant test,
Lempel-Ziv complexity test, linear complexity test and an approximate en-
tropy test [23]. The Rijndael algorithm performed satisfactorily in all the tests
and was selected as the AES algorithm.
Since FPE algorithms are modes of operation of the underlying block cipher,
FF1, FF2 and FF3 should benefit from the statistical characteristics of AES.
This hypothesis is supported by theoretical results [13, 19, 20]. Our evaluation
uses Shannon entropy measurements to assess the security characteristics of
the three FFX algorithms. Note that entropy is a measure of unpredictabil-
ity or information content; Shannon entropy quantifies the expected value of
the information contained in a message and is typically measured in bits per
byte [27].
In addition to security performance, the computational performance of the
algorithms is an important criterion. Several metrics may be used to measure
the computational performance: encryption time, processing time and total
clock cycles per encryption [9]. The total clock cycle metric was used in this
research to evaluate the computational speed of the FF1, FF2 and FF3 algo-
rithms.
3. Experimental Design
In order to determine the security and performance of the FF1, FF2 and
FF3 algorithms for critical infrastructure assets, a set of experiments was de-
signed to test the hypothesis suggested by the algorithm designers and NIST [6]
that the algorithms inherit the strong security characteristics of the underlying
block cipher. NIST has not released details of its internal deliberations and
performance assessments.
As such, statistical tests were conducted to determine the ability of the
FPE algorithms to provide confusion and diffusion, and to output ciphertext
that is computationally indistinguishable from a random process. A dataset
containing input plaintext with varying levels of entropy was created. The
FF1, FF2 and FF3 algorithms were applied to this dataset. The algorithms
were implemented in C using the offspark AES library [18] and the entropy
of the resulting ciphertext was measured.
The second objective of our research was to evaluate the computational speed
of the three algorithms by measuring the operational latency of a hardware
implementation. This was accomplished by implementing the algorithms in
VHDL using the Xilinx ISE suite for the Virtex-6 FPGA (XC6VLX240T) [31].
A hardware-agnostic design was used to mitigate effects due to the Virtex-6
CMOS technology and Xilinx FPGA architecture. The operational latency
was estimated using the number of clock cycles between the input of plaintext
and the output of its ciphertext.
254 CRITICAL INFRASTRUCTURE PROTECTION VIII
counters. The algorithms were coded in VHDL, simulated, placed and routed,
and synthesized on a Virtex-6 (XC6VLX240T) device using the Xilinx ISE de-
sign suite. Post-PAR static timing analysis and device utilization analysis were
performed on each implementation.
The throughput, latency and hardware resource requirements are usually
the most critical parameters when evaluating a hardware implementation. Our
research evaluated the speed of each algorithm by measuring the operational
latency of an encryption cycle. To eliminate bias due to the use of a particular
FPGA technology, we estimated operational latency as the number of clock
cycles required for an algorithm to encrypt plaintext.
4.1 Security
A thirteen-byte sequence of random data obtained from Random.org served
as the control in the entropy experiment. An all-random input plaintext file
created with the sequence was determined to have an entropy of 7.996 bits/byte.
In the following analysis, the mean entropy was calculated for 20 trials of each
scenario. Note that there was no statistical significant variance between the
various trials. Figure 7 and Table 1 present the security performance of each
algorithm estimated in terms of the ciphertext entropy for each level of the
experimental factor. As expected, the entropy decreases in the plaintext as
the number of deterministic bytes increases. The input entropy ranges from
Agbeyibor, Butts, Grimaila & Mills 257
7.24 bits/byte for three deterministic bytes out of the thirteen total bytes to
4.25 bits/byte for twelve out of thirteen fixed bytes. The distribution of the
deterministic bytes, whether located in the front of the string or randomly
dispersed throughout the string, does not have a significant effect on the entropy
of the plaintext.
All three algorithms provide high levels of ciphertext security with no dis-
cernible differences in performance. In all but one scenario (12 Front), the
ciphertext is indistinguishable from a random sequence with entropy above
7.996 bits/byte. The plaintext in the 12 Front scenario with entropy of 4.256
bits/byte causes a lower entropy in the ciphertext of 7.94 bits/byte versus the
7.996 bits/byte for the random sequence. The lowered entropy presents an up-
per bound on the obfuscation capabilities of FPE. Further study is necessary
to clarify this performance limitation and categorize suitable plaintext.
The three FPE algorithms provide higher levels of entropy when the same
number of deterministic bytes are randomly distributed throughout the string in
the 12 Random scenario, These results indicate that the distribution of repeated
patterns in the plaintext affects the ability of the algorithms to obfuscate the
data more than the amount of repeated information.
4.2 Performance
The performance results shown in Table 2 indicate that the underlying AES
core is the principal factor in the area and speed of the implementation. The
AES implementation employed in the designs requires 31 clock cycles per en-
cryption and 1,864 slices (slices are the basic building blocks in an FPGA
implementation). Each slice contains a number of look up tables (LUTs) that
are used to implement AND gates, OR gates and other Boolean functions. In
addition to LUTs, slices also contain a number of registers that hold state and
are used to implement sequential logic. In the device utilization report, any slice
that is used even partially is counted towards the number of occupied slices.
A design may be fitted into fewer slices if necessary, but mapping unrelated
logic into the same slice may impact the ability to meet timing constraints [31].
258 CRITICAL INFRASTRUCTURE PROTECTION VIII
The Virtex-6 provides 18 Kb and 36 Kb blocks of RAM for storing data. Our
implementations did not require any 36 Kb RAM blocks.
The iterative looping architecture employed in the design minimizes the
hardware resources needed for each algorithm. The FF1 implementation uses
two cascaded AES blocks per round, which causes the area and number of slices
required to be approximately twice those of one AES block. FF2 makes only
one call to AES per round, but uses an additional AES block to generate the
subkey. FF3 has the smallest footprint of the three algorithms because it relies
sparingly on calls to AES.
The maximum frequency is based on the worst path delay found in the de-
sign, and it indicates the fastest frequency at which a signal may be toggled
given this constraint. A simulation test bench was used to measure to opera-
tional latency of each implementation. The numbers of clock cycles required
for completing one round and for completing an entire encryption cycle are
reported for each algorithm (Table 2). The FF1 algorithm makes two calls to
AES per round, which makes it the slowest of the three algorithms. FF2 is
faster than FF1 because of its single call to AES in its F-block. FF3 is the
fastest of the three algorithms because it uses only eight rounds. The overall
results indicate that the FF3 algorithm requires the least hardware resources
and has the lowest operational latency.
5. Conclusions
The FF1, FF2 and FF3 format-preserving encryption algorithms have im-
portant applications in critical infrastructure protection. In particular, the
algorithms could be incorporated in security modules for legacy protocols and
databases that are currently incompatible with standard cryptographic prac-
tices.
The experimental results demonstrate that algorithms are secure based on
their ability to obfuscate repetitive input data. The algorithms successfully
encipher plaintext with twelve of thirteen bytes containing a deterministic se-
quence. The three algorithms (as recommended by NIST) demonstrate the
inherited security characteristics of the underlying AES cipher.
Agbeyibor, Butts, Grimaila & Mills 259
References
[1] D. Abdul Elminaam, D. Abdul Kader and M. Hadhoud, Perfomance eval-
uation of symmetric encryption algorithms, International Journal of Com-
puter Science and Network Security, vol. 8(12), pp. 280–285, 2008.
[2] M. Bellare, P. Rogaway and T. Spies, The FFX Mode of Operation for
Format-Preserving Encryption, Report to NIST Describing the FFX Al-
gorithm, National Institute of Standards and Technology, Gaithersburg,
Maryland, 2010.
[3] J. Black and P. Rogaway, Ciphers with arbitrary finite domains, Proceed-
ings of the Cryptographer’s Track at the RSA Conference, pp. 114–130,
2002.
[4] E. Brier, T. Peyrin and J. Stern, BPS: A Format-Preserving Encryption
Proposal, National Institute of Standards and Technology, Gaithersburg,
Maryland, 2010.
[5] M. Brightwell and H. Smith, Using datatype-preserving encryption to en-
hance data warehouse security, Proceedings of the Twentieth National In-
formation Systems Security Conference, 1997.
[6] M. Dworkin, Recommendation for Block Cipher Modes of Operation:
Methods for Format-Preserving Encryption, Draft NIST Special Publica-
tion 800-38G, National Institute of Standards and Technology, Gaithers-
burg, Maryland, 2013.
[7] A. Elbirt, W. Yip, B. Chetwynd and C. Paar, An FPGA-based perfor-
mance evaluation of the AES block cipher candidate algorithm finalists,
IEEE Transactions on Very Large Scale Integration Systems, vol. 9(4), pp.
545–557, 2001.
[8] C. Finke, J. Butts and R. Mills, ADS-B encryption: Confidentiality in
the friendly skies, Proceedings of the Eighth Annual Cyber Security and
Information Intelligence Research Workshop, pp. 9–13, 2013.
260 CRITICAL INFRASTRUCTURE PROTECTION VIII
[9] T. Good and M. Benaissa, AES on FPGA from the fastest to the small-
est, Proceedings of the Seventh International Workshop on Cryptographic
Hardware and Embedded Systems, pp. 427–440, 2005.
[10] M. Luby and C. Rackoff, How to construct pseudorandom permutations
from pseudorandom functions, SIAM Journal on Computing, vol. 17(2),
pp. 373–386, 1988.
[11] M. McLoone and J. McCanny, High performance single-chip FPGA Ri-
jndael algorithm implementations, Proceedings of the Third International
Workshop on Cryptographic Hardware and Embedded Systems, pp. 65–76,
2001.
[12] B. Morris, P. Rogaway and T. Stegers, How to encipher messages on a small
domain, Proceedings of the Twenty-Ninth Annual International Conference
on Advances in Cryptology, pp. 286–302, 2009.
[13] M. Naor and O. Reingold, On the construction of pseudorandom permuta-
tions: Luby-Rackoff revisited, Journal of Cryptology, vol. 12(1), pp. 29–66,
1999.
[14] National Institute of Standards and Technology, Advanced Encryption
Standard (AES), Federal Information Processing Standards Publication
197, Gaithersburg, Maryland, 2001.
[15] National Institute of Standards and Technology, Critical Infrastructure
Protection, Gaithersburg, Maryland, 2002.
[16] National Institute of Standards and Technology, Cybersecurity Frame-
work, Gaithersburg, Maryland, 2013.
[17] B. Obama, Improving critical infrastructure cybersecurity: Executive Or-
der 13636, Federal Register, vol. 78(33), pp. 11739–11744, 2013.
[18] Offspark, offspark: Straightforward Security Communication, Rijswijk,
The Netherlands, 2014.
[19] J. Patarin, Luby-Rackoff: Seven rounds are enough for 2n(1−ε) security,
Proceedings of the Twenty-Third Annual International Conference on Ad-
vances in Cryptology, pp. 513–529, 2003.
[20] J. Patarin, Security of random Feistel schemes with five or more rounds,
Proceedings of the Twenty-Fourth Annual International Conference on Ad-
vances in Cryptology, pp. 106–122, 2004.
[21] Random.org, Random Binary File 2013-09-17, Dublin, Ireland (www.
random.org/files), 2013.
[22] P. Rogaway, A Synopsis of Format-Preserving Encryption, Voltage Secu-
rity, Cupertino, California, 2013.
[23] J. Soto, Randomness Testing of the AES Candidate Algorithms, National
Institute of Standards and Technology, Gaithersburg, Maryland, 1999.
[24] T. Spies, Feistel Finite Set Encryption Mode, National Institute of Stan-
dards and Technology, Gaithersburg, Maryland, 2008.
Agbeyibor, Butts, Grimaila & Mills 261