Information security -- Message authentication codes (MACs)

Titre manque

General Information

Status
Published
Current Stage
4020 - DIS ballot initiated: 5 months
Start Date
01-Sep-2020
Completion Date
01-Sep-2020
Ref Project

RELATIONS

Buy Standard

Draft
ISO/IEC DIS 9797-2 - Information security -- Message authentication codes (MACs)
English language
52 pages
sale 15% off
Preview
sale 15% off
Preview

Standards Content (sample)

DRAFT INTERNATIONAL STANDARD
ISO/IEC DIS 9797-2
ISO/IEC JTC 1/SC 27 Secretariat: DIN
Voting begins on: Voting terminates on:
2020-09-01 2020-11-24
Information security — Message authentication codes
(MACs) —
Part 2:
Mechanisms using a dedicated hash-function
Partie 2: Mécanismes utilisant une fonction de hachage dédiée
ICS: 35.030
THIS DOCUMENT IS A DRAFT CIRCULATED
FOR COMMENT AND APPROVAL. IT IS
THEREFORE SUBJECT TO CHANGE AND MAY
NOT BE REFERRED TO AS AN INTERNATIONAL
STANDARD UNTIL PUBLISHED AS SUCH.
IN ADDITION TO THEIR EVALUATION AS
BEING ACCEPTABLE FOR INDUSTRIAL,
This document is circulated as received from the committee secretariat.
TECHNOLOGICAL, COMMERCIAL AND
USER PURPOSES, DRAFT INTERNATIONAL
STANDARDS MAY ON OCCASION HAVE TO
BE CONSIDERED IN THE LIGHT OF THEIR
POTENTIAL TO BECOME STANDARDS TO
WHICH REFERENCE MAY BE MADE IN
Reference number
NATIONAL REGULATIONS.
ISO/IEC DIS 9797-2:2020(E)
RECIPIENTS OF THIS DRAFT ARE INVITED
TO SUBMIT, WITH THEIR COMMENTS,
NOTIFICATION OF ANY RELEVANT PATENT
RIGHTS OF WHICH THEY ARE AWARE AND TO
PROVIDE SUPPORTING DOCUMENTATION. ISO/IEC 2020
---------------------- Page: 1 ----------------------
ISO/IEC DIS 9797-2:2020(E)
COPYRIGHT PROTECTED DOCUMENT
© ISO/IEC 2020

All rights reserved. Unless otherwise specified, or required in the context of its implementation, no part of this publication may

be reproduced or utilized otherwise in any form or by any means, electronic or mechanical, including photocopying, or posting

on the internet or an intranet, without prior written permission. Permission can be requested from either ISO at the address

below or ISO’s member body in the country of the requester.
ISO copyright office
CP 401 • Ch. de Blandonnet 8
CH-1214 Vernier, Geneva
Phone: +41 22 749 01 11
Email: copyright@iso.org
Website: www.iso.org
Published in Switzerland
ii © ISO/IEC 2020 – All rights reserved
---------------------- Page: 2 ----------------------
ISO/IEC DIS 9797-2:2020(E)
Contents Page

Foreword ..........................................................................................................................................................................................................................................v

1 Scope ................................................................................................................................................................................................................................. 1

2 Normative reference ......................................................................................................................................................................................... 1

3 Terms and definitions ..................................................................................................................................................................................... 1

4 Symbols and notation ...................................................................................................................................................................................... 3

5 Requirements .......................................................................................................................................................................................................... 5

6 MAC Algorithm 1 ................................................................................................................................................................................................... 6

6.1 General ........................................................................................................................................................................................................... 6

6.2 Description of MAC Algorithm 1 .............................................................................................................................................. 7

6.2.1 General...................................................................................................................................................................................... 7

6.2.2 Step 1 (key expansion) ............................................................................................................................................... 7

6.2.3 Step 2 (modification of the constants and the IV) .............................................................................. 8

6.2.4 Step 3 (hashing operation) ..................................................................................................................................... 8

6.2.5 Step 4 (output transformation) ........................................................................................................................... 8

6.2.6 Step 5 (truncation) ......................................................................................................................................................... 8

6.3 Efficiency ...................................................................................................................................................................................................... 8

6.4 Computation of the constants .................................................................................................................................................... 9

6.4.1 General...................................................................................................................................................................................... 9

6.4.2 Dedicated Hash-Function 1 (RIPEMD-160) ............................................................................................. 9

