Rutter, N. 2015 (12Mth).Pdf
Total Page:16
File Type:pdf, Size:1020Kb
Implementation and Analysis of the Generalised New Mersenne Number Transforms for Encryption Nick Rutter Newcastle University Newcastle upon Tyne, UK. A thesis submitted for the degree of Doctor of Philosophy October 2015 Declaration I declare that this thesis is my own work and it has not been previously submitted, either by me or by anyone else, for a degree or diploma at any educational institute, school or university. To the best of my knowledge, this thesis does not contain any previously published work, except where another person's work used has been cited and included in the list of references. Nick Rutter I dedicate this thesis to my family for all of their support and inspiration; in particular Yingpei Li Rutter, Lucy Li Rutter, Jackie Rutter and especially Donald Rutter (1920 | 2010), who inspired me with his invaluable involvement with the Bombe and encouraged me to pursue this area of research. With all my love. Acknowledgements First and foremost, I would like to express my sincere gratitude to my first supervisor, Prof. Said Boussakta, for the opportunity to undertake this Ph.D. study and research and along with my second supervisor, Dr. Alex Bystrov with his abundance of patience, enthusiasm and motivation. For identifying key areas requiring attention within this thesis, I would especially like to express my appreciation to Prof. Ahmed Bouridane and Dr. Charalampos Tsimenidis. I would like to thank all the other members of staff that I have had the pleasure to know and work with, particularly Dr. Martin Johnson, Dr. Patrick Degenaar and Prof. Patrick Briddon. Dr. Johnston has provided me with significant support during my time undertaking my research, including his guidance in pursuing additional areas of research and the opportunity to be involved as co-investigator in two projects: KH148843 and KH135892. Dr. Degenaar gave me the impetus to pursue research in general-purpose graphics processing unit computing from his involvement with his own research, which profoundly sparked my interest in techniques and development in this exciting area of computation. Prof. Briddon shared my enthusiasm for parallel processing and we frequently discussed ideas and techniques. I would also like to acknowledge all those who that have supported me in any respect during the completion of the project; especially my family for their continual support. Finally, I would like to thank the European Physical Science Research Council (EPSRC) for financing this research under grant number EP/P50502X/1. Abstract Encryption is very much a vast subject covering myriad techniques to conceal and safeguard data and communications. Of the techniques that are available, methodologies that incorporate the number theoretic transforms (NTTs) have gained recognition, specifically the new Mersenne number transform (NMNT). Recently, two new transforms have been introduced that extend the NMNT to a new generalised suite of transforms referred to as the generalised NMNT (GNMNT). These two new transforms are termed the odd NMNT (ONMNT) and the odd-squared NMNT (O2NMNT). Being based on the Mersenne numbers, the GNMNTs are extremely versatile with respect to vector lengths. The GNMNTs are also capable of being implemented using fast algorithms, employing multiple and combinational radices over one or more dimensions. Algorithms for both the decimation-in-time (DIT) and -frequency (DIF) methodologies using radix-2, radix-4 and split-radix are presented, including their respective complexity and performance analyses. Whilst the original NMNT has seen a significant amount of research applied to it with respect to encryption, the ONMNT and O2NMNT can utilise similar techniques that are proven to show stronger characteristics when measured using established methodologies defining diffusion. Analyses in diffusion using a small but reasonably sized vector-space with the GNMNTs will be exhaustively assessed and a comparison with the Rijndael cipher, the current advanced encryption standard (AES) algorithm, will be presented that will confirm strong diffusion characteristics. Implementation techniques using general-purpose computing on graphics processing units (GPGPU) have been applied, which are further assessed and discussed. Focus is drawn upon the future of cryptography and in particular cryptology, as a consequence of the emergence and rapid progress of GPGPU and consumer based parallel processing. vii Contents Nomenclature xxi List of Symbols xxv 1 Introduction 1 1.1 Motivation . 1 1.2 Aims and Objectives of the Thesis . 3 1.3 Contributions . 4 1.4 Publications Arising From This Research . 5 1.5 Thesis Outline . 5 2 Background 7 2.1 Introduction . 7 2.2 Encryption Applications . 7 2.3 Encryption Types . 9 2.3.1 Symmetric Keys . 9 2.3.2 Asymmetric Keys . 10 2.3.2.1 Factorisation Problem . 11 2.3.2.2 Discrete Logarithm Problem . 12 2.3.2.3 Diffie-Hellman Key Exchange . 13 2.3.2.4 ElGamal Encryption . 14 2.3.2.5 Elliptic Curve Discrete Logarithm Problem . 14 2.4 Cipher Types . 20 2.4.1 Stream Ciphers . 20 2.4.1.1 A5/1 . 21 2.4.2 Block Ciphers . 22 2.4.2.1 Substitution Boxes . 22 ix CONTENTS 2.4.2.2 Permutation Boxes . 23 2.4.2.3 Feistel Networks . 23 2.4.2.4 Transforms . 24 2.4.2.5 Data Encryption Standard . 24 2.4.2.6 Advanced Encryption Standard . 28 2.5 Mode Types . 29 2.5.1 Electronic Code Book . 30 2.5.2 Cipher Block Chaining . 30 2.5.3 The Initialisation Vector and Streams . 32 2.5.4 Cipher Feedback . 32 2.5.5 Output Feedback . 33 2.5.6 Counter . 33 2.6 Hashes . 34 2.7 General Purpose Graphics Processing Unit Processing . 35 2.8 Conclusion . 36 3 The Generalised New Mersenne Transform 39 3.1 Introduction . 39 3.2 The NMNT . 40 3.3 The ONMNT . 42 3.4 Odd-Squared-NMNT (O2NMNT) . 44 3.5 Derivation of Transform Parameters . 49 3.6 Cyclic Convolution of the GNMNT . 50 3.6.1 Cyclic convolution of NMNT . 50 3.6.2 Cyclic convolution of ONMNT . 54 3.6.3 Cyclic convolution of O2NMNT . 57 3.7 Encryption Example using the GNMNT . 60 3.7.1 Encryption using the NMNT . 62 3.7.2 Encryption using the ONMNT . 64 3.7.3 Encryption using the O2NMNT . 64 3.7.4 Encryption using the GNMNT . 65 3.8 The GNMNT Kernel Components . 66 3.8.1 The NMNT Kernel Components . 67 3.8.2 The ONMNT Kernel Components . 69 x CONTENTS 3.8.3 The O2NMNTKernel Components . 69 3.8.4 Proving the Detriments of Zero-Elements within the GNMNT 73 3.8.5 Demonstration of the Proof . 76 3.9 Conclusion . 77 4 Fast Algorithms of the GNMNT 79 4.1 Introduction . 79 4.2 Radix-2 ONMNT . 79 4.2.1 Radix-2 DIT . 80 4.2.2 Radix-2 DIF . 83 4.3 Radix-4 ONMNT . 85 4.3.1 Radix-4 DIT . 86 4.3.2 Radix-4 DIF . 90 4.4 Split-Radix ONMNT . 96 4.4.1 Split-Radix DIT . 97 4.4.2 Split-Radix DIF . 99 4.5 Complexity Analysis . 102 4.5.1 Higher Radices of the GNMNT . 108 4.6 Performance Analysis of the One-Dimensional Derivations . 109 4.7 Conclusion . 111 5 The Row-Column GNMNT 113 5.1 Introduction . 113 5.2 RC-NMNT . 114 5.3 RC-ONMNT . 118 5.4 RC-O2NMNT . 123 5.5 Complexity Analysis . 125 5.6 The 2D Cyclic Convolution for the GNMNT . 129 5.6.1 Cyclic Convolution for the 2D-NMNT . 129 5.6.2 Cyclic Convolution for the 2D-ONMNT . 130 5.6.3 Cyclic Convolution for the 2D-O2NMNT . 131 5.6.4 Verification using Cyclic Convolution . 131 5.7 Encryption Applications . 136 5.7.1 RC-GNMNT Implementations . 137 xi CONTENTS 5.7.1.1 RC-NMNT . 138 5.7.1.2 RC-ONMNT . 139 5.7.1.3 RC-O2NMNT . 140 5.7.1.4 Comparison of RC-Encryption Characteristics . 141 5.7.2 2D-GNMNT Implementations . 142 5.7.2.1 2D-NMNT . 143 5.7.2.2 2D-ONMNT . 143 5.7.2.3 2D-O2NMNT . 144 5.7.2.4 Comparison of 2D-Encryption Characteristics . 144 5.7.3 Imposing a Single-Bit Error using the RC- and 2D-GNMNT . 145 5.8 Conclusion . 152 6 The Avalanche Effect of the GNMNT 155 6.1 Introduction . 155 6.2 The Strict Avalanche Criterion . 155 6.3 Methodology . 156 6.3.1 Applying and Testing the SAC . 156 6.3.2 AES Implementation . 160 6.3.3 GNMNT Implementation . 161 6.4 Assessing the Default Configuration . 161 6.4.1 Assessing the AES . 163 6.4.2 Assessing the NMNT . 165 6.4.3 Assessing the ONMNT . 166 6.4.4 Assessing the O2NMNT . 166 6.5 Assessing the Modified Configuration . 167 6.5.1 Assessing the NMNT (Shuffled) . 167 6.5.2 Assessing the ONMNT (Shuffled) . 168 6.5.3 Assessing the O2NMNT (Shuffled) . 168 6.5.4 Exhaustive Analysis of the GNMNT . ..