A MATLAB Tool for the Analysis of Cryptographic Properties of S-Boxes by Fatima Ishfaq a Thesis Submitted in Partial Fulfillment for the Degree of Master of Philosophy

A MATLAB Tool for the Analysis of Cryptographic Properties of S-Boxes by Fatima Ishfaq a Thesis Submitted in Partial Fulfillment for the Degree of Master of Philosophy

CAPITAL UNIVERSITY OF SCIENCE AND TECHNOLOGY, ISLAMABAD A MATLAB Tool for the Analysis of Cryptographic Properties of S-boxes by Fatima Ishfaq A thesis submitted in partial fulfillment for the degree of Master of Philosophy in the Faculty of Computing Department of Mathematics 2018 i Copyright c 2018 by Fatima Ishfaq All rights reserved. No part of this thesis may be reproduced, distributed, or transmitted in any form or by any means, including photocopying, recording, or other electronic or mechanical methods, by any information storage and retrieval system without the prior written permission of the author. ii To my father for his prayers and love, for giving me the determination to overcome many trying moments to pursue my dreams. CAPITAL UNIVERSITY OF SCIENCE & TECHNOLOGY ISLAMABAD CERTIFICATE OF APPROVAL A MATLAB Tool for the Analysis of Cryptographic Properties of S-boxes by Fatima Ishfaq MMT153016 THESIS EXAMINING COMMITTEE S. No. Examiner Name Organization (a) External Examiner Dr. Umar Hayat QAU, Islamabad (a) Internal Examiner Dr. Dure Shehwar Sagheer CUST, Islamabad (b) Supervisor Dr. Rashid Ali CUST, Islamabad Dr. Rashid Ali Thesis Supervisor September, 2018 Dr. Muhammad Sagheer Dr. Muhammad Abdul Qadir Head Dean Dept. of Mathematics Faculty of Computing September, 2018 September, 2018 iv Author's Declaration I, Fatima Ishfaq hereby state that my M.Phil thesis titled \A MATLAB Tool for the Analysis of Cryptographic Properties of S-boxes" is my own work and has not been submitted previously by me for taking any degree from Capital University of Science and Technology, Islamabad or anywhere else in the coun- try/abroad. At any time if my statement is found to be incorrect even after my graduation, the University has the right to withdraw my M.Phil Degree. (Fatima Ishfaq) Registration No: MMT-153016 v Plagiarism Undertaking I solemnly declare that research work presented in this thesis titled \A MATLAB Tool for the Analysis of Cryptographic Properties of S-boxes" is solely my research work with no significant contribution from any other person. Small contribu- tion/help wherever taken has been dully acknowledged and that complete thesis has been written by me. I understand the zero tolerance policy of the HEC and Capital University of Science and Technology towards plagiarism. Therefore, I as an author of the above titled thesis declare that no portion of my thesis has been plagiarized and any material used as reference is properly referred/cited. I undertake that if I am found guilty of any formal plagiarism in the above titled thesis even after award of M.Phil Degree, the University reserves the right to with- draw/revoke my M.Phil degree and that HEC and the University have the right to publish my name on the HEC/University website on which names of students are placed who submitted plagiarized work. (Fatima Ishfaq) Registration No: MMT-153016 vi Acknowledgements All praise be to Almighty ALLAH who has been bestowing me with His great bounties and enabled me to complete my dissertation. I would like to thank my affectionate teachers, Dr. Muhammad Sagheer, Dr. Abdul Rehman Kashif, Dr. Shafqat Hussain, Dr. M. Afzal and Dr. Rashid Ali for their excellent teaching and support during these years. I would like to express my special gratitude to my supervisor Dr. Rashid Ali for his patience with me and guidance. A more supportive and considerate supervisor I could not have asked for. He was a big support and motivation in the difficult times as he encouraged and helped a lot during research and writing of thesis. I feel really blessed and proud to be his student. I truly appreciate my mother for her love and continuous support, for without her, I would not have finished my degree. I am grateful to my late father for all the prayers, who always supported me in achieving my targets. I would like to thank my sister for the motivation and my kids who are always been a sweet delight of life and helped me to be a better human. I have also had the good fortune to study with some wonderful people: Saba Majeed, Urwa Aftab, Afsheen Nazar, Maria Qamar and Sumaira Bibi who helped and encouraged me throughout my studies. Their friendships are what I will miss the most and hope to keep forever. Especially, I would like to acknowledge Ms. Saba Majeed and appreciate her friendship and contribution. My friend Zareen, your support made all the difference and I can't thank you enough for driving me towards my goal always. Finally, I am obliged to all the people who prayed for me, shared their knowledge during my degree program and supported me. \Once dust, you are now spirit. Once ignorant, now wise. He who has led you so far, will guide you further." Rumi viii Abstract Substitution boxes (S-boxes) are one amongst the crucial parts within a block cipher and play an important role in their security for being the only non-linear part of the system. Despite the fact that some old algorithms and S-boxes are still in use these days as they possess theoretically known security parameters, there is always a demand for a tool which can investigate the strength of an S-box and its corresponding boolean functions cryptographic properties. A well built tool for the analysis is also necessary when we want to create new S-boxes. Although in some cases, the common properties of S-boxes are known because of their generating algorithms but still we believe that an extensive investigation is required for all cryptographic properties. In this thesis, we present a tool for the evaluation of some key properties of Boolean functions and S-boxes suitable for cryptography. The performance indexes of S-boxes are outlined and surveyed. The corresponding numerical formulas for calculating them are discussed. Then, a code is established in MATLAB software which can not only compute the required parameters for an S-box but also for the boolean functions with large computational space GF (2n) for 2 ≤ n ≤ 20. This tool provides an in depth approach of calculation process for the user so we believe that this tool is very useful to support the researchers for the analysis and designing of S-boxes to check the security of associated symmetric encryption scheme. Contents Author's Declaration iv Plagiarism Undertakingv Acknowledgements vi Abstract viii List of Figures xi List of Tables xii Abbreviations xiii Symbols xiv 1 INTRODUCTION1 1.1 Substitution Boxes in Cryptography..................2 1.2 Why We Study S-boxes?........................3 1.2.1 Classification of S-boxes....................4 1.3 Construction of S-boxes........................4 1.3.1 History of Design Criteria of S-boxes.............5 1.4 Desirable Properties for Good S-boxes................7 1.5 Software Tools For S-box Analysis...................8 1.6 Thesis Objective............................9 2 S-boxes and their Cryptographic Properties 12 2.1 Mathematical Background....................... 12 2.1.1 Galois Field........................... 12 2.1.1.1 Representation of Galois field elements....... 14 2.1.2 Boolean Functions....................... 15 2.1.2.1 Representation of Boolean functions........ 16 2.1.3 Properties of Boolean Functions................ 18 2.2 Substitution Boxes........................... 25 2.2.1 The Rijndael S-box (AES)................... 27 ix x 2.2.1.1 Irreducible Polynomial................ 27 2.2.1.2 Affine Transformation................ 28 2.2.2 Properties of Cryptographically Strong S-boxes....... 30 3 MATLAB tool for the analysis of S-boxes 42 3.1 MATLAB tool.............................. 42 3.1.1 How to use this MATLAB code?............... 45 3.1.1.1 Requirements..................... 45 3.1.1.2 S-box Analysis MATLAB Tool (SAMT.p)..... 45 3.1.1.3 Notation........................ 51 3.2 Analysis of different S-boxes by SAMT................ 53 3.2.1 AES S-box Analysis...................... 53 3.2.2 Guo Chen S-box properties.................. 57 3.2.3 Faith and Ahmet S-box properties............... 61 3.3 Comparison of Results with SET-tool................. 65 3.4 Conclusion................................ 66 Bibliography 67 List of Figures 3.1 MATLAB Window with Editor space and Command window.... 46 3.2 MATLAB Path requirement...................... 47 3.3 Code file name in Command Window................. 48 3.4 MATLAB code Results......................... 51 xi List of Tables 2.1 Roots of primitive polynomial in GF (23)............... 14 2.2 Elements of Finite Field GF (28) with irreducible polynomial m(u) = u8 + u4 + u3 + u + 1......................... 15 2.3 Truth Table of XOR Boolean function................ 16 2.4 Truth Table of logical OR function.................. 17 2.5 One Variable Boolean Functions.................... 17 2.6 Number of Boolean Functions..................... 17 2.7 Conversion in affine cipher....................... 19 2.8 Hamming distance between two functions f and g .......... 21 2.9 Calculation of Hamming distances and Unexpected distances of f = [1 0 0 1 1 0 0 1]............................. 22 2.10 Comparison of truth tables....................... 24 2.11 (4 × 4) S-box.............................. 26 2.12 Truth Table of XOR, AND functions................. 30 2.13 S-box fixed points............................ 41 2.14 S-box opposite fixed points....................... 41 3.1 AES S-box results with SET tool and SAMT............. 65 xii Abbreviations DES Data Encryption Standard AES Advanced Encryption Standard SPN Substitution Permutation Network SAC Strict Avalanche Criterion WHT Walsh Hadamard Transform SET S-box Evaluation Tool GF Galois Field TT Truth Table ANF Algebraic Normal Form BIC Bit Independence Criterion DD Dynamic Distance xiii Symbols G Group Z Set of integers R Set of real numbers Q Rational numbers C Complex numbers V Vector space G∗ Multiplicative Group p; q Prime number Fp,Zp Finite field of order prime p Fpk Finite field extension xiv Chapter 1 INTRODUCTION Cryptography is the science of special techniques of secret writing which changes original message into a coded message with an unreadable format for its transmis- sion over the public networks in the presence of adversaries.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    87 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us