passwords
Table of Contents
Passwords
Description
A password is the most common form of a secret authentication factor and is a fundamental component of digital security, typically used in conjunction with a username or ID.
Purpose and Function
- Authentication: The primary purpose is to verify a user's identity. When a user provides a password, the system checks it against a stored, secured version of that password (a hash) to grant access.
- Confidentiality: Passwords protect data and resources from unauthorized access, thereby upholding the Confidentiality pillar of the CIA Triad.
How Passwords Are Secured (Hashing)
When a user creates a password, the system does not store the password in plain text. Instead, it processes the password using a one-way cryptographic hash function (like SHA-256 or bcrypt) and stores the resulting fixed-length string, called a hash.
- Creation: User enters
P@sswOrd123. - Hashing: The system calculates a hash:
SHA256(P@sswOrd123) = 6e22…a89c. - Storage: The system stores the hash
6e22…a89cin the database. - Verification: When the user attempts to log in, the system calculates the hash of the entered password and compares the new hash against the stored hash. If they match, access is granted.
To protect against pre-computed attacks like Rainbow Tables, a random, unique string called a salt is added to the password before hashing.
Password Strength
A strong password is characterized by length and entropy (randomness). A strong password should:
- Be long (12+ characters is generally recommended).
- Be complex, using a mix of uppercase and lowercase letters, numbers, and symbols.
- Be unique and not reused across multiple sites.
Examples
. Examples of Weak vs. Strong Passwords
| Category | Password Example | Notes |
|---|---|---|
| Weak (Predictable) | password123, qwerty, 12345678, soccer |
Easily guessed or found in common dictionary attack lists. |
| Medium (Complex/Short) | Pa$$w0rd! |
Has complexity, but its shortness makes it vulnerable to fast brute-force attacks. |
| Strong (High Entropy) | W@rm-B3@n_T0@st-1988 |
Long, complex, unique, and often memorable as a "passphrase." |
| Best (Random) | 9Xp^4$t$D_bV9%2H |
Completely random, best stored and managed using a password manager. |
2. Password Attack Scenarios
Passwords are the target of several cyber attacks:
- Dictionary Attack: Attacker attempts millions of common words and phrases from a prepared list against a user's account or a stolen hash database.
- Brute-Force Attack: Attacker attempts every possible combination of characters until the correct password is found. The time required depends directly on the password's complexity and length.
- Credential Stuffing: Attacker takes a list of stolen usernames and passwords from a data breach and attempts to use them on other sites, exploiting users who reuse passwords.