,

DNSSEC, Kerberos, SSH: What Developers Should Know About Their Keys

ASSI Avatar

Cryptographic keys are used in many systems that developers work with every day. DNSSEC uses keys to verify DNS information, Kerberos uses keys to authenticate users and services, and SSH uses keys to establish secure connections and authenticate identities.

These technologies solve different problems, but they share one important requirement: their security depends on how cryptographic keys are generated, protected, distributed, and replaced.

A strong encryption algorithm cannot protect a system if its private keys are exposed or if an attacker can replace a trusted public key.

NIST SP 800-57 provides general guidance for managing cryptographic keys throughout their lifecycle. Although DNSSEC, Kerberos, and SSH have their own protocols and operational requirements, the same key management principles apply to all three. General+1

Understanding the Different Roles of Cryptographic Keys

Before looking at each technology, it helps to understand that not all cryptographic keys serve the same purpose.

Some keys are used for encryption, others for digital signatures, and others for authentication. The protection requirements depend on what the key does and what could happen if it becomes compromised.

For example, a private signing key must remain confidential because anyone possessing it may be able to produce signatures that appear legitimate. A public verification key does not need confidentiality, but its authenticity and integrity are critical.

NIST also introduces the concept of a cryptoperiod, which is the period during which a key is authorized for use. A key should not automatically remain active forever simply because it continues working. CSRC+1

The important question is not only whether a key is secure today, but also how the system will handle that key when it expires, needs replacement, or becomes compromised.

DNSSEC: Protecting the Authenticity of DNS Responses

DNS translates domain names into information such as IP addresses. Traditional DNS does not provide cryptographic authentication of the returned records.

DNSSEC, or Domain Name System Security Extensions, addresses this by adding digital signatures to DNS data.

A DNS zone is signed using a private key. A DNSSEC-validating resolver can verify the signature using the corresponding public key and a chain of trust that ultimately leads to a trusted DNSSEC key.

DNSSEC uses a chain of trust to authenticate signed DNS information.

DNSSEC commonly uses two logical key roles:

  • Zone Signing Key (ZSK): Signs DNS record sets within a zone.
  • Key Signing Key (KSK): Signs the DNSKEY record set, helping establish trust in the zone’s signing keys.

These roles may be implemented using separate keys or, in some deployments, a combined signing key.

The distinction is useful because a ZSK can be replaced without necessarily changing the trust relationship established through the parent zone.

Why DNSSEC key rotation needs planning

Suppose a domain is signed using a ZSK. If an administrator replaces that key immediately and removes the previous public key before cached signatures expire, validating resolvers may fail to verify DNS responses.

The DNS records might still exist and the authoritative server might be responding correctly, but users relying on DNSSEC validation could experience resolution failures.

A properly planned rollover allows old and new keys, signatures, and cached DNS information to remain compatible during the transition.

KSK rotation needs additional coordination because the parent zone’s DS record may also need updating.

This is why DNSSEC key management is not simply about generating a new key pair. DNS caching, signature validity, trust anchors, and rollover timing all affect availability.

DNSSEC also does not encrypt DNS queries or responses. Its primary purpose is to authenticate DNS data and protect its integrity, not provide confidentiality.

Kerberos: Authentication Using Shared Secret Keys

Kerberos works differently from DNSSEC.

Instead of relying primarily on public-key signatures, traditional Kerberos uses symmetric cryptography and a trusted Key Distribution Center (KDC) to authenticate users and services.

A typical Kerberos environment contains an Authentication Server and a Ticket Granting Server, both functions of the KDC.

Consider an employee accessing an internal application that supports Kerberos authentication.

The authentication process generally works as follows.

First, the client obtains a Ticket Granting Ticket (TGT) from the KDC. The client can then use that ticket to request a service ticket for the application it wants to access.

The service ticket contains information encrypted using a secret key associated with the target service. The client also receives session key material that allows it to prove possession of the appropriate credentials.

When the client presents the service ticket and an authenticator, the application can verify the request without receiving the user’s password.

What developers should consider

Kerberos depends heavily on protecting long-term secret keys stored by the KDC and services.

A compromised service key may allow an attacker to forge credentials for that service, depending on the environment and available information.

Developers and administrators should pay attention to service account permissions, keytab file protection, supported encryption types, and key rotation.

Clock synchronization also matters. Kerberos uses timestamps and replay protection, so significant differences between client and server clocks can cause authentication failures.

One common misunderstanding is assuming that Kerberos automatically encrypts all application traffic. Kerberos authenticates identities and establishes key material, but protecting subsequent application data depends on the protocol and security mechanisms being used.

These behaviors are defined in the Kerberos V5 specification, RFC 4120. rfc-editor.org

SSH: Keys for Server Identity and User Authentication

SSH is commonly used for remote server administration, deployment automation, and secure file transfers.

SSH uses several types of cryptographic keys, and developers should understand their different responsibilities.

A server has a host key, which identifies the server to connecting clients. Users may also have their own public and private key pairs for authentication.

During connection establishment, SSH negotiates cryptographic algorithms and establishes shared encryption keys. The server proves its identity using its host key, while the client authenticates using an accepted method, such as a user public key.

For example, a developer can generate an Ed25519 SSH key pair using:

Bash
ssh-keygen -t ed25519 -C "developer@example.com"

This creates a private key and a corresponding public key. The public key can be registered with an authorized server, while the private key remains on the developer’s machine.

A passphrase adds protection to the private key when stored on disk.

Why SSH host key verification matters

Consider a developer connecting to a server using:

Bash
ssh deploy@example.com

On the first connection, SSH may ask the developer to verify the server’s host key fingerprint.

If the host key later changes unexpectedly, SSH may display a warning that the remote host identification has changed.

This can happen after a legitimate server rebuild or host key rotation. However, it can also indicate that someone is attempting to impersonate the server.

Removing the old entry from known_hosts without verifying the replacement key defeats an important part of SSH’s security model.

The correct approach is to confirm the new fingerprint through a trusted administrative channel before accepting it.

For automated deployments, host key verification should remain enabled. Trusted host keys can be provisioned through controlled infrastructure configuration instead of accepting unknown keys automatically.

Applying NIST Key Management Principles

DNSSEC, Kerberos, and SSH use different cryptographic mechanisms, but their operational risks have a lot in common.

NIST SP 800-57 recommends managing keys throughout their lifecycle, including generation, storage, distribution, use, replacement, and destruction.

For developers, several practices are particularly useful:

  1. Protect secret and private keys. Restrict access to the systems and identities that actually need them. Consider hardware-backed protection or a managed key service when appropriate.
  2. Define rotation and recovery procedures. Account for cached DNS records, Kerberos tickets, and SSH clients that trust existing keys.
  3. Maintain a key inventory. Know which keys exist, what they protect, who owns them, and when they should be replaced.
  4. Prepare for compromise. Establish how to revoke trust, replace affected keys, and restore service without unnecessarily extending exposure.

These are general engineering practices informed by NIST guidance, not a single mandatory rotation schedule for all three protocols. General+1

A DNSSEC signing key, a Kerberos service key, and an SSH user key have different operational requirements. Their cryptoperiods and replacement procedures should reflect those differences.

Conclusion

DNSSEC protects the authenticity of DNS information, Kerberos provides ticket-based authentication, and SSH secures remote connections and supports public-key authentication.

Although their designs are different, all three depend on properly managed cryptographic keys.

For developers, understanding the cryptographic algorithms is only part of the responsibility. We also need to understand where keys are stored, how trust is established, what happens during rotation, and how systems recover when keys are compromised.

A secure implementation should not depend on keys remaining trusted and unchanged forever.

References