Compact Reconfigurable Architecture for Sosemanuk Stream Cipher
Total Page:16
File Type:pdf, Size:1020Kb
International Journal of Engineering and Advanced Technology (IJEAT) ISSN: 2249 – 8958, Volume-9 Issue-3, February, 2020 Compact Reconfigurable Architecture for Sosemanuk Stream Cipher Nagnath B. Hulle, Prathiba B, Sarika R Khope Sosemanuk is one of the finalists in Profile 1 (software) Abstract: Sosemanuk is word oriented synchronous stream ciphers selected for the eSTREAM Portfolio [2]. Looking at cipher capable to produce 32 bit ciphertext. It uses variable key current design platforms such as System on Chips (SoCs), it is from 128 bit to 256 bit and publically known Initialization Vector difficult to differentiate between hardware and software part (IV) of 128 bit. Sosemanuk is one of the finalists in Profile 1 of the eSTREAM Portfolio. This cipher targets to avoid structural of the system. These trends are increasing demand for properties of SNOW2.0 to improve its efficiency by reducing the hardware implementation of software based stream ciphers. internal state size. It also uses reduced round Serpent24 block Considering SOC design aspects proposed work considers cipher to provide secure and efficient key loading process. This hardware implementation of software based stream cipher paper presents compact architecture for Sosemanuk stream Sosemanuk [3]. cipher. The proposed architecture uses compact S-box This cipher is 32 bit word oriented synchronous stream architecture and compact modulo adders designed using CLA. The proposed compact S-box minimizes resources utilized without cipher designed by Come Berbain et al. [4] to use best affecting performance. Proposed modulo adder architecture properties of block and stream ciphers. It provides good minimizes resources used as compared to conventional CLA security by using combined effect of SNOW2.0 [5] stream implementation. The algorithm was designed by using VHDL cipher and Serpent block cipher [6]. Two versions of reduced language with CAD tool Xilinx ISE design suite 13.2 and round Serpent block ciphers are used in the design as implemented on Xilinx Virtex XC5VFX100E FPGA device. The proposed architecture achieved throughput of 4.281 Gbps at clock Serpent1 and Serpent24. Serpent1 is single round Serpent frequency of 133.788 MHz algorithm used at output stage during encryption and Keywords: Compact, FPGA, modulo adders, Stream Cipher, Serpent24 is 24 round Serpent algorithm used during Sosemanuk. initialization phase of Sosemanuk. This cipher uses variable key length between 128 bits to 256 bits [4]. I. INTRODUCTION Reconfigurable devices such as FPGAs are a highly New European Schemes for Signatures, Integrity and attractive option for a hardware implementation as they Encryption (NESSIE) project was started in the year 2000 to provide the flexibility of dynamic system evolution as well as identify new secure cryptographic algorithms [1]. During the the ability to easily implement a wide range of security algorithm selection process only block ciphers were functions/algorithms. It appears to be especially relevant to selected in its final portfolio. Attacks published on stream focus on high-throughput implementations for FPGA-based ciphers during this project were not practical and big question encryption [7]. rose on security of stream ciphers. The failure result of all 6 The paper is organized in following sections. Section II stream ciphers in NESSIE project evolved eSTREAM project describes the specifications and working of Sosemanuk coordinated by European Network of Excellence in stream cipher. Section III presents proposed architecture for Cryptology (ECRYPT). The project was started in year 2004 Sosemanuk stream cipher. The VLSI implementation, its to inspire new effective hardware as well as software based results are discussed in Section IV and Section V concludes stream cipher designs. This project was not a competition for the proposed work. deciding standards as in case of DES and AES, but the main focus of the project is to find auspicious stream ciphers. After II. SPECIFICATIONS AND WORKING OF rigorous security testing against various attacks, seven stream SOSEMANUK STREAM CIPHER cipher algorithms were announced in in final of eSTREAM Sosemanuk stream cipher consists of main three modules, project [2]. SNOW 2.0, Serpent24 and Serpent1 as shown in Figure 1. A. SNOW 2.0 Sosemanuk [4] uses SNOW 2.0 [5] by modifying in some Revised Manuscript Received on February 05, 2020. aspects for better security and improved performance. Linear *Corresponding Author Feedback Shift Register (LFSR) used in SNOW 2.0 consists Nagnath Bhagwat Hulle, Associate. Prof., G. H. Raisoni Institute of Engineering & Technology, Pune, India. of 16 stages each of 32 bit providing 512 bits of internal E-mail: [email protected] states. The aim of Sosemanuk is to provide 128 bit security, Prathiba B, Asst. Prof., G. H. Raisoni Institute of Engineering & Technology, Pune, India. E-mail: [email protected] Sarika R Khope, Asst. Prof., G. H. Raisoni Institute of Engineering & Technology, Pune, India. E-mail: [email protected] Published By: Retrieval Number: C5252029320/2020©BEIESP Blue Eyes Intelligence Engineering DOI: 10.35940/ijeat.C5252.029320 607 & Sciences Publication Compact Reconfigurable Architecture for Sosemanuk Stream Cipher so shorter LFSR will do the task. LFSR with length of 8 will is bitwise XOR operation be vulnerable to guess and determine attack. Internal states M is 0x54655307 hexadecimal constant value. must be ≥ 384 bits to avoid above attack. Sufficient level of ⊞ integer addition over GF(232) security is achieved by using LFSR with 10 stages and two 32 <<< 7 is bitwise rotation of 32 bit value by 7 bit bit stages are used from Finite State Machine (FSM), as R1 B. Serpent1 and R2 as shown in Figure 2. This modification in the SNOW 2.0 provides requisite security with less hardware [4]. Serpent1 is single round Serpent block cipher without key Key IV addition and linear transformation. This algorithm takes four 32 bit inputs in bitslice mode and S-Box used in this algorithm 256 128 is S2 [2, 4]. Y_2_18 C. Serpent24 Y_0_18 Y_3_12 Y_3_18 Serpent24 Y_2_24 Y_0_12 Y_1_12 Y_2_12 Y_1_18 Y_1_24 Y_1_24 Y_3_24 Serpent24 is 24 round block cipher used for initializing S9_Init S8_Init S5_Init S4_Init S3_Init S1_Init LFSR, R1 and R2. This block cipher provides secure 384 bits internal states to Sosemanuk stream cipher. Architecture of S10_Init Serpent24 is as shown in Figure 3 and this architecture R1_Init SNOW 2.0 provides initial values to all internal states Sosemanuk [2, 4]. R2_Init IV (128 bit) Key (128 bit) Padding (128 bit) FSM Out S0 Out W-8 W-7 W-6 W-5 W-4 W-3 W-2 W-1 Serpent1 Round 0 K0 W0 W1 . Keystream 18 Y3 . 18 Y2 . 18 Wi (Wi - 8 Wi 5 Wi 3 Y1 Round 12 W98 18 W99 Figure 1. Sosemanuk Block Diagram Y0 Wi 1 i) 11 k0 18 Y3 k1 18 Y2 . 18 Round 18 . α -1 Y1 18 S-boxes . Y0 α . k98 k99 S9 S8 S7 S6 S5 S4 S3 S2 S1 S0 K23 k0 k1 k2 k3 Round 23 K1 . K24 . K23 24 K24 Y3 24 Y2 24 24 24 24 24 Y3 , Y2 , Y1 , Y0 MUX Y1 24 Y0 Figure 3. Serpent24 architecture Key stream Serpent1 Working of Sosemanuk stream cipher is divided into two phases, initialization phase and working phase. R1 Trans R2 1. Initialization phase During this phase 128 bit IV and 256 bit key are applied to the Serpent24 as shown in Figure 3. Serpent24 architecture is Figure 2. Sosemanuk architecture used for secure internal state generation. Complete working of The feedback polynomial used must be as light as possible Serpent is divided into two parts, round key generation and to have improved performance. Sosemanuk uses feedback round operations. polynomial given by equation (1) and it is lighter than Round key generation part takes 256 bit key and divides it feedback polynomial used 2.0 [4]. into eight initial words. Using initial eight words on equation (3), 100 sub words are produced. (x) x10 1 x 7 x 1 F [X ] 232 (1) Wi (Wi -8Wi 5Wi 3Wi 1 i) 11 This polynomial is primitive polynomial having maximal (3) sequence of (2320-1). Where, Φ is the fractional part of the golden ratio Finite State Machine (FSM) of Sosemanuk takes input ( 5 1) / 2 or 0x9e3779b9 in hexadecimal form. from S , S , S , R and R and delivers output FSM for t > 9 7 1 1t-1 2t-1 t These 100 sub words are applied over S-boxes [6] to 0 as given by equation (2). produce 100 sub keys. These keys are concatenated to FSMt = (R [S ⊞ R ] 2t 9 1t (2) produce 25 round keys. Where, During round operations each round of serpent24 is as shown in Figure 4 and performs three tasks, round key R1 [R2 ⊞ ((S ) or (S S ))] , selection of S t t1 1 1 7 1 addition, S-box implementation and linear transformation. or (S1 or S1 S7 ) is decided by is decided by select line Working of first 24 rounds is same but last round does not (LSB (R1t-1)) of the multiplexer. uses S-box and linear transformation. R 2t-1 = Trans (R 1t-1 ) Trans (R ) = (M * R ) mod 232 7 1t-1 1t-1 Published By: Retrieval Number: C5252029320/2020©BEIESP Blue Eyes Intelligence Engineering DOI: 10.35940/ijeat.C5252.029320 608 & Sciences Publication International Journal of Engineering and Advanced Technology (IJEAT) ISSN: 2249 – 8958, Volume-9 Issue-3, February, 2020 First 24 rounds use respective round key to perform XOR 12 12 12 12 (S , S , S , S ) (Y ,Y ,Y ,Y ) operation with input data at each round. The result of XOR 7 8 9 10 3 2 1 0 operation is passed to S-boxes. The selection of S-box from 18 18 (S5 , S6 ) (Y1 ,Y3 ) S0 to S7 for each round is defined in [6] and these S-boxes are 24 24 24 24 implemented as lookup tables.