9. Authentication (2)
9. Authentication (2)
School of CSE 1
User Authentication
Three types of user authentication
1. Something You Know
2. Something You Have
3. Something You Are
School of CSE 2
Access Control
• Two parts to access control…
• Authentication: Are you who you say you are?
– Determine whether access is allowed or not
– Authenticate human to machine
– Or, possibly, machine to machine
• Authorization: Are you allowed to do that?
– Once you have access, what can you do?
– Enforces limits on actions
• Note: “access control” often used as synonym
for authorization
School of CSE 3
Are You Who You Say You Are?
School of CSE 4
Something You Know
• Passwords
• Lots of things act as passwords!
– PIN
– Social security number
– Mother’s maiden name
– Date of birth
– Name of your pet, etc.
School of CSE 5
Trouble with Passwords
• “Passwords are one of the biggest practical
problems facing security engineers today.”
• “Humans are incapable of securely storing high-
quality cryptographic keys, and they have
unacceptable speed and accuracy when
performing cryptographic operations. (They are
also large, expensive to maintain, difficult to
manage, and they pollute the environment. It is
astonishing that these devices continue to be
manufactured and deployed.)”
School of CSE 6
Why Passwords?
School of CSE 7
Keys vs Passwords
School of CSE 9
Password Experiment
• Three groups of users each group
advised to select passwords as follows
– Group A: At least 6 chars, 1 non-letter
winner
– Group B: Password based on passphrase
– Group C: 8 random characters
• Results
– Group A: About 30% of pwds easy to crack
– Group B: About 10% cracked
• Passwords easy to remember
– Group C: About 10% cracked
• Passwords hard to remember
School of CSE 10
Password Experiment
School of CSE 11
Attacks on Passwords
• Attacker could…
– Target one particular account
– Target any account on system
– Target any account on any system
– Attempt denial of service (DoS) attack
• Common attack path
– Outsider normal user administrator
– May only require one weak password!
School of CSE 12
Password Retry
School of CSE 13
Password File?
• Bad idea to store passwords in a file
• But we need to verify passwords
• Solution? Hash passwords
– Store y = h(password)
– Can verify entered password by hashing
– If Trudy obtains the password file, she
does not (directly) obtain passwords
• But Trudy can try a forward search
– Guess x and check whether y = h(x)
School of CSE 14
Dictionary Attack
School of CSE 15
Salt
School of CSE 16
Password based Authentication
School of CSE 17
Password based Authentication
School of CSE 18
Math of Password Cracking
• Assumptions:
• Pwds are 8 chars, 128 choices per character
• Then 1288 = 256 possible passwords
• There is a password file with 210 pwds
• Attacker has dictionary of 220 common pwds
• Probability 1/4 that password is in dictionary
• Work is measured by number of hashes
School of CSE 19
Math of Password Cracking: Case 1
• Attack 1 specific password without using a dictionary
• E.g., administrator’s password
• Must try 256/2 = 255 on average
• Like exhaustive key search
• Does salt help in this case?
School of CSE 20
Math of Password Cracking: Case 2
• Attack 1 specific password with dictionary
• With salt
• Expected work: 1/4 (219) + 3/4 (255) ≈ 254.6
• In practice, try all pwds in dictionary…
• …then work is at most 220 and probability of
success is 1/4
• What if no salt is used?
• One-time work to compute dictionary: 220
• Expected work is of same order as above
• But with precomputed dictionary hashes, the “in
practice” attack is essentially free…
School of CSE 21
Math of Password Cracking: Case 3
• Any of 1024 pwds in file, without dictionary
• Assume all 210 passwords are distinct
• Need 255 comparisons before expect to find pwd
• If no salt is used
• Each computed hash yields 210 comparisons
• So expected work (hashes) is 255/210 = 245
• If salt is used
• Expected work is 255
• Each comparison requires a hash computation
School of CSE 22
Math of Password Cracking: Case 4
• Any of 1024 pwds in file, with dictionary
• Prob. one or more pwd in dict.: 1 – (3/4)1024 ≈ 1
• So, we ignore case where no pwd is in dictionary
• If salt is used, expected work less than 222
• Work ≈ size of dictionary / P(pwd in dictionary)
• What if no salt is used?
• If dictionary hashes not precomputed, work is
about 219/210 = 29
School of CSE 23
Other Password Issues
• Too many passwords to remember
– Results in password reuse
– Why is this a problem?
• Who suffers from bad password?
– Login password vs ATM PIN
• Failure to change default passwords
• Social engineering
• Error logs may contain “almost” passwords
• Bugs, keystroke logging, spyware, etc.
School of CSE 24
Passwords
• The bottom line…
• Password attacks are too easy
– Often, one weak password will break security
– Users choose bad passwords
– Social engineering attacks, etc.
• Trudy has (almost) all of the advantages
• All of the math favors bad guys
• Passwords are a BIG security problem
– And will continue to be a problem
School of CSE 25
Password Cracking Tools
• Popular password cracking tools
– Password Crackers
– Password Portal
– L0phtCrack and LC4 (Windows)
– John the Ripper (Unix)
• Admins should use these tools to test for
weak passwords since attackers will
• Good articles on password cracking
– Passwords - Conerstone of Computer Security
– Passwords revealed by sweet deal
School of CSE 26
Biometrics
School of CSE 27
Something You Are
• Biometric
– “You are your key” Schneier
Examples
o Fingerprint
o Handwritten signature Are
o Facial recognition
Know Have
o Speech recognition
o Gait (walking) recognition
o “Digital doggie” (odor recognition)
o Many more!
School of CSE 28
Why Biometrics?
School of CSE 29
Ideal Biometric
• Universal applies to (almost) everyone
– In reality, no biometric applies to everyone
• Distinguishing distinguish with certainty
– In reality, cannot hope for 100% certainty
• Permanent physical characteristic being
measured never changes
– In reality, OK if it to remains valid for long time
• Collectable easy to collect required data
– Depends on whether subjects are cooperative
• Also, safe, user-friendly, and ???
School of CSE 30
Identification vs Authentication
• Identification Who goes there?
– Compare one-to-many
– Example: FBI fingerprint database
• Authentication Are you who you say you are?
– Compare one-to-one
– Example: Thumbprint mouse
• Identification problem is more difficult
– More “random” matches since more comparisons
• We are (mostly) interested in authentication
School of CSE 31
Enrollment vs Recognition
• Enrollment phase
– Subject’s biometric info put into database
– Must carefully measure the required info
– OK if slow and repeated measurement needed
– Must be very precise
– May be a weak point in real-world use
• Recognition phase
– Biometric detection, when used in practice
– Must be quick and simple
– But must be reasonably accurate
School of CSE 32
Something You Have
School of CSE 33
Password Generator
1. “I’m Alice”
3. PIN, R
2. R
4. h(K,R)
password
generator 5. h(K,R)
K Alice Bob, K
School of CSE 34
2-factor Authentication
• Requires any 2 out of 3 of
o Something you know
o Something you have
o Something you are
• Examples
– ATM: Card and PIN
– Credit card: Card and signature
– Password generator: Device and PIN
– Smartcard with password/PIN
School of CSE 35
Single Sign-on
School of CSE 36
Web Cookies