Identifiers and Test Vectors for HMAC-SHA-224, HMAC-SHA-256, HMAC-SHA-384, and HMAC-SHA-512
RFC 4231

 
Document Type RFC - Proposed Standard (December 2005; Errata)
Was draft-nystrom-smime-hmac-sha (individual in sec area)
Last updated 2014-01-01
Stream IETF
Formats plain text pdf html
Stream WG state (None)
Consensus Unknown
Document shepherd No shepherd assigned
IESG IESG state RFC 4231 (Proposed Standard)
Telechat date
Responsible AD Russ Housley
Send notices to magnus@rsasecurity.com
Network Working Group                                         M. Nystrom
Request for Comments: 4231                                  RSA Security
Category: Standards Track                                  December 2005

     Identifiers and Test Vectors for HMAC-SHA-224, HMAC-SHA-256,
                     HMAC-SHA-384, and HMAC-SHA-512

Status of This Memo

   This document specifies an Internet standards track protocol for the
   Internet community, and requests discussion and suggestions for
   improvements.  Please refer to the current edition of the "Internet
   Official Protocol Standards" (STD 1) for the standardization state
   and status of this protocol.  Distribution of this memo is unlimited.

Copyright Notice

   Copyright (C) The Internet Society (2005).

Abstract

   This document provides test vectors for the HMAC-SHA-224,
   HMAC-SHA-256, HMAC-SHA-384, and HMAC-SHA-512 message authentication
   schemes.  It also provides ASN.1 object identifiers and Uniform
   Resource Identifiers (URIs) to identify use of these schemes in
   protocols.  The test vectors provided in this document may be used
   for conformance testing.

Nystrom                     Standards Track                     [Page 1]
RFC 4231         HMAC-SHA Identifiers and Test Vectors     December 2005

Table of Contents

   1.  Introduction . . . . . . . . . . . . . . . . . . . . . . . . .  2
   2.  Conventions Used in This Document  . . . . . . . . . . . . . .  2
   3.  Scheme Identifiers . . . . . . . . . . . . . . . . . . . . . .  3
       3.1.  ASN.1 Object Identifiers . . . . . . . . . . . . . . . .  3
       3.2.  Algorithm URIs . . . . . . . . . . . . . . . . . . . . .  3
   4.  Test Vectors . . . . . . . . . . . . . . . . . . . . . . . . .  3
       4.1.  Introduction . . . . . . . . . . . . . . . . . . . . . .  3
       4.2.  Test Case 1  . . . . . . . . . . . . . . . . . . . . . .  4
       4.3.  Test Case 2  . . . . . . . . . . . . . . . . . . . . . .  4
       4.4.  Test Case 3  . . . . . . . . . . . . . . . . . . . . . .  5
       4.5.  Test Case 4  . . . . . . . . . . . . . . . . . . . . . .  5
       4.6.  Test Case 5  . . . . . . . . . . . . . . . . . . . . . .  6
       4.7.  Test Case 6  . . . . . . . . . . . . . . . . . . . . . .  6
       4.8.  Test Case 7  . . . . . . . . . . . . . . . . . . . . . .  7
   5.  Security Considerations  . . . . . . . . . . . . . . . . . . .  7
   6.  Acknowledgements   . . . . . . . . . . . . . . . . . . . . . .  8
   7.  References . . . . . . . . . . . . . . . . . . . . . . . . . .  8
       7.1.  Normative References . . . . . . . . . . . . . . . . . .  8
       7.2.  Informative References . . . . . . . . . . . . . . . . .  8

1.  Introduction

   This document provides test vectors for the HMAC-SHA-224,
   HMAC-SHA-256, HMAC-SHA-384, and HMAC-SHA-512 message authentication
   schemes.  It also provides ASN.1 object identifiers and URIs to
   identify use of these schemes in protocols using ASN.1 constructs
   (such as those built on Secure/Multipurpose Internet Mail Extensions
   (S/MIME) [4]) or protocols based on XML constructs (such as those
   leveraging XML Digital Signatures [5]).

   HMAC-SHA-224 is the realization of the HMAC message authentication
   code [1] using the SHA-224 hash function, HMAC-SHA-256 is the
   realization of the HMAC message authentication code using the SHA-256
   hash function, HMAC-SHA-384 is the realization of the HMAC message
   authentication code using the SHA-384 hash function, and HMAC-SHA-512
   is the realization of the HMAC message authentication code using the
   SHA-512 hash function.  SHA-224, SHA-256, SHA-384, and SHA-512 are
   all described in [2].

2.  Conventions Used in This Document

   The key word "SHOULD" in this document is to be interpreted as
   described in RFC 2119 [3].

Nystrom                     Standards Track                     [Page 2]
RFC 4231         HMAC-SHA Identifiers and Test Vectors     December 2005

3.  Scheme Identifiers

3.1.  ASN.1 Object Identifiers

   The following ASN.1 object identifiers have been allocated for these
   schemes:

   rsadsi OBJECT IDENTIFIER ::=
       {iso(1) member-body(2) us(840) rsadsi(113549)}

   digestAlgorithm   OBJECT IDENTIFIER ::= {rsadsi 2}

   id-hmacWithSHA224 OBJECT IDENTIFIER ::= {digestAlgorithm 8}
   id-hmacWithSHA256 OBJECT IDENTIFIER ::= {digestAlgorithm 9}
   id-hmacWithSHA384 OBJECT IDENTIFIER ::= {digestAlgorithm 10}
   id-hmacWithSHA512 OBJECT IDENTIFIER ::= {digestAlgorithm 11}

   When the "algorithm" component in a value of ASN.1 type
   AlgorithmIdentifier (see, e.g., [4], Section 10) identifies one of
   these schemes, the "parameter" component SHOULD be present but have
Show full document text