1、Information technology Secu rity techniques Message Authentication Codes (MACs) Part 2: Mechanisms using a dedicated hash-functionCAN/CSA-ISO/IEC 9797-2:13(ISO/IEC 9797-2:2011, IDT)National Standard of CanadaNOT FOR RESALE. / PUBLICATION NON DESTINE LA REVENTE.Legal Notice for StandardsCanadian Stan
2、dards Association (operating as “CSA Group”) develops standards through a consensus standards development process approved by the Standards Council of Canada. This process brings together volunteers representing varied viewpoints and interests to achieve consensus and develop a standard. Although CS
3、A Group administers the process and establishes rules to promote fairness in achieving consensus, it does not independently test, evaluate, or verify the content of standards.Disclaimer and exclusion of liabilityThis document is provided without any representations, warranties, or conditions of any
4、kind, express or implied, including, without limitation, implied warranties or conditions concerning this documents fitness for a particular purpose or use, its merchantability, or its non-infringement of any third partys intellectual property rights. CSA Group does not warrant the accuracy, complet
5、eness, or currency of any of the information published in this document. CSA Group makes no representations or warranties regarding this documents compliance with any applicable statute, rule, or regulation. IN NO EVENT SHALL CSA GROUP, ITS VOLUNTEERS, MEMBERS, SUBSIDIARIES, OR AFFILIATED COMPANIES,
6、 OR THEIR EMPLOYEES, DIRECTORS, OR OFFICERS, BE LIABLE FOR ANY DIRECT, INDIRECT, OR INCIDENTAL DAMAGES, INJURY, LOSS, COSTS, OR EXPENSES, HOWSOEVER CAUSED, INCLUDING BUT NOT LIMITED TO SPECIAL OR CONSEQUENTIAL DAMAGES, LOST REVENUE, BUSINESS INTERRUPTION, LOST OR DAMAGED DATA, OR ANY OTHER COMMERCIA
7、L OR ECONOMIC LOSS, WHETHER BASED IN CONTRACT, TORT (INCLUDING NEGLIGENCE), OR ANY OTHER THEORY OF LIABILITY, ARISING OUT OF OR RESULTING FROM ACCESS TO OR POSSESSION OR USE OF THIS DOCUMENT, EVEN IF CSA GROUP HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES, INJURY, LOSS, COSTS, OR EXPENSES.In p
8、ublishing and making this document available, CSA Group is not undertaking to render professional or other services for or on behalf of any person or entity or to perform any duty owed by any person or entity to another person or entity. The information in this document is directed to those who have
9、 the appropriate degree of experience to use and apply its contents, and CSA Group accepts no responsibility whatsoever arising in any way from any and all use of or reliance on the information contained in this document. CSA Group is a private not-for-profit company that publishes voluntary standar
10、ds and related documents. CSA Group has no power, nor does it undertake, to enforce compliance with the contents of the standards or other documents it publishes. Intellectual property rights and ownershipAs between CSA Group and the users of this document (whether it be in printed or electronic for
11、m), CSA Group is the owner, or the authorized licensee, of all works contained herein that are protected by copyright, all trade-marks (except as otherwise noted to the contrary), and all inventions and trade secrets that may be contained in this document, whether or not such inventions and trade se
12、crets are protected by patents and applications for patents. Without limitation, the unauthorized use, modification, copying, or disclosure of this document may violate laws that protect CSA Groups and/or others intellectual property and may give rise to a right in CSA Group and/or others to seek le
13、gal redress for such use, modification, copying, or disclosure. To the extent permitted by licence or by law, CSA Group reserves all intellectual property rights in this document.Patent rightsAttention is drawn to the possibility that some of the elements of this standard may be the subject of paten
14、t rights. CSA Group shall not be held responsible for identifying any or all such patent rights. Users of this standard are expressly advised that determination of the validity of any such patent rights is entirely their own responsibility.Authorized use of this documentThis document is being provid
15、ed by CSA Group for informational and non-commercial use only. The user of this document is authorized to do only the following:If this document is in electronic form:sLOADTHISDOCUMENTONTOACOMPUTERFORTHESOLEPURPOSEOFREVIEWINGITsSEARCHANDBROWSETHISDOCUMENTANDsPRINTTHISDOCUMENTIFITISIN0$ this remains
16、the continuing responsibility of the SDO. An NSC reflects a consensus of a number of capable individuals whose collective interests provide, to the greatest practicable extent, a balance of representation of general interests, producers, regulators, users (including consumers), and others with relev
17、ant interests, as may be appropriate to the subject in hand. It normally is a standard which is capable of making a significant and timely contribution to the national interest.Those who have a need to apply standards areencouraged to use NSCs. These standards are subjectto periodic review. Users of
18、 NSCs are cautionedto obtain the latest edition from the SDO which publishes the standard.The responsibility for approving standards as National Standards of Canada rests with theStandards Council of Canada270 Albert Street, Suite 200Ottawa, Ontario, K1P 6N7CanadaCette Norme nationale du Canada est
19、offerte en anglais et en franais.Although the intended primary application of this Standard is stated in its Scope, it is importantto note that it remains the responsibility of the users to judge its suitability for their particular purpose.TMA trade-mark of the Canadian Standards Association, opera
20、ting as “CSA Group”TMA trade-mark of the Canadian Standards Association, operating as “CSA Group”National Standard of CanadaPublished in January 2013 by CSA GroupA not-for-profit private sector organization5060 Spectrum Way, Suite 100, Mississauga, Ontario, Canada L4W 5N61-800-463-6727 416-747-4044V
21、isit our Online Store at shop.csa.caApproved byStandards Council of CanadaCAN/CSA-ISO/IEC 9797-2:13Information technology Security techniques Message Authentication Codes (MACs) Part 2: Mechanisms using a dedicated hash-functionPrepared by InternationalOrganizationforStandardization/ International E
22、lectrotechnical CommissionReviewed byCAN/CSA-ISO/IEC 9797-2:13Information technology Security techniques Message Authentication Codes (MACs) Part 2:Mechanisms using a dedicated hash-functionCSA/4 2013 CSA Group January 2013CAN/CSA-ISO/IEC 9797-2:13Information technology Security techniques Message A
23、uthentication Codes (MACs) Part 2: Mechanisms using a dedicated hash-functionCSA PrefaceStandards development within the Information Technology sector is harmonized with international standards development. Through the CSA Technical Committee on Information Technology (TCIT), Canadians serve as the
24、Canadian Advisory Committee (CAC) on ISO/IEC Joint Technical Committee 1 on Information Technology (ISO/IEC JTC1) for the Standards Council of Canada (SCC), the ISO member body for Canada and sponsor of the Canadian National Committee of the IEC. Also, as a member of the International Telecommunicat
25、ion Union (ITU), Canada participates in the International Telegraph and Telephone Consultative Committee (ITU-T).This Standard supersedes CAN/CSA-ISO/IEC 9797-2-04 (adoption of ISO/IEC 9797-2:2002).At the time of publication, ISO/IEC 9797-2:2011 is available from ISO and IEC in English only. CSA Gro
26、up will publish the French version when it becomes available from ISO and IEC.This International Standard was reviewed by the TCIT under the jurisdiction of the Strategic Steering Committee on Information Technology and deemed acceptable for use in Canada. From time to time, ISO/IEC may publish adde
27、nda, corrigenda, etc. The TCIT will review these documents for approval and publication. For a listing, refer to the Current Standards Activities page at standardsactivities.csa.ca. This Standard has been formally approved, without modification, by the Technical Committee and has been approved as a
28、National Standard of Canada by the Standards Council of Canada. 2013 CSA GroupAll rights reserved. No part of this publication may be reproduced in any form whatsoever without the prior permission of thepublisher. ISO/IEC material is reprinted with permission. Where the words “this International Sta
29、ndard” appear in the text, they should be interpreted as “this National Standard of Canada”.Inquiries regarding this National Standard of Canada should be addressed toCSA Group5060 Spectrum Way, Suite 100, Mississauga, Ontario, Canada L4W 5N61-800-463-6727 416-747-4000http:/csa.caTo purchase standar
30、ds and related publications, visit our Online Store at shop.csa.ca or call toll-free 1-800-463-6727 or 416-747-4044.This Standard is subject to periodic review, and suggestions for its improvement will be referred to the appropriate committee. To submit a proposal for change, please send the followi
31、ng information to inquiriescsagroup.org and include “Proposal for change” in the subject line:(a) Standard designation (number);(b) relevant clause, table, and/or figure number;(c) wording of the proposed change; and(d) rationale for the change.Reference numberISO/IEC 9797-2:2011(E)ISO/IEC 2011INTER
32、NATIONAL STANDARD ISO/IEC9797-2Second edition2011-05-01Corrected version2011-06-15Information technology Security techniques Message Authentication Codes (MACs) Part 2: Mechanisms using a dedicated hash-function Technologies de linformation Techniques de scurit Codes dauthentification de message (MA
33、C) Partie 2: Mcanismes utilisant une fonction de hachage ddie ISO/IEC 9797-2:2011(E) COPYRIGHT PROTECTED DOCUMENT ISO/IEC 2011 All rights reserved. Unless otherwise specified, no part of this publication may be reproduced or utilized in any form or by any means, electronic or mechanical, including p
34、hotocopying and microfilm, without permission in writing from either ISO at the address below or ISOs member body in the country of the requester. ISO copyright office Case postale 56 CH-1211 Geneva 20 Tel. + 41 22 749 01 11 Fax + 41 22 749 09 47 E-mail copyrightiso.org Web www.iso.org ii ISO/IEC 20
35、11 All rights reservedCAN/CSA-ISO/IEC 9797-2:13ISO/IEC 9797-2:2011(E) ISO/IEC 2011 All rights reserved iiiContents Page Foreword iv Introduction.v 1 Scope1 2 Normative references1 3 Terms and definitions .2 4 Symbols and notation.4 5 Requirements.5 6 MAC Algorithm 1 .6 6.1 Description of MAC Algorit
36、hm 1 7 6.1.1 Step 1 (key expansion)7 6.1.2 Step 2 (modification of the constants and the IV)7 6.1.3 Step 3 (hashing operation) .7 6.1.4 Step 4 (output transformation).8 6.1.5 Step 5 (truncation).8 6.2 Efficiency8 6.3 Computation of the constants8 6.3.1 Dedicated Hash-Function 1 (RIPEMD-160) .9 6.3.2
37、 Dedicated Hash-Function 2 (RIPEMD-128) .9 6.3.3 Dedicated Hash-Function 3 (SHA-1)10 6.3.4 Dedicated Hash-Function 4 (SHA-256)10 6.3.5 Dedicated Hash-Function 5 (SHA-512)10 6.3.6 Dedicated Hash-Function 6 (SHA-384)11 6.3.7 Dedicated Hash-Function 8 (SHA-224)11 7 MAC Algorithm 2 .12 7.1 Description o
38、f MAC Algorithm 2 12 7.1.1 Step 1 (key expansion)12 7.1.2 Step 2 (hashing operation) .12 7.1.3 Step 3 (output transformation).12 7.1.4 Step 4 (truncation).13 7.2 Efficiency13 8 MAC Algorithm 3 .13 8.1 Description of MAC Algorithm 3 13 8.1.1 Step 1 (key expansion)13 8.1.2 Step 2 (modification of the
39、constants and the IV)14 8.1.3 Step 3 (padding) 14 8.1.4 Step 4 (application of the round-function)14 8.1.5 Step 5 (truncation).15 8.2 Efficiency15 Annex A (normative) ASN.1 Module .16 Annex B (informative) Examples .17 Annex C (informative) A security analysis of the MAC algorithms37 Bibliography39
40、CAN/CSA-ISO/IEC 9797-2:13ISO/IEC 9797-2:2011(E) iv ISO/IEC 2011 All rights reservedForeword ISO (the International Organization for Standardization) and IEC (the International Electrotechnical Commission) form the specialized system for worldwide standardization. National bodies that are members of
41、ISO or IEC participate in the development of International Standards through technical committees established by the respective organization to deal with particular fields of technical activity. ISO and IEC technical committees collaborate in fields of mutual interest. Other international organizati
42、ons, governmental and non-governmental, in liaison with ISO and IEC, also take part in the work. In the field of information technology, ISO and IEC have established a joint technical committee, ISO/IEC JTC 1. International Standards are drafted in accordance with the rules given in the ISO/IEC Dire
43、ctives, Part 2. The main task of the joint technical committee is to prepare International Standards. Draft International Standards adopted by the joint technical committee are circulated to national bodies for voting. Publication as an International Standard requires approval by at least 75 % of th
44、e national bodies casting a vote. ISO/IEC 9797-2 was prepared by Joint Technical Committee ISO/IEC JTC 1, Information technology, Subcommittee SC 27, IT Security techniques. This second edition cancels and replaces the first edition (ISO/IEC 9797-2:2002), which has been technically revised by includ
45、ing MAC algorithms based on Dedicated Hash-Functions 4 7 of ISO/IEC 10118-3:2004 and Dedicated Hash-Function 8 of ISO/IEC 10118-3/Amd.1:2006. ISO/IEC 9797 consists of the following parts, under the general title Information technology Security techniques Message Authentication Codes (MACs): Part 1:
46、Mechanisms using a block cipher Part 2: Mechanisms using a dedicated hash-function Part 3: Mechanisms using a universal hash-function Further parts may follow. This corrected version of ISO/IEC 9797-2:2011 incorporates corrections to subclauses 3.14, 6.3, 6.3.5 and 6.3.6. CAN/CSA-ISO/IEC 9797-2:13IS
47、O/IEC 9797-2:2011(E) ISO/IEC 2011 All rights reserved vIntroduction The International Organization for Standardization (ISO) and International Electrotechnical Commission (IEC) draw attention to the fact that it is claimed that compliance with this document may involve the use of a patent concerning
48、 MAC Algorithm 1 (MDx-MAC) given in Clause 6. ISO and IEC take no position concerning the evidence, validity and scope of this patent right. The holder of this patent right has assured ISO and IEC that he is willing to negotiate licenses under reasonable and non-discriminatory terms and conditions w
49、ith applicants throughout the world. In this respect, the statement of the holder of this patent right is registered with ISO and IEC. Information may be obtained from: Entrust Technologies, Technology Licensing Dept., 1000 Innovation Drive, Ottawa, Ontario, Canada K2K 3E7. Attention is drawn to the possibility that some of