Analysis and Design of Message Authentication Codes Shahram Bakhtiari Bakhtiari Haft Lang University of Wollongong
Total Page:16
File Type:pdf, Size:1020Kb
University of Wollongong Research Online University of Wollongong Thesis Collection University of Wollongong Thesis Collections 1998 Analysis and design of message authentication codes Shahram Bakhtiari Bakhtiari Haft Lang University of Wollongong Recommended Citation Bakhtiari Haft Lang, Shahram Bakhtiari, Analysis and design of message authentication codes, Doctor of Philosophy thesis, School of Information Technology and Computer Science, University of Wollongong, 1998. http://ro.uow.edu.au/theses/2003 Research Online is the open access institutional repository for the University of Wollongong. For further information contact the UOW Library: [email protected] T TNIVERSITY \\ 70LLONGONG Analysis and Design 01 Message Autnentication Codes A thesis submitted in fulfillment of the requirements for the award of the degree Doctor of Philosophy from UNIVERSITY OF WOLLONGONG by Shahram Bakhtiari Haft Lang, MSc School of Information Technology and Computer Science February 1998 © Copyright 1998 by Shahram Bakhtiari Haft Lang, MSc All Rights Reserved ii Dedicated to my wife iii Declaration This is to certify that the work reported in this thesis was done by the author, unless specified otherwise, and that no part of it has been submitted in a thesis to any other university or similar institution. Shahram Bakhtiari Haft Lang, MSc February 1998 iv Abstract Analysis and Design of Message Authentication Codes Shahram Bakhtiari Haft Lang School of Information Technology and Computer Science University of Wollongong Message Authentication Codes (MACs) play an important role in today's infor mation communication. Messages which are sent over an insecure channel need to be authenticated to prevent attacks such as message forgery by an intruder who can tamper with the channel. To provide message authenticity, assuming that the transmitter and the receiver share a secret key, a MAC can be used. In a MAC system, the transmitter generates a tag which is a function of the message and the secret key, and appends it to the message before sending it over the channel. The receiver can verify the authenticity of a received message, on the other end of the channel, by recomputing the tag and comparing it with the appended one. In analysis and design of MACs two different approaches, known as unconditional security and computational security, can be used. The aim of this thesis is to study the existing MAC systems and propose new constructions which are more efficient and meanwhile maintain the required security. We justify the security of our proposed constructions using computational security and unconditional security approaches. We also propose a new definition for keyed hash functions and relate them to MACs. Finally, we cryptanalyze two proposed collisionful hash functions. v Thesis Related Publications 1. Shahram Bakhtiari, Reihaneh Safavi-Naini, and Josef Pieprzyk, "Practical and Secure Message Authentication," in Series of Annual Workshop on Selected Areas in Cryptography (SAC '95), pages 55-68, School of Computer Science, Carlton University, May 1995. 2. Shahram Bakhtiari, Reihaneh Safavi-Naini, and Josef Pieprzyk, "Cryptographic Hash Functions: A Survey," Technical Report 95-09, Department of Computer Science, University of Wollongong, July 1995. 3. Shahram Bakhtiari, Reihaneh Safavi-Naini, and Josef Pieprzyk, "Keyed Hash Functions," in Cryptography: Policy and Algorithms Conference, volume 1029 of Lecture Notes in Computer Science (LNCS), pages 201-214, Springer-Verlag, July 1995. 4. Shahram Bakhtiari, Reihaneh Safavi-Naini, and Josef Pieprzyk, "On Selectable Collisionful Hash Functions," in Australian Conference on Information Secu rity and Privacy (ACISP '96), volume 1172 of Lecture Notes in Computer Science (LNCS), pages 287-298, Springer-Verlag, June 1996. 5. Shahram Bakhtiari, Reihaneh Safavi-Naini, and Josef Pieprzyk, "Password- Based Authenticated Key Exchange using Collisionful Hash Functions," in Australian Conference on Information Security and Privacy (ACISP '96), volume 1172 of Lecture Notes in Computer Science (LNCS), pages 299-310, Springer-Verlag, June 1996. 6. Shahram Bakhtiari, Reihaneh Safavi-Naini, and Josef Pieprzyk, "On the Weak nesses of Gong's Collisionful Hash Function," Journal of Universal Computer Science, volume 3, pages 185-196, March 1997. vi 7. Shahram Bakhtiari, Reihaneh Safavi-Naini, and Josef Pieprzyk, "A Message Authentication Code based on Latin Squares," in Australian Conference on Information Security and Privacy (ACISP '97), volume 1270 of Lecture Notes in Computer Science (LNCS), pages 194-203, Springer-Verlag, July 1997. 8. Reihaneh Safavi-Naini and Shahram Bakhtiari, "MRD Hashing and its appli cation to Shared Generation of MAC," Technical Report 97-02, Department of Computer Science, University of Wollongong, August 1997. vii Acknowledgement There are many people and organisations who deserve to be acknowledged in this thesis. I would like to first thank my supervisor, Associate Professor Reihaneh Safavi-Naini, for her support and interest in this thesis. I also thank my co- supervisor, Associate Professor Josef Pieprzyk, who assisted me in parallel with my supervisor. The main source of the financial support for this work was the Ministry of Culture and Higher Education (MCHE), Iran, which deserves to be acknowledged here. I wish to thank all the staff in the Centre for Computer Security Research and the school of IT and CS, for their help and assistance. Finally, I thank my wife and dedicate this thesis to her, for bearing all the difficulties during my PhD program and also encouraging me all the time to reach to this point. viii Contents Abstract v Thesis Related Publications V1 Acknowledgement V111 1 Introduction 1 1.1 Aims and Objectives 1 1.2 Structure of Thesis and its Contributions 2 1.3 Notations and Abbreviations 4 2 A Survey on Message Authentication Codes 6 2.1 Introduction 6 2.1.1 Security Approaches 7 2.2 Cryptographic Hash Functions 10 2.3 Keyed Hash Functions 12 2.3.1 Keyed Hash Functions as Primitives 15 2.4 Collisionful Hash Functions 17 2.5 Hash Function Families and Unconditionally Secure MACs 18 2.6 Methods of Attack on MACs 22 2.7 MAC Constructions 26 2.7.1 Construction from Existing Hash Functions 27 2.7.2 Construction from Block Ciphers 29 2.7.3 Construction from Scratch 30 2.8 Summary 30 3 Design of Practical MACs 32 3.1 Introduction 32 IX 3.2 Construction of Keyed Hash Functions 33 3.2.1 Tsudik's Proposed Methods 34 3.2.2 The Improved Method (Using Small Key) 36 3.2.3 Security Analysis of the Proposed Method 38 3.3 A New Construction for a Fast and Secure MAC 40 3.3.1 Description of the Algorithm 41 3.3.2 Properties of the Designed MAC 45 3.3.3 Implementation of the Proposed MAC 46 3.3.4 Security Analysis of the MAC 46 3.4 Summary 47 Design of Unconditionally Secure MACs 49 4.1 Introduction 49 4.2 Previously Proposed Wegman-Carter based MAC Constructions ... 50 4.3 A MAC Construction based on Latin Squares 53 4.3.1 Background on Latin Squares 53 4.3.2 Towards Constructing an e-AU2 Family 54 4.3.3 An Example 59 4.3.4 Defining a New MAC 61 4.3.5 Implementation 61 4.4 Construction of a MAC based on MRD Codes 64 4.4.1 Background on MRD Codes and Finite Fields 64 4.4.2 Constructing an e-AU2 Family based on MRD Codes 69 4.4.3 Defining a New MAC 71 4.5 Summary 72 On the Security of Collisionful Hash Functions 74 5.1 Introduction 74 5.2 Gong's Selectable Collisionful Hash Function 75 5.2.1 Description of Gong's Method 75 5.2.2 Attacking Gong's Method 77 5.2.3 Practical Results of the Attack 82 5.2.4 Securing the Method 83 5.3 Anderson and Lomas' Password-Based Authenticated Key Exchange . 86 5.3.1 Difne-Hellman Key Exchange 87 x I 5.3.2 Anderson and Lomas' Scheme 87 5.3.3 Attacking Anderson and Lomas' Scheme 89 5.3.4 Probability of Success 90 5.3.5 Optimal Choice of m 92 5.3.6 Alternative Solutions for Password-Based Authenticated Key Exchange 94 5.4 Summary 98 6 Conclusion and Further Work 100 6.1 Summary of Issues and Results 100 6.2 Fulfilment of Aims and Objectives 101 6.3 Further Work and Open Problems 102 Bibliography 104 A Source Code for KHF 117 A.l KHF.C 117 A.2 KHF.H1 124 A.3 KHF.H2 127 B Source Code for our Latin Square Based MAC 130 B.l LS-MAC.CPP 132 B.2 LS.CPP 134 B.3 LS.H 135 C Experimental Results for the Latin Square based MAC 137 D Some Improvements in the Designed MAC 144 xi List of Tables 1.1 Notations 5 1.2 Abbreviations 5 3.1 Speed comparison between the proposed MAC and MD5 46 4.1 The 64 steps of the LS hashing example 62 4.2 Conjugate groups with minimal and linearised minimal polynomials . 71 4.3 Parameters for the designed MAC based on MRD codes when n < 19 72 5.1 Implementation results of the attack on Gong's basic scheme 83 5.2 Implementation results of the attack on Gong's extended scheme ... 83 5.3 Implementation results of the attack on Anderson and Lomas' protocol 90 5.4 Expected values ex to e^ for three steps of the attack 93 5.5 Results of three steps of the attack on the extended protocol 94 5.6 Expected values for three steps of the attack on the extended protocol 96 C.l Isotopy classes of Latin squares 138 C.2 Experimental results for finding the mapping collisions 141 xii 1 List of Figures 2.1 The efficiency comparison between SKHFs and KHFs 15 2.2 Hash-then-encrypt MAC construction 28 2.3 Construction of a MAC using a cryptographic hash function 29 3.1 Keying a hash function from two input parts 38 3.2 Message padding in the proposed MAC 42 3.3 One round of the proposed MAC 43 5.1 Proposed collisionful hash function by Anderson and Lomas 91 5.2 Comparing probabilities of the three levels of the attack 95 D.l One round of the proposed MAC (new version) 145 xiii Chapter 1 Introduction Cryptographic mechanisms for verifying the integrity and authenticity of information are necessary in today's rapidly proliferating distributed information systems.