- Multi-Factor Authentication (MFA)
-
Multi-Factor Authentication (MFA) is a security measure that requires two or more verification methods to gain access to a resource, such as an application, online account, or a VPN. The idea behind MFA is to create a layered defense and make it more difficult for an unauthorized person to access a target, such as a physical location, computing device, network, or database. If one factor is compromised or broken, an attacker still has at least one more barrier to breach before successfully breaking into the target.
The factors in MFA are generally categorized into three groups:
- Something You Know:
- This is knowledge-based authentication. It's something the user must remember and input when prompted.
- Examples: Passwords, PINs, security questions, or passphrases.
- Something You Have:
- This refers to something the user physically possesses.
- Examples: Smart cards, key fobs, smartphone apps (like an authenticator app that generates one-time codes), or even a USB security key.
- Something You Are:
- This involves biometric verification, which is unique to the individual.
- Examples: Fingerprint scans, facial recognition, voice recognition, or iris scans.
Some systems may also include additional factors, such as:
- Somewhere You Are (Location):
- This factor confirms the user's location, usually through GPS or IP address tracking.
- Something You Do (Behavior):
- This can include patterns like the way you type, the angle at which you hold your phone, or even your routine login times and locations.
In practice, MFA could look like entering a password (something you know) and then receiving a text with a code on your phone (something you have) or being prompted for a fingerprint scan (something you are). This multi-layered approach significantly increases security.
- Two-Factor Authentication (2FA)
-
Two-factor authentication (2FA) is a subset of MFA that specifically uses two distinct forms of identification before granting access to a user. It’s designed to add an extra layer of security by combining two different types of authentication factors, typically from two of the three categories I mentioned above: something you know, something you have, or something you are.
Here is a common example of two-factor authentication:
- Password and One-Time Passcode (OTP):
- The user enters their username and password (something they know).
After the password is entered, the user is prompted to enter a one-time passcode. This passcode can be received via SMS on the user’s phone, generated by an authenticator app, or sent through email (something they have).
The goal of 2FA is to create a more robust defense against unauthorized access by combining these different types of evidence that the user is who they claim to be. If one factor is compromised, such as a password being stolen, the unauthorized user would still need the second factor to gain access, which significantly reduces the risk of a security breach.
- One-Time Passwords (OTP)
-
A one-time password (OTP) is a password that is valid for only one login session or transaction, on a computer system or other digital device. OTPs are a form of two-factor authentication (2FA) and are designed to be more secure than static passwords.
Here's why:
- Time-sensitive: Most OTPs are designed to be used within a short period of time. After the time window has expired, the password is no longer valid, and even if it is intercepted or somehow stolen during transmission, it cannot be used again.
- Unique to Each Login: Each time a user initiates a login process, a new OTP is generated. This ensures that even if a previous OTP was intercepted, it cannot be used to access the system at a later time.
OTPs can be delivered to the user in various ways such as Email-based OTPs where the OTP is sent to the user’s email account.
The generation of OTPs is often based on algorithms that use a secret known only to the service which allows for predictable and unique generation that can be easily verified by the service.
- Time-based One-Time Passwords (TOTP)
-
Time-based One-Time Passwords (TOTP) are a specific type of one-time password that are valid for only a short period of time, usually 30 to 60 seconds. Using applications or software (like Microsoft Authenticator, Google Authenticator, or Authy) that generate an OTP on the user’s device, such as a smartphone or computer. After the time expires, a new TOTP is generated. The generation of TOTPs relies on two main components: a shared secret and the current time.
Here's how TOTP works in simple terms:
- Shared Secret:
- When you set up TOTP for an account, a unique secret is shared between the server (the service you're trying to access) and your TOTP generator (often a mobile app like Microsoft Authenticator, Google Authenticator, or other authenticator app).
- This secret is usually represented as a QR code that you scan with your device.
- Algorithm:
- Both the server and your TOTP generator use the same cryptographic algorithm using the current time as the moving factor.
- Current Time:
- The server and your device both know the current time. The algorithm uses the current time and the shared secret key to generate the TOTP. Because the time is always moving forward, the generated password is only valid for a short window.
- Authentication:
- When you attempt to log in, you enter your username and password (something you know) and the TOTP from your device (something you have). The server also generates the TOTP on its end using the shared secret and the current time.
- If the TOTP you provide matches the server's generated TOTP, you're granted access.
The main advantage of TOTP is that it's resistant to replay attacks. Even if a malicious actor intercepts the password, it will be useless after the time window has expired. This makes TOTP a popular choice for enhancing the security of online accounts.