GCM implementations of Camellia-128 and SMS4 by optimizing the polynomial multiplier

https://doi.org/10.1016/j.micpro.2016.04.006Get rights and content

Abstract

In some scenarios, the cryptographic primitives should support more than one functionality. Authenticated Encryption/Verified Decryption (AEVD) combines encryption and authentication at the same time, which is useful in communication protocols (DNS, IPSEC, etc.). Nevertheless, authenticated encryption needs some optimizations to ensure fast performance. One solution could be the use of the Galois Counter Mode (GCM) scheme. To reach fast performances, this work broadens some GCM models described in Chakraborty et al.’s [D. Chakraborty, C. Mancillas Lopez, F. Rodriguez Henriquez, P. Sarkar, Efficient hardware implementations of BRW polynomials and tweakable enciphering schemes, Comput IEEE Trans 62 (2) (2013) 279–294, doi:10.1109/TC.2011.227] work with two changes. The first one is focused on speeding-up the polynomial multiplier necessary to perform the authentication process. That polynomial multiplier is extended for supporting four stages, based on the well-known Karatsuba–Ofman algorithm. The second one is the modification of two known block ciphers such as Camellia-128 and SMS4 with the GCM scheme. The constructed GCM is able to support variable-length messages greater than 512 bits. The throughput of the polynomial multiplier is greater than 28 Gbps for all the tested platforms. The independent block ciphers in encryption-only mode reach a throughput greater than 28 Gbps, and for all the GCM cases reported in this manuscript the throughput is greater than 9.5 Gbps.

Introduction

Several applications need to support authentication and integrity tasks. Mainly, those which need to ensure that a message has been received without modifications during the communication process. Public key cryptography might be a solution, but due to its computation cost it cannot be useful. In real application, public key cryptography is complemented with fast symmetric cryptographic primitives as we can find in the Socket Security Layer (SSL) protocol, where a stage based on public key cryptography establishes a symmetric key session and authentication of the pairs using digital certificates. After that, symmetric encryption is used to encrypt and authenticate the communication until the SSL session finishes. Then, it is necessary to develop new strategies to ensure the integrity and privacy of a message depending on a given scenario. One of them is the proposed by McGrew and Viega, denoted as Galois Counter Mode operation (GCM) [17], which offers this two services. In addition to that properties, the GCM is aimed at scenarios where speed is the main constraint to be optimized. Some examples can be found in communication systems like wired and wireless networks, optic fiber, digital TV, etc.

The main feature that the GCM schemes hold is the use of universal hashing constructed with polynomial multipliers. Their use is associated to some desirable properties: scalability and versatility. The former refers that the use of a polynomial multiplier does not increase the complexity of the complete cryptographic primitive/algorithm related to efficiency and performance. The latter means that a polynomial multiplier can be arranged into different architectures either sequential, parallel or pipeline. Additionally, the use of a key enhances the hashing properties of this scheme.

The content of this manuscript is divided as follows. Section 2 lists the different AEVD schemes. Section 3 describes the mathematical operations involved in Camellia-128 and SMS4. Section 4 refers to the typical GCM schemes. Section 5 lists works regarding Camellia-128 and SMS4 into GCM schemes and additional examples with the Advanced Encryption Standard (AES). Section 6 describes the pipeline versions of Camellia-128, SMS4 and their inclusion into the GCM scheme. Section 7 describes the results of the GCM schemes and Section 8 summarizes the conclusions of this work.

Let X and Y be binary strings, X||Y is their concatenation and |X| is the length of X in bits. A=A1A2...Am,P=P1P2...Pt and C=C1C2...Ct are associated data, plaintext and ciphertext respectively. |Aj|=|Pi|=|Ci|=n for 1 ≤ j < m, 1 ≤ i < t. For last blocks |Am| ≤ n and |Pt|=|Ct|n, they can also be treated as polynomials in GF(2n). EK(X) is the encryption of X using the underlying block cipher with key K, and the block size is n. MSBu(X) refers to the u most significant bits of X. {x}q refers to a sequence of q bits, where x ∈ {0, 1}. In this work n=128.

