Multi-factor authentication

Tip: Choose Save as PDF in the print dialog to download. Use A4 paper size.

Multi-factor authentication

Name:
Date:
Class:

Quick Questions

Shade in the A or B circle for each question.

1. Multi-factor authentication requires only a password to log in.
A False
B True
2. Which is more secure: a password alone, or a password plus a one-time code?
A Password alone
B Password plus one-time code
3. A one-time code sent to your phone is an example of an MFA factor.
A True
B False
4. Which factor type is a fingerprint scan?
A Something you know
B Something you are
5. Disabling MFA makes an account harder to compromise.
A False
B True

Match the Pairs

Draw a line connecting each item on the left to its match on the right.

Left columnRight column
1otp = generate_otp() AGranting access only when both factors are verified
2if password_ok and otp_ok: BThe mistake: using a fixed, predictable one-time code
3MFA adds a second verification step beyond the password Cverify_otp(code, otp_correct)
4A code sent to a trusted device is a common MFA factor DGenerating a one-time code for the second factor
5skip_otp = True EThe mistake: bypassing the OTP check, disabling MFA
6otp = "000000" Fsend_otp(user, otp)

Definitions

Multi-factor authentication

Fill in the Blanks

Complete each line of code by filling in the missing parts.

1.
___ = get_otp_code()
2.
if passwordOk ___ otpOk:
3.
__________(code, otp_correct)
4.
___________ = True
5.
authenticate(password, ___)

Spot the Error

Shade in the letter of the line that contains an error.

Question 1
A require_mfa = False
B verify_password()
C verify_otp()
Question 2
A verify_password()
B skip_otp = True
C verify_otp()
Question 3
A login_ok = check_password()
B otp_ok = True
C grant_access()
Question 4
A password_ok = login()
B otp_code = get_otp()
C if password_ok:
D grant_access()
E skip_otp_check = True
Question 5
A otp = generate_otp()
B send_otp(user, otp)
C otp = "000000"

Answer Key

Multi-factor authentication
Section A: Quick Questions
Q1
A — False
Q2
B — Password plus one-time code
Q3
A — True
Q4
B — Something you are
Q5
A — False
Section B: Match the Pairs
Q1
otp = generate_otp() → Generating a one-time code for the second factor
Q2
if password_ok and otp_ok: → Granting access only when both factors are verified
Q3
MFA adds a second verification step beyond the password → verify_otp(code, otp_correct)
Q4
A code sent to a trusted device is a common MFA factor → send_otp(user, otp)
Q5
skip_otp = True → The mistake: bypassing the OTP check, disabling MFA
Q6
otp = "000000" → The mistake: using a fixed, predictable one-time code
Section C: Definitions
Q1
Multi-factor authentication — A login method that requires two or more independent proofs of identity, such as a password plus a one-time code.
Section D: Fill in the Blanks
Q1
otp = get_otp_code()
Q2
if passwordOk and otpOk:
Q3
verify_otp(code, otp_correct)
Q4
mfa_enabled = True
Q5
authenticate(password, otp)
Section E: Spot the Error
Q1
A — Line 1 disables MFA (require_mfa = False), skipping the second authentication factor entirely.
Q2
B — Line 2 sets skip_otp to True, bypassing the required one-time code check.
Q3
B — Line 2 hardcodes otp_ok to True instead of actually verifying the entered code.
Q4
E — Line 5 sets skip_otp_check to True, allowing access without verifying the OTP.
Q5
C — Line 3 overwrites the randomly generated OTP with a fixed, guessable value.