6.4.3 Dedicated Hash-Function 2 (RIPEMD-128) ............................................................................................. 9

6.4.4 Dedicated Hash-Function 3 (SHA-1) ............................................................................................................10

6.4.5 Dedicated Hash-Function 4 (SHA-256) .....................................................................................................10

6.4.6 Dedicated Hash-Function 5 (SHA-512) .....................................................................................................11

6.4.7 Dedicated Hash-Function 6 (SHA-384) .....................................................................................................12

6.4.8 Dedicated Hash-Function 8 (SHA-224) .....................................................................................................12

6.4.9 Dedicated Hash-Function 17 (SM3) .............................................................................................................12

7 MAC Algorithm 2 ................................................................................................................................................................................................13

7.1 General ........................................................................................................................................................................................................13

7.2 Description of MAC Algorithm 2 ...........................................................................................................................................13

7.2.1 General...................................................................................................................................................................................13

7.2.2 Step 1 (key expansion) ............................................................................................................................................13

7.2.3 Step 2 (hashing operation) ..................................................................................................................................14

7.2.4 Step 3 (output transformation) ........................................................................................................................14

7.2.5 Step 4 (truncation) ......................................................................................................................................................14

7.3 Efficiency ...................................................................................................................................................................................................14

8 MAC Algorithm 3 ................................................................................................................................................................................................14

8.1 General ........................................................................................................................................................................................................14

8.2 Description of MAC Algorithm 3 ...........................................................................................................................................15

8.2.1 General...................................................................................................................................................................................15

8.2.2 Step 1 (key expansion) ............................................................................................................................................15

8.2.3 Step 2 (modification of the constants and the IV) ...........................................................................15

8.2.4 Step 3 (padding) ............................................................................................................................................................15

8.2.5 Step 4 (application of the round-function) ............................................................................................16

8.2.6 Step 5 (truncation) ......................................................................................................................................................16

8.3 Efficiency ...................................................................................................................................................................................................16

9 MAC Algorithm 4 ................................................................................................................................................................................................16

9.1 General ........................................................................................................................................................................................................16

9.2 Description of MAC Algorithm 4 ...........................................................................................................................................17

9.3 Encoding and padding ...................................................................................................................................................................17

9.3.1 Integer to byte encoding ........................................................................................................................................17

9.3.2 String encoding ..............................................................................................................................................................18

© ISO/IEC 2020 – All rights reserved iii
---------------------- Page: 3 ----------------------
ISO/IEC DIS 9797-2:2020(E)

9.3.3 Padding .................................................................................................................................................................................18

9.4 KMAC128 ..................................................................................................................................................................................................19

9.4.1 General...................................................................................................................................................................................19

9.4.2 Step 1 (Prepare newD) ............................................................................................................................................19

9.4.3 Step 2 (Prepare X) ...................................................................... ..................................................................................19

9.4.4 Step 3 (Generate MAC output) ..........................................................................................................................19

9.5 KMAC256 ..................................................................................................................................................................................................19

9.5.1 General...................................................................................................................................................................................19

9.5.2 Step 1 (Prepare newD) ............................................................................................................................................19

9.5.3 Step 2 (Prepare X) ........................................................................................................................................................20

9.5.4 Step 3 (Generate MAC output) ..........................................................................................................................20

9.6 KMACXOF128 ........................................................................................................................................................................................20

9.6.1 General...................................................................................................................................................................................20

9.6.2 Step 1 (Prepare newD) ............................................................................................................................................20

9.6.3 Step 2 (Prepare X) ...................................................................... ..................................................................................20

9.6.4 Step 3 (Generate MAC output) ..........................................................................................................................21

9.7 KMACXOF256 ........................................................................................................................................................................................21

9.7.1 General...................................................................................................................................................................................21

9.7.2 Step 1 (Prepare newD) ............................................................................................................................................21

9.7.3 Step 2 (Prepare X) ...................................................................... ..................................................................................21

9.7.4 Step 3 (Generate MAC output) ..........................................................................................................................21

Annex A (normative) Object identifiers .........................................................................................................................................................22

Annex B (informative) Numerical examples ..............................................................................................................................................24

Annex C (informative) A Security Analysis of the MAC Algorithms ....................................................................................50

Bibliography .............................................................................................................................................................................................................................52

iv © ISO/IEC 2020 – All rights reserved
---------------------- Page: 4 ----------------------
ISO/IEC DIS 9797-2:2020(E)
Foreword

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 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

