Internet Engineering Task Force (IETF) R. Denis-Courmont Request for Comments: 5769 Nokia Category: Informational April 2010 ISSN: 2070-1721
Test Vectors for Session Traversal Utilities for NAT (STUN)
Abstract
The Session Traversal Utilities for NAT (STUN) protocol defines several STUN attributes. The content of some of these -- FINGERPRINT, MESSAGE-INTEGRITY, and XOR-MAPPED-ADDRESS -- involve binary-logical operations (hashing, xor). This document provides test vectors for those attributes.
Status of This Memo
This document is not an Internet Standards Track specification; it is published for informational purposes.
This document is a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community. It has received public review and has been approved for publication by the Internet Engineering Steering Group (IESG). Not all documents approved by the IESG are a candidate for any level of Internet Standard; see Section 2 of RFC 5741.
Information about the current status of this document, any errata, and how to provide feedback on it may be obtained at http://www.rfc-editor.org/info/rfc5769.
Copyright Notice
Copyright (c) 2010 IETF Trust and the persons identified as the document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.
Denis-Courmont Informational [Page 1]
RFC 5769 STUN Test Vectors April 2010
This document may contain material from IETF Documents or IETF Contributions published or made publicly available before November 10, 2008. The person(s) controlling the copyright in some of this material may not have granted the IETF Trust the right to allow modifications of such material outside the IETF Standards Process. Without obtaining an adequate license from the person(s) controlling the copyright in such materials, this document may not be modified outside the IETF Standards Process, and derivative works of it may not be created outside the IETF Standards Process, except to format it for publication as an RFC or to translate it into languages other than English.
The Session Traversal Utilities for NAT (STUN)[RFC5389] protocol defines two different hashes that may be included in messages exchanged by peers implementing that protocol:
FINGERPRINT attribute: a 32-bit Cyclic Redundancy Check.
MESSAGE-INTEGRITY attribute: an HMAC-SHA1 [RFC2104] authentication code.
This document provides samples of properly formatted STUN messages including these hashes, for the sake of testing implementations of the STUN protocol.
All included vectors are represented as a series of hexadecimal values in network byte order. Each pair of hexadecimal digits represents one byte.
Messages follow the Interactive Connectivity Establishment (ICE) Connectivity Checks use case of STUN (see [RFC5245]). These messages include FINGERPRINT, MESSAGE-INTEGRITY, and XOR-MAPPED-ADDRESS STUN attributes. These attributes are considered to be most prone to implementation errors. An additional message is provided to test STUN authentication with long-term credentials (which is not used by ICE).
In the following sample messages, two types of plain UTF-8 text attributes are included. The values of certain of these attributes were purposely sized to require padding. Non-ASCII characters are represented as <U+xxxx> where xxxx is the hexadecimal number of their Unicode code point.
In this document, ASCII white spaces (U+0020) are used for padding within the first three messages - this is arbitrary. Similarly, the last message uses nul bytes for padding. As per [RFC5389], padding bytes may take any value.
The author would like to thank Marc Petit-Huguenin, Philip Matthews and Dan Wing for their inputs, and Brian Korver, Alfred E. Heggestad and Gustavo Garcia for their reviews.