Test Vectors for Session Traversal Utilities for NAT (STUN)
RFC 5769
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.
Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3
2. Test Vectors . . . . . . . . . . . . . . . . . . . . . . . . . 3
2.1. Sample Request . . . . . . . . . . . . . . . . . . . . . . 4
2.2. Sample IPv4 Response . . . . . . . . . . . . . . . . . . . 5
2.3. Sample IPv6 Response . . . . . . . . . . . . . . . . . . . 6
2.4. Sample Request with Long-Term Authentication . . . . . . . 8
3. Security Considerations . . . . . . . . . . . . . . . . . . . . 8
4. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . 8
5. References . . . . . . . . . . . . . . . . . . . . . . . . . . 8
5.1. Normative References . . . . . . . . . . . . . . . . . . . 8
5.2. Informative References . . . . . . . . . . . . . . . . . . 8
Appendix A. Source Code for Test Vectors . . . . . . . . . . . . . 9
Denis-Courmont Informational [Page 2]
RFC 5769 STUN Test Vectors April 2010
1. Introduction
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.
2. Test Vectors
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
Show full document text