organizations, 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.

The procedures used to develop this document and those intended for its further maintenance are

described in the ISO/IEC Directives, Part 1. In particular the different approval criteria needed for

the different types of document should be noted. This document was drafted in accordance with the

editorial rules of the ISO/IEC Directives, Part 2 (see www .iso .org/ directives).

Attention is drawn to the possibility that some of the elements of this document may be the subject

of patent rights. ISO [and/or] IEC shall not be held responsible for identifying any or all such patent

rights. Details of any patent rights identified during the development of the document will be in the

Introduction and/or on the ISO list of patent declarations received (see www .iso .org/ patents).

Any trade name used in this document is information given for the convenience of users and does not

constitute an endorsement.

For an explanation on the meaning of ISO specific terms and expressions related to conformity assessment,

as well as information about ISO's adherence to the World Trade Organization (WTO) principles in the

Technical Barriers to Trade (TBT) see the following URL www .iso .org/ iso/ foreword .html.

The committee responsible for this document is ISO/IEC JTC 1, Information technology, SC 27, Information

security, cybersecurity and privacy protection.

This third edition cancels and replaces the second edition (ISO/IEC 9797-2:2011).

The main changes include using Dedicated Hash-Functions 17 for MAC Algorithms 1 and 3, Dedicated

Hash-Functions 11, 12, 13 ─ 16, and 17 for MAC Algorithm 2, and adding MAC Algorithm 4 based on

Keccak, a primitive used in the definition of Dedicated Hash Function 13 −16. The Dedicated Hash-

Functions are specified in ISO/IEC 10118-3:2018
© ISO/IEC 2020 – All rights reserved v
---------------------- Page: 5 ----------------------
DRAFT INTERNATIONAL STANDARD ISO/IEC DIS 9797-2:2020(E)
Information security — Message authentication codes
(MACs) —
Part 2:
Mechanisms using a dedicated hash-function
1 Scope

This document specifies MAC algorithms that use a secret key and a hash-function (or its round-

function or sponge function) to calculate an m-bit MAC. These mechanisms can be used as data integrity

mechanisms to verify that data has not been altered in an unauthorised manner.

NOTE A general framework for the provision of integrity services is specified in ISO/IEC 10181-6 [5].

2 Normative reference

The following documents are referred to in the text in such a way that some or all of their content

constitutes requirements of this document. For dated references, only the edition cited applies. For

undated references, the latest edition of the referenced document (including any amendments) applies.

ISO/IEC 10118-3:2018, Information technology — Security techniques — Hash-functions — Part 3:

Dedicated hash-functions (fourth edition).
3 Terms and definitions
For the purposes of this document, the following terms and definitions apply.

ISO and IEC maintain terminological databases for use in standardization at the following addresses:

— ISO Online browsing platform: available at https:// www .iso .org/ obp
— IEC Electropedia: available at http:// www .electropedia .org/
3.1
block

bit-string of length L , i.e., the length of the first input to the round-function

[SOURCE: ISO/IEC 10118-3:2018, 3.1]
3.2
entropy

total amount of information yielded by a set of bits, and it is representative of the work effort required

for an adversary to be able to reproduce the same set of bits
[SOURCE: ISO/IEC 18031:2011, 3.11]
3.3
input data string
string of bits which is the input to a MAC algorithm
© ISO/IEC 2020 – All rights reserved 1
---------------------- Page: 6 ----------------------
ISO/IEC DIS 9797-2:2020(E)
3.4
hash-code
string of bits which is the output of a hash-function
[SOURCE: ISO/IEC 10118-1:2016, 3.3]
3.5
hash-function

function which maps strings of bits to fixed-length strings of bits, satisfying the following two

properties:

— for a given output, it is computationally infeasible to find an input which maps to this output;

— for a given input, it is computationally infeasible to find a second input which maps to the same output

Note 1 to entry: Computational feasibility depends on the specific security requirements and environment. Refer

to Annex C of ISO/IEC 10118-1:2016.
[SOURCE: ISO/IEC 10118-1:2016, 3.4]
3.6
initializing value
value used in defining the starting point of a hash-function
[SOURCE: ISO/IEC 10118-1:2016, 3.5]
3.7
MAC algorithm key
key that controls the operation of a MAC algorithm
[SOURCE: ISO/IEC 9797-1:2011, 3.8]
3.8
Message Authentication Code
MAC