Section snippets

Authenticated encryption/decryption schemes, background and taxonomy

Block ciphers can encrypt/decrypt nbit messages where n is called its block-size. For real applications, messages are much greater than n bits. In this case the use of an mode of operation is necessary. The classical modes of operation of block ciphers are listed below:

  • Electronic code book (ECB). Each block of 128 bits is encrypted/decrypted independently of the rest as ECBK(P1...Pt)=EK(P1)...EK(Pt). This mode is not recommendable since the encryption of equal blocks generates the same

GCM scheme

The general way to implement GCM scheme is shown in Fig. 1, given by McGrew and Viega [17]. We know that P and C are variable-length so that both should be divided to be processed, and T is the tag. As established in the GCM standard documentation, the parameter H should be obtained as EK({0}128). Y0 is obtained from the input IV and then it is increased each time as Y0, Y1, ..., Yt, where t is the number of 128-bit blocks in P. Each Yi is then encrypted as Qi=EK(Yi) and after the result

Description of Camellia and SMS4

In this section, the description of SMS4 and Camellia are provided.

Related work

Most of the available work existing in the open literature is related to AES, formerly Rijndael. As natural consequence of being a standard, the GCM operation mode proposed by McGrew and Viega [17] considered AES as the default block cipher and the test-vectors shown in the GCM document are based on AES. Even so, McGrew and Viega established that any other block cipher can be used into the GCM operation mode. Since then, several solutions have arisen. Here, some of them are described.

Satoh

Ways of implementing Camellia-128, SMS4 and the GCM scheme

In this section, we present some ways of implementing Camellia-128 and SMS4 in pipeline versions. Additionally, the implementation of GCM is described in detail, specially the polynomial multiplier.

Results and comparisons

Previous to implement the whole GCM versions, analogous solutions were written in C language by using Intel x-86 Intrinsics. This step was performed to verify the consistency of our hardware solutions before obtaining the corresponding simulations, synthesization and statistics from the VHDL implementations. Both operations GCM encryption and decryption were tested.

Table 1 shows the obtained results for each Camellia-128 and SMS4 rounds, these results can be useful for inferring how many Slice

Conclusions

Our SMS4 GCM solution outperforms Zhao et al.’s solution [34]. On the other hand, by extending the architecture shown in Fig. 8 the KOA can be speed-up. Nevertheless, the delay should be managed carefully. That means, for headers with length less than 512 bits another strategy should be followed. Even though our result means a minimal improvement regarding Chakraborty et al.’s work (28.821 Gbps vs 28.499 Gbps), the advantage of our architecture is to receive variable messages without modify the

Acknowledgments

The authors thank to Debrup Chakraborty for his comments and support to perform this project at CINVESTAV-IPN, Zacatenco, DF, Mexico. Alberto F. Martínez-Herrera thanks to CONACyT México and Biometrics and Secure Protocols Chair (Tecnológico de Monterrey, Monterrey Campus), for their financial support to this project.

Alberto F. Martínez-Herrera From 2005 to 2009, Alberto F. Martínez-Herrera worked at Instituto Tecnológico y de Estudios Superiores de Monterrey (ITESM), Monterrey Campus, Mexico in several projects related to information security such as intrusion detection systems and applied cryptography. Currently he is finishing a Ph.D. in information technologies and communications in the same institute. His research interests have been focused on areas related to applied cryptography, network security

