Title: INTROSEC / authentication
Tags: authentication password_based_auth biometrics challenge_response_methods single_sign_on OTP MFA

Q: What is the definition of identification?
A: Identification is the process of stating the identity of an individual by providing distinguishing information for this person.
E.g.,
- physical world: name, surname, place, d.o.b
- digital world: email address, username

Q: What is the definition of Authentication?
A: Authentication is the act of verifying the identity of a person.
e.g.,
physical world: identity card
digital world: passwords, biometrics, certificate verification

Q: Describe the steps to access an IT System. (3)
A: 1. Identification (user proves information about identity + evidence of the authenticity)
2. Authentication (system verfies correctness of identity data)
3. Authorisation (access is provided if authentication was successfull)

Q: What are the classes of Authentication Methods?
A: - Knowledge
  - verification of an information known only to the user
  - e.g. passwords, PINs, security questions
- Ownership
  - verification of the possession of an object owned by the user
  - e.g. smartcards, TAN lists, hardware tokens, SIM card
- Inherence
  - verification of biometric characteristics of the user
  - e.g. fingerprint, face recognition, iris recognition, DNA

Q: What are challenge-response methods in the context of authentication?
A: Each user knows a secret or possesses a secret key with which they have the ability to perform cryptographic operations proving the knowledge / possession of the required key.

Q: On which factores does security depend on when using passwords?
A: - secrecy and quality of the password itself
- how the password is stored and transmitted

Q: Which strategies are common for cracking passwords?
A: - dictionary-based attacks
- brute-force attacks
- usage of rainbow tables

Q: Explain dictionary-based attacks.
A: 1. The attacker prepares / downloads a list of commonly used passwords (might be complemented with words related to the user)
2. The attacker tries to login using all passwords in the list (and variations of them)

Q: Explain brute-force attacks.
A: Attack generates and tests all possbile passwords.

Q: Why shouldn't passwords be stored in encrypted form?
A: Because the decryption key must be available on the system. If the attacker also has access to the key, the passwords can be recovered.

Q: Descripe the login procedure when using passwords in combination with hash functions.
A: 1. User provides username and password
2. System computes the hash value of the password
3. Login successful if the stored hash matches the computed one

Q: What are rainbow tables?
A: Rainbow tables are precomputed tables mapping hash values to corresponding inputs.

Q: What are Salt and Pepper?
A: Salt and pepper are randomly generated strings that are concatenated to the
user’s password before hashing.
\(\text{Hash}=h(\text{Password}\ ||\ Salt\ ||\ Pepper)\)

Q: What is the difference between Salt and Pepper?
A: - The salt is different for every user and stored in the passwords list
- The pepper is secret, shared for all useres and msut be safely stored outside the passwords list

Q: What are the advantages of Salt and Pepper?
A: - Salting complicates useage of rainbow tables
- Salting hides the phenomenon of password reuse by different users
- Usage of pepper makes even the cracking of a single hash infeasible

Q: What is Hash Stretching?
A: Hash stretching makes the computation of the password hash more intensive by repeating the application of the hash function multiple times (between 100k and one million).
Examples:
\(\text{Hash}=h(h(h(\dots h(\text{Password}\ ||\ Salt) \dots)))\)
\(\text{Hash}=h(h(h(\dots h(\text{Password}\ ||\ \text{Salt}) \ || \ \text{Salt}\ \dots)\ || \ \text{Salt} )\ || \ \text{Salt})\)

Q: What is a PBKDF?
A: Password-based Key Derivation Function.
PBKDF2 allows to derive a cryptographic key from a password which can be used as a "hash" of the password.

Q: What are the parameters of PBKDF2?
A: - pseudorandom function PRF with two parameters and fixed output size \(hLen\)
- Password \(P\)
- Salt \(S\)
- Iteration count \(c\)
- Desired key size \(kLen\)

Describe how PBKDF2 works.

Q: Name login mechanisms which protect against (automated) attacks.
A: - enforcing delay after wrong attempts
- locking the account after a certain number of wrong guesses
- require proof, that request are performed by a human (e.g. CAPTCHA)
- multi-factor authentication

Q: What are One-Time Passwords (OTP)?
A: Authentication methods in which a password can be used only once.
Preven replay attacks. Passwords can either be precomputed (TAN lists) or generated on demand.

Q: What are TAN-Lists?
A: Precomputed passwords, mostly used as a second factor to confirm the execution of security-critical operations.

Q: An OTPs value generally depends on what? How is it generated?
A: The OTPs value depends on the time in which it was generated.
Possible Implementations:
- Hash functions: \(\text{OTP}=h(\text{Time} \ || \ S_X)\) where \(S_X\) is the User-specific secret
- Symmetric encryption: \(\text{OTP}=Enc(S_X, \text{Time})\)

Q: Explain Challenge Responses in the context auf Authentication.
A: - Authentication server sends a challenge C to the user
  - VAlue C must include some randomly generated component (prevention of replay attacks)