string of bits which is the output of a MAC algorithm NOTE 1 to entry: A MAC is sometimes called a

cryptographic check value (see for example ISO 7498-2 [1]).
[SOURCE: ISO/IEC 9797-1:2011, 3.9]
3.9
Message Authentication Code algorithm
MAC algorithm

algorithm for computing a function which maps strings of bits and a secret key to fixed-length strings

of bits, satisfying the following two properties:
— for any key and any input string the function can be computed efficiently;

— for any fixed key, and given no prior knowledge of the key, it is computationally infeasible to compute

the function value on any new input string, even given knowledge of the set of input strings and

corresponding function values, where the value of the ith input string may have been chosen after

observing the value of the first i-1 function values (for integer i > 1)

Note 1 to entry: to entry: A MAC algorithm is sometimes called a cryptographic check function (see for example

ISO 7498-2 [1]).

Note 2 to entry: to entry: Computational feasibility depends on the user's specific security requirements and

environment.
[SOURCE: ISO/IEC 9797-1:2011, 3.10]
2 © ISO/IEC 2020 – All rights reserved
---------------------- Page: 7 ----------------------
ISO/IEC DIS 9797-2:2020(E)
3.10
output transformation

function that is applied at the end of the MAC algorithm, before the truncation operation

[SOURCE: ISO/IEC 9797-1:2011, 3.12]
3.11
padding
appending extra bits to a data string
[SOURCE: ISO/IEC 10118-1:2016, 3.7]
3.12
round-function

function ⌀ (..,..)that transforms two binary strings of lengths L and L to a binary string of length L

1 2 2

that is used iteratively as part of a hash-function, where it combines a data string of length L with the

previous output of length L or the initializing value

Note 1 to entry: to entry: The literature on this subject contains a variety of terms that have the same or similar

meaning as round-function. Compression function and iterative function are some examples.

[SOURCE: ISO/IEC 10118-1:2016, 3.8]
3.13
security strength

number associated with the amount of work required to break a cryptographic algorithm or system

and specified in bits such that security strength s bits implies the required number of operations is 2

Note 1 to entry: to entry: Computationally infeasible in 3.2, 3.6, and 3.10 implies the security strength is at least

112 bits. Refer to Annex C of ISO/IEC 10118-1:2016.
3.14
word

string of 32 bits used in Dedicated Hash-Functions 1, 2, 3, 4, 8 and 17 or a string of 64 bits used in

Dedicated Hash-Functions 5, 6, 9 and 10 of ISO/IEC 10118-3:2018
[SOURCE: ISO/IEC 10118-3:2018, 3.2, Modified with specific bit lengths.]
4 Symbols and notation

This document makes use of the following symbols and notation defined in ISO/IEC 9797-1 [3]:

D the input data string, i.e. the data string to be input to the MAC algorithm.

j ~ X the string obtained from the string X at least j bits in length by taking the leftmost j bits of X.

m the length (in bits) of the MAC.

q the number of blocks in the input data string D after the padding and splitting process.

X ⊕ Y bitwise exclusive-or of bit-strings X and Y.
X || Y concatenation of bit-strings X and Y (in that order).

: = a symbol denoting the 'set equal to' operation used in the procedural specifications of MAC

algorithms, where it indicates that the value of the string on the left side of the symbol shall be

made equal to the value of the expression on the right side of the symbol.
For the purposes of this document, the following symbols and notation apply:
© ISO/IEC 2020 – All rights reserved 3
---------------------- Page: 8 ----------------------
ISO/IEC DIS 9797-2:2020(E)
padded data string.
h hash-function.
h' the hash-function h with modified constants and modified IV.
simplified hash-function h without the padding and length appending, and with-
out truncating the round-function output (L bits) to its left-most L bits.
2 H

NOTE 1 h shall only be applied to input strings with a length that is a positive

integer multiple of L .
NOTE 2 The output of h should be L bits rather than L bits; in particular, in
2 H
Dedicated Hash-Functions 6 and 8 defined in ISO/IEC 10118-3:2018, L is always
smaller than L .

H', H” strings of L bits which are used in the MAC algorithm computation to store an

intermediate result.
IV', IV , IV initializing values.
1 2
k length (in bits) of the MAC algorithm key.
K MAC algorithm key.
secret keys derived to be used for a MAC algorithm.
K', K , K , K , K , K ,
0 1 2 1

