Parallel Platform for New Secure Stream Ciphers Based on Np-Hard Problems
Total Page:16
File Type:pdf, Size:1020Kb
PARALLEL PLATFORM FOR NEW SECURE STREAM CIPHERS BASED ON NP-HARD PROBLEMS KHALED MOHAMMAD A. SUWAIS UNIVERSITI SAINS MALAYSIA 2009 PARALLEL PLATFORM FOR NEW SECURE STREAM CIPHERS BASED ON NP-HARD PROBLEMS by KHALED MOHAMMAD A. SUWAIS Thesis submitted in fulfillment of the requirements for the degree of Doctor of Philosophy JUNE 2009 ACKNOWLEDGMENT During my work on this thesis, there were many people who sincerely guided and supported me. I would like to take this opportunity to express my gratitude to all of them, for giving me the opportunity to complete this thesis. I am deeply indebted to my supervisor, Associated Professor Azman Samsudin, for his guidance during my research at School of Computer Sciences, Universiti Sains Malaysia (USM). He was always accessible and enthusiastic in research. His enthusiasm motivated me, and made my research life became smooth and rewording. I want to express my gratitude to School of Computer Sciences, Universiti Sains Malaysia and the general office staff, for supporting this study financially and morally. I would like to take this opportunity to thank my beloved parents, Mohammad and Ilham. Their unlimited support and true love had maimed the geographical distances between us. They stand by me, raised me, supported me, taught me, and love me. To them I dedicate this thesis. I would also like to thank my lovely brother Abdul Aziz and my beloved sisters Dina, Abeer and Haneen for their support and love during my study abroad. I wish to thank the person who stand by me and shared my happiness and sadness. The person who supported me and provided me with a caring environment, and unforgettable moments in Malaysia. Thank you dear Beh Bee Cheng. ii ii I would like to thank Khader Alrawajfih, Nagham Almadi and Mohammad Almadi, for being my second family in Malaysia. With them, I felt the support and shared happy and unforgettable moments during my study. Last but not least, I would like to thank my colleagues, Ibrahim, Hisham, Ali, Fazila and Hamid, for their support and help. I also want to thank my dearest frinds Mohammad Wasef, Mohammad Bakkar, Wesam Hatamleh, Mohammad Alia, Muthanna Albuldawi, Bashar Alashal, Osama Abu-Dayyeh Sarah Shalini, Adnan Hunaif Ahmad Alzoubi and Mohammad Betar for their care and support. Khaled M. Suwais iii TABLE OF CONTENTS ACKNOWLEDGMENTS ii TABLE OF CONTENTS iv LIST OF TABLES x LIST OF FIGURES xi LIST OF ABBREVIATIONS xv ABSTRAK xviii ABSTRACT xx CHAPTER ONE: INTRODUCTION 1.0 Introduction 1 1.1 NP -Hard Problems and Parallelism 5 1.2 Research Prob lem 7 1.3 Research Scope 8 1.4 Research Goal and Objectives 9 1.5 Research Contribution s 9 1.6 Research Methodology 10 1.7 Thesis Organization 13 iv iv CHAPTER TWO: STREAM CIPHERS AND PARALLELISM 2.0 Introduction 15 2.1 Stream Ciphers: Concep t and Definition 17 2.1.1 Synchronous Stream Ciphers 19 2.1.2 Asynchronous Stream Ciphers 21 2.2 Stream Ciphers: Categorization and Related Works 23 2.2.1 Hardware based Stream Ciphers 26 2.2.2 Software based Stream Ciphers 38 2.2.3 Hybrid Designs 53 2.3 Non -deterministic Polynomial Time Hard Problem ( NP -hard) 58 2.3.1 Discrete Logarithm Problem (DLP) 62 2.3.2 Elliptic Curve Discrete Logarithm Problem (ECDLP) 64 2.3.3 Shortest Vector Problem in Lattice (SVP) 67 2.3.4 Travelling Salesman Problem (TSP) 68 2.4 Parallelism in Cryptography 70 2.4.1 Methods for Parallel Computing 71 2.4.2 Current Parallelism in Cryptography 76 2.5 Summary 78 CHAPTER THREE: NP-HARD BASED STREAM CIPHERS AND PARALLEL PLATFORM 3.0 Introduction 80 3.1 Stream Ciphers Based on NP -hard Problems 80 3.1.1 Stream Ciphers Based on Elliptic Curve Discrete Log Problem 81 (ECSC-128) 3.1.1.1 Problem Definition 81 3.1.1.2 The Design of ECSC -128 85 3.1.2 Stream Cipher Based on Discrete Log Problem (DSP -128) 90 3.1.2.1 Problem Definition 90 v v 3.1.2.2 The Design of DSP -128 93 3.1.3 Stream Cipher Based on Shortest Vector Problem in Lattice 98 (LTSC-128) 3.1.3.1 Problem Definitio n 98 3.1.3.2 The Design of LTSC -128 101 3.2 The Design of the Parallel Platform 108 3.2.1 Generator Selector (GS) 109 3.2.2 Parameter Extractor (PEx) 110 3.2.3 Keystream Generator (KG) 111 3.2.4 Keystream -size Controller (K C) 113 3.2.5 Plaintext Encoder (PEn) 114 3.2.6 Detector, Controllers and Inner -Components Communications 116 3.3 Summary 131 CHAPTER FOUR: SECURITY AND PERFORMANCE ANALYSIS 4.0 Introduction 134 4.1 Implementation Issu es and Techniques 136 4.2 Stream Ciphers Performance and Security Analysis 139 4.2.1 Analyzing ECSC -128 Stream Cipher 141 4.2.1.1 Security Analysis 141 4.2.1.2 Performance Analysis 146 4.2.2 Analyzing DSP -128 Stream Cipher 148 4.2. 2.1 Security Analysis 148 4.2.2.2 Performance Analysis 152 4.2.3 Analyzing LTSC -128 Stream Cipher 153 4.2.3.1 Security Analysis 153 4.2.3.2 Performance Analysis 159 4.3 The Parallel Platform Performance and Security Analysis 161 4.3 .1 The Effect of the Parallel Platform on the Stream Ciphers Security 162 4.3.2 The Impact of the Parallel Platform on ECSC-128 Stream Cipher 162 vi vi 4.3.3 The Impact of the Parallel Platform on DSP -128 Stream Cipher 164 4.3.4 The Impact of the P arallel Platform on LTSC -128 Stream Cipher 167 4.4 Discussion 169 4.5 Summary 172 CHAPTER FIVE: CONCLUSIONS AND FUTURE WORKS 5.0 Thesis Summary 173 5.1 Future Works 174 REFERENCES 182 APPENDIX A: DIEHARD STATISTIC AL TESTS SUITE A.0 Introduction 193 A.1 Diehard Statistical Tests Description 193 A.1.1 Birthday Spacing Test 193 A.1.2 Overlapping 5 -Permutation Test 194 A.1.3 Binary Rank Test for (31×31) Matrices 194 A.1.4 Binary Rank Te st for (32×32) Matrices 195 A.1.5 Binary Rank Test for (6×8) Matrices 195 A.1.6 Bitstream Test 196 A.1.7 DNA Test 196 A.1.8 OPSO Test 196 A.1.9 OQSO Test 197 A.1.10 Count -The -1’s Test on Stream of Bytes 197 vii A.1.11 Count -The -1’s Test for Specific Bytes 198 A.1.12 Parking Lot Test 199 A.1.13 Minimum Distance Test 199 A.1.14 3Dspheres Test 200 A.1.15 Squeeze Test 200 A.1.16 Overlapping Sums Test 201 A.1.17 Run Test 201 A.1.17 Run Te st 201 APPENDIX B: ENCRYPTION RATES AND STATISTICAL RESULTS B.0 Introduction 203 B.1 Encryption Rates of the Proposed Stream ciphers 203 B.1.1 Encryption Rates of ECSC -128, DSP -128 and LTSC -128 Stream 203 Ciphers B.1.2 Encryption R ates of the Parallelized ECSC -128, DSP -128 and 204 LTSC-128 B.1.3 Effect of Multi -core Processors on Stream Ciphers Encryption 205 Rates B.1.4 Effect of Multi -core Processors on the Parallelized Stream Ciphers 205 Encryption Rates B.2 Results Obta ined from Diehard Tests 206 B.2.1 Diehard Test Results for ECSC -128 Stream Cipher 207 B.2.2 Diehard Test Results for DSP -128 Stream Cipher 209 B.2.3 Diehard Test Results for LTSC -128 Stream Cipher 211 viii APPENDIX C: GMP AND NTL LIBRARIES C.0 Introduction 213 C.1 Auxiliaries Libraries 213 C.1.1 GMP Library 213 C.1.1.1 GMP Functions Classifications 214 C.1.1.2 Using GMP 214 C.1.2 NTL Library 220 C.1.2.1 NTL: Headers and Modules 221 C.1.2.2 Using NTL 223 LIST OF PUBLICATIONS 228 ix ix LIST OF TABLES Page 2.1 Truth table of the Boolean function βββ (a1, a2) = a1a2 + a1 31 3.1 Association table between the counter, plaintext segment and 117 thread ID 3.2 Generating new counter value for encryption on each thread 12 3 3.3 Generating new counter value for decryption on each thread 12 4 4.1 p-values and conclusion for Diehard test on ECSC -128 14 2 4.2 The rounded distribution of the overall produced p-values for 14 3 ECSC-128 4.3 p-values and conclusion for Diehard test on DSP -128 148 4.4 The rounded distribution of the overall produced p-values for 148 DSP-128 4.5 p-values and conclusion for Diehard test on LT SC -128 15 4 4. 6 The rounded distribution of the overall produced p-values for 15 5 LTSC-128 B.1 Encryption rates of ECSC -128, DSP -128 and LTSC -128 on Dual - 20 0 Core and Quad-Core processors B.2 Encryption rates of the parallelized P(ECSC -128), P(DSP -128) 20 0 and P(LTSC-128) on Dual-Core and Quad-Core processors B.3 The improvement of ECSC -128, DSP -128 and LTSC -128 stream 20 1 ciphers performance on Quad-core processor B.4 The improvement of the parallelized ECSC -128, DSP -128 and 20 2 LTSC-128 stream ciphers performance on Quad-core processor B.5 List of p-values produced by Diehard tests for ECSC -128 stream 20 3 cipher B.6 List of p-values produced by Diehard tests for DSP -128 stream 20 5 cipher B.7 List of p-values produced by Diehard tests for LTSC -128 stream 207 cipher C.1 Summary of some NTL modules 218 x x LIST OF FIGURES Page 1.1 Taxonomy of Cryptology 2 1.