Test vectors for STUNNokia CorporationP.O. Box 407NOKIA GROUP00045FI+358 50 487 6315remi.denis-courmont@nokia.com
Transport
Behavior Engineering for Hindrance AvoidanceSTUNtestvectorsfingerprint 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.
The Session Traversal Utilities for NAT
(STUN)
protocol defines two different hashes that may be included in
messages exchanged by peers implementing that protocol:
a 32-bits Circular Redundancy Check.
a HMAC-SHA1 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 ICE Connectivity Checks use case of STUN,
(see ).
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 purposedly 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 ,
padding bytes may take any value.
This request uses the following parameters:
"STUN test client" (without quotes)
"evtj:h6vY" (without quotes)
"VOkJxbRl1RmTxUk/WvJxBt" (without quotes)
This response used the following parameter:
"VOkJxbRl1RmTxUk/WvJxBt" (without quotes)
"test vector" (without quotes)
192.0.2.1 port 32853
This response used the following parameter:
"VOkJxbRl1RmTxUk/WvJxBt" (without quotes)
"test vector" (without quotes)
2001:db8:1234:5678:11:2233:4455:6677 port 32853
This request uses the following parameters:
"<U+30DE><U+30C8><U+30EA><U+30C3><U+30AF><U+30B9>"
(without quotes)
unaffected by SASLprep processing
"The<U+00AD>M<U+00AA>tr<U+2168>" resp
"TheMatrIX" (without quotes)
before resp after SASLprep processing
"f//499k954d6OL34oL9FSTvy64sA" (without quotes)
"example.org" (without quotes)
There are no security considerations.
This document raises no IANA considerations.
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 García
for their reviews.