Authentication in FreeBSD 5.0

June 2002


Table of Contents

1. Introduction
1.1. Trademark Acknowledgments
2. Software-Based Authentication Mechanisms
2.1. Traditional Unix Authentication
2.1.1. Overview
2.1.2. Hash Functions
2.1.3. Shadow Passwords
2.1.4. Strengths
2.1.5. Weaknesses
2.2. OPIE
2.2.1. Overview
2.2.2. FreeBSD Integration
2.2.3. Strengths
2.2.4. Weaknesses
2.3. Kerberos
2.3.1. Overview
2.3.2. FreeBSD Integration
2.3.3. Strengths
2.3.4. Weaknesses
3. Centralized Authentication
3.1. NIS
3.1.1. Overview
3.1.2. Strengths
3.1.3. Weaknesses
3.2. Kerberos
3.2.1. Strengths
3.2.2. Weaknesses
3.3. LDAP
3.4. Radius
4. Pluggable Authentication Modules
5. Hardware-Based Authentication Mechanisms
5.1. Key Storage
5.2. Dynamic Key Generation
5.3. Biometrics
Glossary

YTBW

The most common hash function is based on DES. It consists of doing 25 encryption rounds with a fixed key, using a 24-bit ‘salt’, which is usually generated by a PRNG, to render the algorithm irreversible. The salt is usually generated randomly for each password, and is included in the output of the hash function so it can be used to hash the password typed in by the user at logon time.

The traditional DES-based hash only hashes the first eight octets of its input, making brute-force attacks on a leaked password list feasible on modern hardware. For that reason, FreeBSD only supports it for backward compatibility and interoperability with other operating systems. For day-to-day use, FreeBSD prefers a hash function developed by Poul-Henning Kamp, based on MD5. It supports passwords of arbitrary length, and is far slower to compute, making brute-force attacks far more difficult.

FreeBSD also supports yet another hash function designed by David Mazieres and based on the Blowfish cipher. It can handle passwords of arbitrary length, like the MD5-based hash, but also an arbitrary number (up to 231) of encryption rounds, allowing the admin to select a suitable compromise between convenience (a slow logon annoys users) and security (slow hashing makes brute-force attacks more difficult), and to update this figure over time, as processor speeds increase.

Most other Unix-like operating systems only support the DES-based algorithm, while NetBSD and OpenBSD support the same algorithms as FreeBSD, and at some Linux distributions have recently started to use an MD5-based hash.

Centralized authentication systems address the problem of maintaining a uniform authentication database across multiple systems.

A common theme to all the systems listed below is that—unless the server crashes—the user will normally not be aware of their use; they work entirely behind the scenes, and the user will not know that the system she is logging in on obtained her authentication data from a server rather than a local file.

YTBW

DES

Data Encryption Standard

KDC

Kerberos Domain Controller

NIS

Network Information Service

OPIE

‘One-time Passwords In Everything’, a reimplementation of S/Key.

See Also S/Key.

OTP

One-Time Password

PAM

Pluggable Authentication Modules

PDA

Personal Digital Assistant

PRNG

Pseudo-random number generator

S/Key

A challenge / response system based on generating a keystream from a user-provided passphrase.

Salt

A random factor which is introduced into a symmetric encryption algorithm to make it irreversible.