ISO IEC 10118-3-2004 Amd1-2006
ISO IEC 10118-3-2004 Amd1-2006
STANDARD 1 0 1 1 8 -3
Third edition
2004-03-01
AM E N D M E N T 1
2006-02-1 5
Part 3:
D ed i ca ted h as h -fu n cti on s
AMENDMENT 1 : Dedicated
Hash-Function 8 (SHA-224)
Technologies de l'information — Techniques de sécurité — Fonctions
de brouillage —
Partie 3: Fonctions de brouillage dédiées
AMENDEMENT 1: Fonction de brouillage dédiée 8 (SHA-224)
Reference number
ISO/IEC 1 01 1 8-3:2004/Amd.1 :2006(E)
© ISO/IEC 2006
I S O/I E C 1 0 1 1 8-3: 2 0 0 4/Am d . 1 : 2 0 0 6(E )
P D F d i s cl ai m er
This PDF file may contain embedded typefaces. In accordance with Adobe's licensing policy, this file may be printed or viewed but
shall not be edited unless the typefaces which are embedded are licensed to and installed on the computer performing the editing. In
downloading this file, parties accept therein the responsibility of not infringing Adobe's licensing policy. The ISO Central Secretariat
accepts no liability in this area.
Adobe is a trademark of Adobe Systems Incorporated.
Details of the software products used to create this PDF file can be found in the General Info relative to the file; the PDF-creation
parameters were optimized for printing. Every care has been taken to ensure that the file is suitable for use by ISO member bodies. In
the unlikely event that a problem relating to it is found, please inform the Central Secretariat at the address given below.
© ISO/IEC 2006
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 photocopying and microfilm, without permission in writing from either ISO at the address below or
ISO's member body in the country of the requester.
ISO copyright office
Case postale 56 • CH-1 21 1 Geneva 20
Tel. + 41 22 749 01 1 1
Fax + 41 22 749 09 47
E-mail copyright@iso.org
Web www.iso.org
Published in Switzerland
F oreword
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 .
International Standards are drafted in accordance with the rules given in the ISO/IEC Directives, 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 the national bodies casting a vote.
Attention is drawn to the possibility that some of the elements of this document may be the subject of patent
rights. ISO and IEC shall not be held responsible for identifying any or all such patent rights.
Amendment 1 to ISO/IEC 1 01 1 8-3: 2004 was prepared by Joint Technical Committee ISO/IEC JTC 1 ,
Information technology, Subcommittee SC 27, IT Security techniques.
Amendment 1 to ISO/IEC 1 01 1 8-3:2004 was written to serve two purposes.
First, with the inclusion of Dedicated Hash-Function 8 (SHA-224), ISO/IEC 1 01 1 8-3:2004 now includes the
complete family of SHA hash-functions. The description of SHA-224 is given in Clause 1 4. Test vectors for
SHA-224 are given in A.8.
Second, it was noted that there were implementations of SHA-384 and SHA-51 2 in the field which correctly
reproduced the test vector examples in ISO/IEC 1 01 1 8-3:2004, yet still failed for inputs containing bytes that
were not standard ASCII codes. In order to perform comprehensive testing of the SHA-224, SHA-256, SHA-
384 and SHA-51 2 hash-functions, an extended set of test vectors is included for ISO/IEC 1 01 1 8-3:2004 as a
part of this amendment. This additional test vector information is given in A.9.
H as h -fu n cti on s —
Part 3:
D ed i cated h as h -fu n cti on s
Page 22
In this clause we specify a padding method, an initialising value, and a round-function for use in the general
model for hash-functions described in ISO/IEC 1 01 1 8-1 :2000. The padding method, initialising value and
round-function specified here, when used in the above general model, together define Dedicated Hash-
Function 8. This dedicated hash-function can be applied to all data strings D containing at most 2 64 -1 bits.
NOTE Dedicated Hash-Function 8 defined in this clause is commonly called SHA-224, [2].
1 4. 1 . 1 P aram ete rs
The byte ordering convention for this hash-function is the same as that for the hash-function of clause 1 0.
1 4. 1 . 3 F u n cti on s
The functions for this hash-function are the same as those for the hash-function of clause 1 0.
1 4. 1 . 4 C on stan ts
The constants for this hash-function are the same as those for the hash-function of clause 1 0.
1 4. 1 . 5 I n i ti al i s i n g val u e
For this round-function the initialising value, IV, shall always be the following 256-bit string, represented here
as a sequence of eight words Y0 , Y1 , Y2 , Y3 , Y4 , Y5, Y6 , Y7 in a hexadecimal representation, where Y0
represents the left-most 32 of the 256 bits:
Y0 = c1 0 5 9ed8
Y1 = 3 67 cd5 0 7
Y2 = 3 0 7 0 dd1 7
Y3 = f7 0 e5 93 9
Y4 = ffc0 0 b3 1
Y5 = 68 5 8 1 5 1 1
Y6 = 64 f98 fa7
Y7 = befa4 fa4
NOTE These values are the low order 32-bits of the values specified in 1 2.1 .5.
1 4. 2 Pad d i n g m eth od
The padding method to be used with this hash-function shall be the same as the padding method defined in
1 0.2.
The round-function to be used with this hash-function shall be the same as the round-function defined in 1 0.3.
The final 224-bit hash is obtained by truncating the SHA-256-based hash output to its left-most 224 bits.
In the first line, replace “Dedicated Hash-Functions 1 -7” by “Dedicated Hash-Functions 1 -8”.
Page 77
A. 8 D ed i cated H as h -F u n cti on 8
A. 8 . 1 E xam pl e 1
In this example the data-string is the empty string, i.e., the string of length zero.
d1 4 a0 2 8 c 2 a3 a2 bc9 4 7 61 0 2 bb 2 8 8 2 3 4 c4 1 5 a2 b0 1 f 8 2 8 ea62 a c5 b3 e4 2 f
A. 8 . 2 E xam pl e 2
In this example the data-string consists of a single byte, namely the ASCII-coded version of the letter ‘a’.
A. 8 . 3 E xam pl e 3
In this example the data-string is the three-byte string consisting of the ASCII-coded version of ‘abc’. This is
equivalent to the bit-string: ‘01 1 00001 01 1 0001 0 01 1 0001 1 ’.
After the padding process, the single 1 6-word block derived from the data-string is as follows.
61 62 63 8 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000018
The following are (hexadecimal representations of) the successive values of the variables Y0, Y1 , Y2, Y3, Y4,
Y5, Y6,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7
10 0 8 1 7 e8 2 b 5 5 e6a3 67 ed6fa63 3 f0 9d1 1 6d c8 c5 3 a2 c aae5 0 0 91 c0 3 7 faad 7 a8 4 1 2 0 d
11 17142334 0 8 1 7 e8 2 b 5 5 e6a3 67 ed6fa63 3 dd4 c7 be9 c8 c5 3 a2 c aae5 0 0 91 c0 3 7 faad
12 fc4 f0 2 3 e 17142334 0 8 1 7 e8 2 b 5 5 e6a3 67 8 7 bea5 1 a dd4 c7 be9 c8 c5 3 a2 c aae5 0 0 91
13 be3 1 690 2 fc4 f0 2 3 e 17142334 0 8 1 7 e8 2 b 65 1 4 1 1 2 5 8 7 bea5 1 a dd4 c7 be9 c8 c5 3 a2 c
14 1 d8 0 d1 7 8 be3 1 690 2 fc4 f0 2 3 e 17142334 4 5 4 5 f5 3 a 65 1 4 1 1 2 5 8 7 bea5 1 a dd4 c7 be9
15 9f3 4 1 a4 5 1 d8 0 d1 7 8 be3 1 690 2 fc4 f0 2 3 e 6a61 c4 1 1 4 5 4 5 f5 3 a 65 1 4 1 1 2 5 8 7 bea5 1 a
16 0 f3 2 4 db9 9f3 4 1 a4 5 1 d8 0 d1 7 8 be3 1 690 2 0 6c8 0 d6a 6a61 c4 1 1 4 5 4 5 f5 3 a 65 1 4 1 1 2 5
17 ffe7 0 1 2 b 0 f3 2 4 db9 9f3 4 1 a4 5 1 d8 0 d1 7 8 b7 b60 1 f4 0 6c8 0 d6a 6a61 c4 1 1 4 5 4 5 f5 3 a
18 62 93 2 ab8 ffe7 0 1 2 b 0 f3 2 4 db9 9f3 4 1 a4 5 7 63 b62 7 a b7 b60 1 f4 0 6c8 0 d6a 6a61 c4 1 1
19 5 2 0 7 d8 67 62 93 2 ab8 ffe7 0 1 2 b 0 f3 2 4 db9 7 fbba93 6 7 63 b62 7 a b7 b60 1 f4 0 6c8 0 d6a
20 0 7 d5 5 ccb 5 2 0 7 d8 67 62 93 2 ab8 ffe7 0 1 2 b 9ba5 a6ea 7 fbba93 6 7 63 b62 7 a b7 b60 1 f4
21 dece98 a4 0 7 d5 5 ccb 5 2 0 7 d8 67 62 93 2 ab8 2 93 ffb5 d 9ba5 a6ea 7 fbba93 6 7 63 b62 7 a
22 e62 a8 1 2 e dece98 a4 0 7 d5 5 ccb 5 2 0 7 d8 67 2 8 fe0 fd9 2 93 ffb5 d 9ba5 a6ea 7 fbba93 6
23 5 7 2 0 6fb8 e62 a8 1 2 e dece98 a4 0 7 d5 5 ccb c7 60 8 4 ea 2 8 fe0 fd9 2 93 ffb5 d 9ba5 a6ea
24 6a6abcf0 5 7 2 0 6fb8 e62 a8 1 2 e dece98 a4 b2 61 4 c5 e c7 60 8 4 ea 2 8 fe0 fd9 2 93 ffb5 d
25 93 7 5 1 4 f0 6a6abcf0 5 7 2 0 6fb8 e62 a8 1 2 e b4 2 ec2 1 c b2 61 4 c5 e c7 60 8 4 ea 2 8 fe0 fd9
26 8 2 af3 ffb 93 7 5 1 4 f0 6a6abcf0 5 7 2 0 6fb8 be6f67 60 b4 2 ec2 1 c b2 61 4 c5 e c7 60 8 4 ea
27 eca3 bcd5 8 2 af3 ffb 93 7 5 1 4 f0 6a6abcf0 1 dccbb1 0 be6f67 60 b4 2 ec2 1 c b2 61 4 c5 e
28 2 d1 5 7 6c4 eca3 bcd5 8 2 af3 ffb 93 7 5 1 4 f0 0 1 64 1 92 9 1 dccbb1 0 be6f67 60 b4 2 ec2 1 c
29 fe3 c8 65 8 2 d1 5 7 6c4 eca3 bcd5 8 2 af3 ffb fc4 b3 6c5 0 1 64 1 92 9 1 dccbb1 0 be6f67 60
30 0 d7 cce0 7 fe3 c8 65 8 2 d1 5 7 6c4 eca3 bcd5 a4 a4 a3 a4 fc4 b3 6c5 0 1 64 1 92 9 1 dccbb1 0
31 cce1 95 1 d 0 d7 cce0 7 fe3 c8 65 8 2 d1 5 7 6c4 4 be94 7 5 c a4 a4 a3 a4 fc4 b3 6c5 0 1 64 1 92 9
32 0 9b7 62 5 7 cce1 95 1 d 0 d7 cce0 7 fe3 c8 65 8 0 ccddd8 6 4 be94 7 5 c a4 a4 a3 a4 fc4 b3 6c5
33 f8 2 7 7 67 e 0 9b7 62 5 7 cce1 95 1 d 0 d7 cce0 7 db1 1 6db7 0 ccddd8 6 4 be94 7 5 c a4 a4 a3 a4
34 e4 a0 bb4 8 f8 2 7 7 67 e 0 9b7 62 5 7 cce1 95 1 d 994 e2 bac db1 1 6db7 0 ccddd8 6 4 be94 7 5 c
35 d8 bb1 0 4 1 e4 a0 bb4 8 f8 2 7 7 67 e 0 9b7 62 5 7 5 b7 3 0 abb 994 e2 bac db1 1 6db7 0 ccddd8 6
The following eight words Y0 , Y1 , Y2 , Y3, Y4, Y5, Y6, Y7 represent the output of the final iteration of the round-
function.
Y 0 = c1 0 5 9ed8 » 62 0 3 de4 a = 2 3 0 97 d2 2
Y 1 = 3 67 cd5 0 7 » fd8 9 0 3 1 b = 3 4 0 5 d8 2 2
Y 2 = 3 0 7 0 dd1 7 » 5 5 d1 c7 60 = 8 64 2 a4 7 7
Y 3 = f7 0 e5 93 9 » c693 fc7 a = bda2 5 5 b3
Y 4 = ffc0 0 b3 1 » 2 aedb1 b3 = 2 aadbce4
Y 5 = 68 5 8 1 5 1 1 » 5 5 4 8 9ee6 = bda0 b3 f7
Y 6 = 64 f98 fa7 » 7 e7 3 0 e0 0 = e3 6c9da7
Y 7 = befa4 fa4 » 1 3 dfb8 8 9 = ad2 5 f7 2 d
A. 8 . 4 E xam pl e 4
In this example the data-string is the 1 4-byte string consisting of the ASCII-coded version of
‘message digest’
The hash-code is the following 224-bit string.
2 cb2 1 c8 3 ae2 f0 0 4 d e7 e8 1 c3 c 7 0 1 9cbcb 65 b7 1 ab6 5 6b2 2 d6d 0 c3 9b8 eb
A. 8 . 5 E xam pl e 5
In this example the data-string is the 62-byte string consisting of the ASCII-coded version of
‘ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz01 23456789’
The hash-code is the following 224-bit string.
bff7 2 b4 f cb7 d7 5 e5 63 2 90 0 ac 5 f90 d2 1 9 e0 5 e97 a7 bde7 2 e7 4 0 db3 93 d9
A. 8 . 6 E xam pl e 6
In this example the data-string is the 80-byte string consisting of the ASCII-coded version of eight repetitions
of
‘1 234567890’
The hash-code is the following 224-bit string.
b5 0 aecbe 4 e9bb0 b5 7 bc5 f3 ae 7 60 a8 e0 1 db2 4 f2 0 3 fb3 cdcd1 3 1 4 8 0 4 6e
A. 8 . 7 E xam pl e 7
In this example the data-string is the 56-byte string consisting of the ASCII-coded version of
‘abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq’
After the padding process, the following two 1 6-word blocks are derived from the data-string.
61 62 63 64 62 63 64 65 63 64 65 66 64 65 6667 65 6667 68 6667 68 69 67 68 696a 68 696a6b
696a6b6c 6a6b6c6d 6b6c6d6e 6c6d6e6f 6d6e6f7 0 6e6f7 0 7 1 8 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
The following are (hexadecimal representations of) the successive values of the variables Y0, Y1 , Y2, Y3, Y4,
Y5, Y6, Y7 in the first block process.
init: c1 0 5 9ed8 3 67 cd5 0 7 3 0 7 0 dd1 7 f7 0 e5 93 9 ffc0 0 b3 1 68 5 8 1 5 1 1 64 f98 fa7 befa4 fa4
0 0 e96b2 be c1 0 5 9ed8 3 67 cd5 0 7 3 0 7 0 dd1 7 0 4 3 4 2 2 4 2 ffc0 0 b3 1 68 5 8 1 5 1 1 64 f98 fa7
1 5 1 d1 7 d7 b 0 e96b2 be c1 0 5 9ed8 3 67 cd5 0 7 2 f8 ea3 d4 0 4 3 4 2 2 4 2 ffc0 0 b3 1 68 5 8 1 5 1 1
2 ff1 cbd7 f 5 1 d1 7 d7 b 0 e96b2 be c1 0 5 9ed8 7 9a8 96fa 2 f8 ea3 d4 0 4 3 4 2 2 4 2 ffc0 0 b3 1
3 2 4 bcc0 4 7 ff1 cbd7 f 5 1 d1 7 d7 b 0 e96b2 be 1 f60 7 95 a 7 9a8 96fa 2 f8 ea3 d4 04342242
4 7 d5 6a6ac 2 4 bcc0 4 7 ff1 cbd7 f 5 1 d1 7 d7 b de3 95 2 8 6 1 f60 7 95 a 7 9a8 96fa 2 f8 ea3 d4
5 7 4 5 beb1 1 7 d5 6a6ac 2 4 bcc0 4 7 ff1 cbd7 f d8 63 d1 3 2 de3 95 2 8 6 1 f60 7 95 a 7 9a8 96fa
6 0 dd4 1 5 7 3 7 4 5 beb1 1 7 d5 6a6ac 2 4 bcc0 4 7 2 e60 d3 2 3 d8 63 d1 3 2 de3 95 2 8 6 1 f60 7 95 a
7 9a2 5 4 1 fd 0 dd4 1 5 7 3 7 4 5 beb1 1 7 d5 6a6ac 0 8 d2 b3 4 8 2 e60 d3 2 3 d8 63 d1 3 2 de3 95 2 8 6
The following eight words Y0, Y1 , Y2, Y3, Y4, Y5, Y6, Y7 represent the output of the round-function in the first
block process.
Y 0 = c1 0 5 9ed8 » c1 4 b4 7 8 5 = 8 2 5 0 e65 d
Y 1 = 3 67 cd5 0 7 » 8 67 9 5 a7 d = bcf62 f8 4
Y 2 = 3 0 7 0 dd1 7 » 3 5 f4 bf1 c = 6665 9c3 3
Y 3 = f7 0 e5 93 9 » 3 cd7 8 fe1 = 3 3 e5 e91 a
Y 4 = ffc0 0 b3 1 » 1 1 0 8 ac7 f = 1 0 c8 b7 b0
Y 5 = 68 5 8 1 5 1 1 » 2 ce1 1 2 5 8 = 95 3 92 7 69
Y 6 = 64 f98 fa7 » ba1 a8 a1 b = 1 f1 4 1 9c2
Y 7 = befa4 fa4 » 3 e1 ca2 f1 = fd1 6f2 95
The following are (hexadecimal representations of) the successive values of the variables Y0, Y1 , Y2, Y3, Y4,
Y5, Y6, Y7 in the second block process.
init: 8 2 5 0 e65 d bcf62 f8 4 6665 9c3 3 3 3 e5 e91 a 1 0 c8 b7 b0 95 3 92 7 69 1 f1 4 1 9c2 fd1 6f2 95
0 692 e4 0 7 d 8 2 5 0 e65 d bcf62 f8 4 6665 9c3 3 e4 be1 e69 1 0 c8 b7 b0 95 3 92 7 69 1 f1 4 1 9c2
1 60 8 d8 3 e1 692 e4 0 7 d 8 2 5 0 e65 d bcf62 f8 4 3 ddb8 cee e4 be1 e69 1 0 c8 b7 b0 95 3 92 7 69
2 0 9bfa8 9f 60 8 d8 3 e1 692 e4 0 7 d 8 2 5 0 e65 d f5 8 1 3 4 90 3 ddb8 cee e4 be1 e69 1 0 c8 b7 b0
3 2 3 7 5 fbc5 0 9bfa8 9f 60 8 d8 3 e1 692 e4 0 7 d c3 e1 8 5 2 9 f5 8 1 3 4 90 3 ddb8 cee e4 be1 e69
4 7 1 7 e7 9e7 2 3 7 5 fbc5 0 9bfa8 9f 60 8 d8 3 e1 7 7 d3 9ccc c3 e1 8 5 2 9 f5 8 1 3 4 90 3 ddb8 cee
5 a93 1 97 4 8 7 1 7 e7 9e7 2 3 7 5 fbc5 0 9bfa8 9f fdbb991 3 7 7 d3 9ccc c3 e1 8 5 2 9 f5 8 1 3 4 90
6 2 7 a4 2 f0 4 a93 1 97 4 8 7 1 7 e7 9e7 2 3 7 5 fbc5 b999cce4 fdbb991 3 7 7 d3 9ccc c3 e1 8 5 2 9
7 3 4 1 90 8 1 e 2 7 a4 2 f0 4 a93 1 97 4 8 7 1 7 e7 9e7 5 4 e69e2 1 b999cce4 fdbb991 3 7 7 d3 9ccc
8 0 ab3 93 c2 3 4 1 90 8 1 e 2 7 a4 2 f0 4 a93 1 97 4 8 ad2 964 7 e 5 4 e69e2 1 b999cce4 fdbb991 3
9 0 0 67 8 4 eb 0 ab3 93 c2 3 4 1 90 8 1 e 2 7 a4 2 f0 4 aff4 5 7 e7 ad2 964 7 e 5 4 e69e2 1 b999cce4
10 ecd5 c9db 0 0 67 8 4 eb 0 ab3 93 c2 3 4 1 90 8 1 e 9af4 2 a0 e aff4 5 7 e7 ad2 964 7 e 5 4 e69e2 1
11 4 7 62 e8 f0 ecd5 c9db 0 0 67 8 4 eb 0 ab3 93 c2 8 fb6f3 d8 9af4 2 a0 e aff4 5 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62 ad 3 9b2 eb5 f 1 c5 8 cd66 b8 1 0 94 2 2
23 d4 e7 ec62 7 0 3 1 b0 61 2 3 8 f4 cda 1 4 8 5 f8 4 3 1 63 c3 aa0 4 b8 2 62 ad 3 9b2 eb5 f 1 c5 8 cd66
24 665 8 2 df3 d4 e7 ec62 7 0 3 1 b0 61 2 3 8 f4 cda c0 97 62 60 1 63 c3 aa0 4 b8 2 62 ad 3 9b2 eb5 f
25 dedb8 1 99 665 8 2 df3 d4 e7 ec62 7 0 3 1 b0 61 b7 3 e2 dec c0 97 62 60 1 63 c3 aa0 4 b8 2 62 ad
26 f8 5 3 691 7 dedb8 1 99 665 8 2 df3 d4 e7 ec62 7 c2 af9c4 b7 3 e2 dec c0 97 62 60 1 63 c3 aa0
27 d7 3 3 3 b8 a f8 5 3 691 7 dedb8 1 99 665 8 2 df3 b2 b0 b7 1 a 7 c2 af9c4 b7 3 e2 dec c0 97 62 60
28 7 60 8 4 7 c1 d7 3 3 3 b8 a f8 5 3 691 7 dedb8 1 99 5 8 98 eff2 b2 b0 b7 1 a 7 c2 af9c4 b7 3 e2 dec
29 7 eabc6d7 7 60 8 4 7 c1 d7 3 3 3 b8 a f8 5 3 691 7 2 4 dd3 8 8 3 5 8 98 eff2 b2 b0 b7 1 a 7 c2 af9c4
30 90 c4 962 4 7 eabc6d7 7 60 8 4 7 c1 d7 3 3 3 b8 a cce2 5 e67 2 4 dd3 8 8 3 5 8 98 eff2 b2 b0 b7 1 a
31 0 b8 7 62 64 90 c4 962 4 7 eabc6d7 7 60 8 4 7 c1 e4 e4 a5 3 b cce2 5 e67 2 4 dd3 8 8 3 5 8 98 eff2
32 0 4 cb3 6c0 0 b8 7 62 64 90 c4 962 4 7 eabc6d7 5 4 0 3 a3 91 e4 e4 a5 3 b cce2 5 e67 2 4 dd3 8 8 3
33 d5 8 cc3 4 a 0 4 cb3 6c0 0 b8 7 62 64 90 c4 962 4 b7 8 7 67 c3 5 4 0 3 a3 91 e4 e4 a5 3 b cce2 5 e67
34 0 ed1 4 dd7 d5 8 cc3 4 a 0 4 cb3 6c0 0 b8 7 62 64 fdcdc9d9 b7 8 7 67 c3 5 4 0 3 a3 91 e4 e4 a5 3 b
35 5 a8 9a94 2 0 ed1 4 dd7 d5 8 cc3 4 a 0 4 cb3 6c0 7 90 c4 a2 0 fdcdc9d9 b7 8 7 67 c3 5 4 0 3 a3 91
36 4 d3 0 4 2 4 c 5 a8 9a94 2 0 ed1 4 dd7 d5 8 cc3 4 a f95 bf8 5 3 7 90 c4 a2 0 fdcdc9d9 b7 8 7 67 c3
37 4 7 f5 8 c5 c 4 d3 0 4 2 4 c 5 a8 9a94 2 0 ed1 4 dd7 0 ec9be3 b f95 bf8 5 3 7 90 c4 a2 0 fdcdc9d9
38 b5 ad8 5 d7 4 7 f5 8 c5 c 4 d3 0 4 2 4 c 5 a8 9a94 2 cf9f1 dbe 0 ec9be3 b f95 bf8 5 3 7 90 c4 a2 0
39 7 62 fecbc b5 ad8 5 d7 4 7 f5 8 c5 c 4 d3 0 4 2 4 c 1 5 4 2 7 ed3 cf9f1 dbe 0 ec9be3 b f95 bf8 5 3
The following eight words Y0 , Y1 , Y2 , Y3, Y4, Y5, Y6, Y7 represent the output of the final iteration of the round-
function.
Y 0 = 8 2 5 0 e65 d » f2 e7 a4 b9 = 7 5 3 8 8 b1 6
Y 1 = bcf62 f8 4 » 94 3 1 4 7 4 8 = 5 1 2 7 7 6cc
Y 2 = 6665 9c3 3 » f7 5 4 c1 6e = 5 dba5 da1
Y 3 = 3 3 e5 e91 a » c9a3 1 8 3 6 = fd8 90 1 5 0
Y 4 = 1 0 c8 b7 b0 » 9ffd8 dac = b0 c64 5 5 c
Y 5 = 95 3 92 7 69 » 1 fbc63 b0 = b4 f5 8 b1 9
Y 6 = 1 f1 4 1 9c2 » 3 3 3 e0 b63 = 5 2 5 2 2 5 2 5
Y 7 = fd1 6f2 95 » 9e4 0 a3 7 0 = 63 5 65 1 e5
A. 8 . 8 E xam pl e 8
In this example the data-string is the 1 ,000,000-byte string consisting of the ASCII-coded version of ‘a’
repeated 1 0 6 times.
A. 8 . 9 E xam pl e 9
A. 8 . 1 0 E xam pl e 1 0
A. 8 . 1 1 E xam pl e 1 1
A. 8 . 1 2 E xam pl e 1 2
A. 8 . 1 3 E xam pl e 1 3
In this example the data-string is the H0 consists of 224 0 bits. For i = 1 to 1 00 let Hi be the hash-code of Hi-1 .
The hash-code H
1 00 is the following 224-bit string.
As a part of ISO/IEC 1 01 1 8-3, the dedicated hash-functions SHA-256, SHA-384, SHA-51 2 and SHA-224 are
described. Annex A.4, A.5, A.6 and A.8 respectively provide example test vectors for these four hash
functions. An important shortcoming of these examples is that all of the input values are composed solely of
ASCII-encoded alphanumeric characters. This addendum contains a more complete set of test vectors for
these hash functions.
1 . Inputs of length 1 up to 51 2 (for SHA-224 and SHA-256) or 1 024 (for SHA-384 and SHA-51 2) have been
defined in order to test the padding scheme. (The examples in Annex A.4 – A.6 and A.8 contain only
messages with lengths that are a multiple of 8.) A small number of test vectors with greater length have been
included.
2. It has been ensured that all 32-bit words (SHA-224 and SHA-256) or all 64-bit words (SHA-384 and SHA-
51 2) with Hamming weight 1 occur at least once as part of the input. This has been done in order to test the
message expansion functions.
3. The treatment of carry overflow from one byte to another is tested by ensuring that the following additions
occur at least once:
a. For SHA-224 and SHA-256
i. 0 xFFFFFFFF + 0 x0 0 0 0 0 0 0 1
ii. 0 xFFFF0 0 0 0 + 0 x0 0 0 1 0 0 0 0
iii. 0 x0 0 0 0 FFFF + 0 x0 0 0 0 0 0 0 1
iv. 0 xFF0 0 FF0 0 + 0 x0 1 0 0 0 1 0 0
v. 0 x0 0 FF0 0 FF + 0 x0 0 0 1 0 0 0 1
The complete list of test vectors can be found at the following URL:
http://www.iaik.tu-graz.ac.at/research/sha2_testvectors.zip.
NOTE Complete test vectors for the remaining hash functions contained in this part of ISO/IEC 1 01 1 8 are not
available at the above referenced URL. Analysis is currently ongoing to determine whether additional test vectors will be
required for the remaining hash functions, and if so, what the required considerations will be. If additional test vectors are
necessary, a second amendment to this part of ISO/IEC 1 01 1 8 may be considered.
I CS 35. 0 40