- User performs a cryptographic operation on C to compute the respnse R
  - Response is usually ocmputed by an authenticator app
  - Ability to compute R proves the possession of the secret / key

Q: Name variations of Challenge-Response Methods in Authentication.
A: - Hash computation based on shared secret \(S_X\)
- Symmetric encryption (e.g. AES) using a shared, secret key\(K_X\)
- Signature computation (e.g. RSA) using the private key \(SK_X\)

Q: Explain Hardware Authentication Tokens.
A: - Disconnected tokens
  - Authentication data shown on integrated display
  - Usable as OTP generator
- Connected tokens
  - must be plugged into to the user's device (USB, NFC, BLuetooth,...)
  - Can be used as OTP generator or for challenge-response authentication
  - Web browsers can use them

Q: What are the advantages and disadvanteges of Hardware Tokens?
A: Advantages
- No need to remember any authentication information
- Limits the effect of password reuse when
used for multi-factor authentication
Disadvantages
- Need to remember to bring the device with
you all the time
- Can be relatively expensive
- Complete loss of security if the device is
lost or stolen

Q: Name passive Biometrics.
A: - Fingerprint
- Face recognition
- Retina / iris scan
- Hand geometry
- Palm veins
- DNA

Q: Name active biometrics.
A: - Voice recognition
- Keystroke dynamics
- Signature recognition
- Lips movement (while speaking)
- Mouse movement
- Gait analysis

Q: What are the desired characteristics of Biometric Traits? (6)
A: - Universality: Every user of the system must possess the trait
- Uniqueness: The trait should be sufficiently distinct
- Measurability: The trait must be measurable in a quantitative way
- Permanence: The trait should not vary too much over time (matching algorithm should be resistant to small changes)
- Unforgeability: The trait should be difficult to forge / imitate
- Performance: The trait should be quick, accurate and efficient to measure / compare

Q: Describe error measures.
A: Deviations must be taken into account when comparing biometric traits (e.g. glasses, bear, haircut in face recognition). This tolerance may lead to mistakes: false positives and false negatives.
These are measured in:
- False Acceptance Rate (FAR)
- False Rejection Rate (FRR)
- Equal Error Rate

Q: Describe the False Acceptance Rate (FAR).
A: False Acceptance Rate measures the security of the system (how many unauthorized users are given access to the system?).
\(FAR= \frac{\text{Number of false acceptances}}{\text{Total number of imposter attempts}}\)

Q: Describe the False Rejection Rate (FRR).
A: False Acceptance Rate measures the usability of the system (how many authorized users are denied access to the system?).
\(FRR= \frac{\text{Number of wrong rejections}}{\text{Total number of legitimate attempts}}\)

Q: Describe the Equal Error Rate.
A: The equal error rate represents a good compromise
between security and usability - the tolerance value is chosen so that \(FAR = FRR\)

Q: Describe the advantages and disadvantages of Biometric Authentication.
A: Advantages
- No need to remeber any authentication information
- Authentication information cannot be forgotten or lost
Disadvantages
- Generally inapplicable on the internet (privacy issues)
- Reliability problems (bypasses due to different users with similar biometric traits)
- Revocation is difficult / impossible

Q: Describe Multi-Factor Authentication.
A: Multiple authentication methods from different classes are employed together for user authentication.
Examples:
- Password (knowledge) + OTP generated with hardware token (ownership)
- Face recognition (inherence) + authenticator app installed on the phone (ownership)
- Password (knowledge) + OTP from a TAN list (ownership) + fingerprint (inherence)
- Password (knowledge) + PIN (knowledge) is not a multi-factor authentication!

Q: Describe Risk-Based Authentication.
A: Necessary authentication steps are chosen depending on variuos factors:
- Trustworthiness of the user
- Criticality of the required operation
- Conditions of the current access (e.g., location)
- Habits of the user

Q: Describe Single Sign-On.
A: Single Sign-On allows users to authenticate on multiple systems (Service Providers) by delegating the actual authentication process to an external Identity Provider.
Communication between user, service and identity
provider is regulated by standardised protocols (common choices are OpenID Connect and SAML).

Q: Name the Single Sign-on flows. (3)
A: - Authorisation Code Flow (classic web and mobile applications)
- Implicit Flow (web applications without backend)
- Hybrid (combination of the two, rarely used)

Describe the Authorisation Code Flow in OpenID Connect.

Q: What are the advantages and disadvantages of Single Sign-On?
A: Advantages
- User credentials are only stored at the Identity Provider
- Users need to remember only the credentials for the Identity Provider
- Service Providers do not have to implement their own authentication methods
- Identity Providers can offer multiple ways to authenticate
Disadvantages
- Identity Providers represent a single point of failure
  - Login on Service Providers not possible in case of availability issues at the Identity Provider
  - Theft of the credentials of the Identity Provider compromises security of all the accounts of the Service Providers for which the user employs Single Sign-On