TSIG

TSIG (Transaction SIGnature) is a computer networking protocol defined in RFC 2845. It is used primarily by the Domain Name System (DNS) to provide a means of authenticating updates to a Dynamic DNS database, although it can also be used between servers and for regular queries. TSIG uses shared secret keys and one-way hashing to provide a cryptographically secure means of identifying each endpoint of a connection as being allowed to make or respond to a DNS update.

Although queries to DNS may be made anonymously (but see DNSSEC), updates to DNS must be authenticated since they make lasting changes to the structure of the Internet naming system. The use of a key shared by the client making the update and the DNS server guarantees the authenticity of the update request. However, the update request may be passing over an insecure channel (the Internet). A one-way hashing function is used to prevent malicious observers from learning the secret key and using it to make their own modifications.

A timestamp is included in the TSIG protocol to prevent recorded responses from being reused, which would allow an attacker to breach the security of TSIG. This places a requirement on dynamic DNS servers and TSIG clients to contain an accurate clock. Since DNS servers are connected to a network, Network Time Protocol may be used to provide an accurate time source.

DNS updates, like queries, normally are transported via UDP since it requires lower overhead than TCP. However, DNS servers support both UDP and TCP requests.

Contents

Implementation

An update, as specified in RFC 2136, is a set of instructions to a DNS server. These include a header, the zone to be updated, the prerequisites that must be satisfied, and the record(s) to be updated. TSIG adds a final record, which includes a timestamp and the hash of the request. It also includes the name of the secret key that was used to sign the request. RFC 2535 has recommendations on the form of the name.

The response to a successful TSIG update will also be signed with a TSIG record. Failures are not signed to prevent an attacker from learning anything about the TSIG key using specially crafted update "probes".

The nsupdate program can use TSIG to do DNS updates.

The TSIG record is in the same format as the other records in the update request. The meaning of the fields is described in RFC 1035.

TSIG record fields
Field Bytes Description
NAME max 256 Key name, which must be unique on client and server
TYPE 2 TSIG (250)
CLASS 2 ANY (255)
TTL 4 0 (since TSIG records must not be cached)
RDLENGTH 2 Length of RDATA field
RDATA variable Structure containing the timestamp, algorithm and hash data

Alternatives to TSIG

Although TSIG is widely deployed, there are several problems with the protocol:

As a result, a number of alternatives and extensions have been proposed.

See also

References

External links