Parallelization Method of Encryption Algorithms - Springer Link

0 downloads 0 Views 265KB Size Report
representing the parallelism of algorithms. 1. Introduction. The second most important feature of encryption algorithms after the security level is the cipher speed.
Parallelization Method of Encryption Algorithms Włodzimierz Bielecki, Dariusz Burak Szczecin University of Technology, Faculty of Computer Science and Information Systems Żołnierska St. 71-210 Szczecin, Poland, tel.+48 91 449 55 61 email: [email protected], [email protected]

Abstract. An automatic parallelization method of cryptographic algorithms such as DES, Triple DES, IDEA, AES, RC5, Blowfish, LOKI91, GOST, RSA, and data encryption standard modes of operation: CTR, CBC, CFB is presented. The method is based on the data dependency analysis of loops and well-known loop parallelization techniques. The OpenMP standard was chosen for representing the parallelism of algorithms.

1. Introduction The second most important feature of encryption algorithms after the security level is the cipher speed. In the Internet era, there is extremely important to decrease the time of data encryption and decryption processes in view of a great deal of data to be encrypted and decrypted for each net user. There are various ways to increase the speed of data enciphering and deciphering. The method, presented in this paper, relies on parallelization of sequential source codes of cryptographic algorithms. There are the two different approaches to parallelize sequential algorithms: manual and automatic parallelization. The first one has serious disadvantages such as high costs and considerable time-consuming, because, in this case, there is the necessity to provide a detailed analysis of an algorithm or source code. Automatic parallelization relies on parallelization at source code compilation. Therefore, this method is fast, inexpensive and easy to use. The proposed method is a basis for creating a parallel complier devoted to parallelization of encryption algorithms. The major purpose of this paper is to present an automatic parallelization method of encryption algorithms. The paper is organized as follows. In section 2, we briefly describe encryption algorithms. Section 3 discusses an automatic parallelization method of encryption algorithms along with a parallelization process for the Blowfish algorithm, parallelization tools and a brief description of data dependences blocking the parallelization process. Section 4 contains speed-up measurements of the most time-consuming loops of encryption algorithms parallelized by means of the automatic method described in Section 3.

192

Advances in Information Processing and Protection

2. Encryption Algorithms Encryption algorithms also known as ciphers are mathematical methods (based on arithmetical, logical and binary operations) to convert a cleartext into a ciphertext (or a ciphertext into a cleartext, in the case of decryption process). There exist symmetric and asymmetric key encryption algorithms. Symmetric key encryption algorithms, known also as secret-key algorithms, use the same key for both encryption and decryption processes. The most popular symmetric-key algorithms are the following block ciphers: Data Encryption Standard (DES), Triple DES, International Data Encryption Algorithm (IDEA), and Advanced Encryption Standard (AES). A block cipher is a symmetric key encryption algorithm that transforms a fixed-length block of plaintext data into a block of ciphertext data of the same length. There are several modes of operations for symmetric key encryption algorithms. Standard modes of operation are the following: ECB, CBC, CFB, OFB and CTR. Asymmetric key encryption algorithms (also known as public key algorithms) use a different key for encryption and decryption processes and the decryption key cannot (practically) be derived from the encryption key. The most popular asymmetric-key encryption algorithm is RSA [1], [2].

3. Automatic Parallelization Method of Encryption Algorithms In the previous research works [3], [4], [5], [6], [7], [8], the authors presents manual parallelization of some cryptographic algorithms. We have finally come to the conclusion that it is possible to automatize a parallelization process of cryptographic algorithms. 3.1 Analyzed source codes Considering the fact that the most time-consuming elements of source code of cryptographic algorithms (including no I/O functions) are loops directly responsible for encryption and decryption processes, we study only such loops. Among many well-known cryptographic algorithms, we selected the most popular ones (both symmetric and asymmetric): DES, Triple DES, IDEA, AES, RC5, Blowfish, GOST, LOKI91, RSA and the standard modes of operation: ECB, CBC, CFB and CTR. The sources of these codes are presented in Appendix A. 3.2 Data Dependences There are the following basic types of the data dependences that occur in loops: - Data Flow Dependence, - Data Antidependence, - Output Dependence.

Automatic Parallelization Method of Encryption Algorithms

193

A Data Flow Dependence indicates that write-before-read ordering must be satisfied for parallel computing. The following loop yields such dependences: for(int i=0;i