KT the first input string of the function ϕ' used in the output transformation step of

MAC Algorithm 1.
the bit string encoding the message length in MAC Algorithm 3.
OPAD, IPAD constant strings used in MAC Algorithm 2.

R, S , S , S constant strings used in the computation of the constants for MAC Algorithm 1 and

0 1 2
MAC Algorithm 3.

T , T , T U , U , U constant strings used in the key derivation for MAC Algorithm 1 and MAC Algorithm 3.

0 1 2, 0 1 2
K [i]

This document makes use of the following symbols and notation defined in ISO/IEC 10118-1:

H hash-code.
IV initializing value.
L length (in bits) of a bit-string X.

This document makes use of the following symbols and notation defined in ISO/IEC 10118-3:2018:

4 © ISO/IEC 2020 – All rights reserved
---------------------- Page: 9 ----------------------
ISO/IEC DIS 9797-2:2020(E)
C , C' constant words used in the round-functions.
i i

L the length (in bits) of the first of the two input strings to the round-function ϕ.

L the length (in bits) of the second of the two input strings to the round-function ϕ, of the output

string from the round-function ϕ, and of IV.

w the length (in bits) of a word; w is 32 when using Dedicated Hash-Functions 1, 2, 3, 4, 8 and 17 of

ISO/IEC 10118-3:2018, and w is 64 when using Dedicated Hash-Functions 5, 6, 9 and 10 of ISO/

IEC 10118-3:2018.

ϕ a round-function, i.e. if X and Y are bit-strings of lengths L and L respectively, then ϕ (X, Y) is

1 2
the string obtained by applying ϕ to X and Y.

Ψ the modulo 2 addition operation, where w is the number of bits in a word. i.e. if A and B are words,

then AΨB is the word obtained by treating A and B as the binary representations of integers and

w w

computing their sum modulo 2 , and the result is constrained to lie between 0 and 2 −1 inclu-

sive. The value of w is 32 in Dedicated Hash-Functions 1, 2, 3, 4, 8 and 17, and 64 in Dedicated

Hash-Functions 5, 6, 9 and 10.
5 Requirements
Users who wish to employ a MAC algorithm from this document shall select:

— a dedicated hash-function from the functions specified in ISO/IEC 10118-3:2018 so that the hash

function and its round function or its sponge function is implemented or suitable to use; a MAC

algorithm amongst those specified in Clauses 6, 7, 8 and 9 which can use the selected hash function

or its round function or sponge function; and
— the length (in bits) m of the MAC, where m is at least 32.

The use of Dedicated Hash-Functions 7 and 9-16 from ISO/IEC 10118-3:2018 with MAC Algorithms

1 and 3 is not specified in this document. The use of Dedicated Hash-Functions 9 and 10 from

ISO/IEC 10118-3:2018 with MAC Algorithm 2 is also not specified in this document. MAC Algorithm 4

makes use of the Keccak function, a primitive (known as a sponge function) used in defining Dedicated

Hash-Functions 13-16 from ISO/IEC 10118-3:2018. The permitted combinations of MAC algorithms and

hash-functions are summarized in Table 1.
Table 1 — The MAC algorithm with different Dedicated Hash-Functions.

Dedicated Hash-Function in ISO/ MAC Algorithm MAC Algorithm MAC Algorithm MAC Algorithm

IEC 10118-3:2018 1 2 3 4
1 RIPEMD-160 √ √ √
2 RIPEMD-128 √ √ √
3 SHA-1 √ √ √
4 SHA-256 √ √ √
5 SHA-512 √ √ √
6 SHA-384 √ √ √
7 Whirlpool √
8 SHA-224 √ √ √
9 SHA-512/224
10 SHA-512/256
11 STREEBOG 512 √
12 STREEBOG 256 √
13 SHA3–224 √ √
© ISO/IEC 2020 – All rights reserved 5
---------------------- Page: 10 ----------------------
ISO/IEC DIS 9797-2:2020(E)
Table 1 (continued)

Dedicated Hash-Function in ISO/ MAC Algorithm MAC Algorithm MAC Algorithm MAC Algorithm

IEC 10118-3:2018 1 2 3 4
14 SHA3–256 √ √
15 SHA3–384 √ √
16 SHA3–512 √ √
17 SM3 √ √
...

Questions, Comments and Discussion

Ask us and Technical Secretary will try to provide an answer. You can facilitate discussion about the standard in here.