CSE Roadmap

Core tier · about 3 hours · 7 parts

Part 1 of 7 · 2 min read

Why this page comes third

In this module you will

  • Name the three kinds of evidence for authentication, and say why a second kind helps.
  • Explain why passwords are stored as salted hashes, and what each part of a shadow entry holds.
  • Show with a short C program that a salt makes equal passwords give different hashes.
  • Compute how long a brute-force search takes from the cost of one hash and the size of the password space.
  • Describe the login path through PAM, and say why SSH keys avoid sending a secret.

Pages 1 and 2 assumed that the OS knows who a process belongs to: a user ID is attached to it. This page covers how that ID is first attached, at login, and what stands between an attacker and somebody else's ID. It reuses the idea of a cost, from the earlier levels: a slow check is a defence when it is slow for the attacker and still acceptable for the user. Page 4 then looks at what a process may do once the ID is set.

About this example About this example

Real: The C program in section 3 was compiled with gcc -Wall -Wextra -lcrypt and run on a Linux test machine (2 processors, kernel 6.18, glibc 2.39). The shadow lines in section 2 and the timings of about 1.6 ms and 13.7 ms for one hash were read on that machine, on one processor core.

Scripted: The attacker with 10,000 cores that each match the speed of the test machine, and the choice of password spaces, are made up to show the idea. Real attackers use graphics cards or special chips and may be faster or slower for a given hash.

Not real: The program uses one fixed password, secret, which is an example and never a good password. A real login program also limits attempts, logs failures and reads the stored hash with root rights, which the program does not do.