References (35)

  • M.N. Wegman et al.

    New hash functions and their use in authentication and set equality

    J.Comput. Syst. Sci.

    (1981)
  • K.M. Abdellatif et al.

    Efficient AES-GCM for VPNs using FPGAs

    Circuits and Systems (MWSCAS), 2013 IEEE 56th International Midwest Symposium on

    (2013)
  • K.M. Abdellatif et al.

    High speed authenticated encryption for slow changing key applications using Reconfigurable Devices

    Wireless Days (WD), 2013 IFIP

    (2013)
  • K.M. Abdellatif et al.

    FPGA-Based High Performance AES-GCM Using Efficient Karatsuba Ofman Algorithm

  • K. Aoki et al.

    Specifications of Camellia, a 128 Bits Block Cipher

    Technical Report 1

    (2001)
  • R. Bellis

    RFC 5625, DNS proxy implementation guidelines

    IETF Best Curr. Pract.

    (2009)
  • D.J. Bernstein

    The poly1305-AES message-authentication code

  • J. Black et al.

    A block-cipher mode of operation for parallelizable message authentication

  • J. Black et al.

    CBC MACS for arbitrary-length messages: the three- key constructions

    J. Cryptol.

    (2005)
  • D. Chakraborty et al.

    Efficient hardware implementations of BRW polynomials and tweakable enciphering schemes

    Comput IEEE Trans

    (2013)
  • M.J. Dworkin

    SP 800-38C. Recommendation for Block Cipher Modes of Operation: The CCM Mode for Authentication and Confidentiality

    Technical Report

    (2004)
  • R. Housley

    Using Advanced Encryption Standard (AES) CCM Mode with IPsec Encapsulating Security Payload (ESP)

    Technical Report IETF RFC 4309

    (2005)
  • T. Iwata et al.

    OMAC: one-key CBC MAC

  • Jia Huo et al.

    The design and FPGA implementation of GF(2128) multiplier for ghash

    Networks Security, Wireless Communications and Trusted Computing, 2009 (NSWCTC ’09) International Conference on

    (2009)
  • T. Kohno et al.

    CWC: ahigh-performance conventional authenticated encryption mode

  • H. Krawczyk, M. Bellare, R. Canetti, Hmac: Keyed-hashing for message authentication,...
  • J. Lu

    Attacking reduced-round versions of the SMS4 block cipher in the Chinese WAPI standard.

  • Alberto F. Martínez-Herrera From 2005 to 2009, Alberto F. Martínez-Herrera worked at Instituto Tecnológico y de Estudios Superiores de Monterrey (ITESM), Monterrey Campus, Mexico in several projects related to information security such as intrusion detection systems and applied cryptography. Currently he is finishing a Ph.D. in information technologies and communications in the same institute. His research interests have been focused on areas related to applied cryptography, network security systems (secure protocols and intrusion detection systems) and network topologies. Now he works on efficient hardware design techniques applied to cryptographic primitives and their resistance against side channel attacks.

    Cuauhtemoc Mancillas-López received the BE degree in electronic and communications engineering from ESIME-Instituto Politécnico Nacional (IPN), Mexico, in 2004, and the M.Sc. and Ph.D. degree in computer science from CINVESTAV-IPN, Mexico, in 2007 and 2013 respectively. Currently he is a post-doctoral fellow at Hubert Curien Laboratory, University of Lyon at Saint Etienne, France. His current research interests include design and analysis of provably secure symmetric encryption schemes, efficient software/hardware implementations of cryptographic primitives, and computational arithmetic.

    Carlos Mex-Perera holds a B.Sc. degree in electronics and communications engineering and a M.Sc. Degree in telecommunications. He obtained a Ph.D. degree in computer and communications security from the University of Bradford, United Kingdom in 2002. He has been with the Department of Electrical and Computer Engineering, Tecnológico de Monterrey, Campus Monterrey. His research interests encompass computer and communications security, cryptography, self-configuration and self-healing networks. He is currently combining both, research with ICT product development activities; he has involved in the creation of a number of systems and devices, such as a national DNSSEC platform in Mexico, an electronic voting machine and an ad-hoc wireless network of electrical energy meters.

    View full text