Authentication: What You Know, Have and Are
Security's Two Questions
Security boils down to two questions.• Who are you?
• What should you have access to?
Access should be given to authorized people and refused to the wrong people.
To differentiate between authorized and unauthorized personnel we use authentication, the process by which the computer understands who it is interacting with. Authentication measures protect devices and information from unauthorized access, and examples of them include strong passwords and multifactor authentication.
Multifactor Authentication
Multifactor authentication is a method of computer access control in which a user is only granted access after successfully presenting several separate pieces of evidence to an authentication mechanism, typically in at least two of the following categories.Read the end of that definition again. At least two of the CATEGORIES. Two pieces of evidence from the same category are not multifactor authentication, however separate they feel.
Multifactor authentication requires at least two steps to unlock protected information. Each step adds a new layer of security that must be broken to gain unauthorized access. A stolen password on its own no longer opens the account.
| Category | Based on | Example |
|---|---|---|
| Knowledge, what you know | A secret known only to the real user and the computer | A username and password |
| Possession, what you have | Possession of a secret token that only the real user has | A physical key and lock |
| Inherence, what you are | You. You authenticate by presenting yourself to the computer | Fingerprint readers and iris scanners |
What You Know
A username and password is easy to implement, and can be compromised if hackers can guess or find out the password. Some are easy for humans to figure out, such as 1234 or 1111.Computers can try to brute force all password combinations. A 4-digit ATM PIN has only 10,000 combinations, from 0000 to 9999.
Many websites now require upper and lower case, numbers and special symbols, to explode the number of combinations. An 8-digit PIN has 100,000,000 combinations, since each of the eight positions holds one of ten digits.
The program below counts the 8-character passwords made from 62 characters, one position at a time. Then it works out how long trying them all takes at a billion guesses a second. Run it, then make each change below and run it again. Press Reset before each change, so that each one starts from the original program.
• Change
alphabet to 95, every printable symbol on the keyboard.• Change
length to 9, and compare its count with the 6,634 trillion for 95 symbols in the example.• Change
length to 12. From 9 characters on, the counts pass 9007199254740991, the largest whole number JavaScript is sure to hold exactly. From 10 on, the last printed digits are rounded. In JavaScript, 3.2e+21 means 3.2 times 10 to the power 21.let alphabet = 62;
let length = 8;
let guessesPerSecond = 1000000000;
let count = 1;
for (let position = 1; position <= length; position++) {
count = count * alphabet;
console.log(count, "passwords of length", position);
}
let seconds = Math.floor(count / guessesPerSecond);
let days = Math.floor(seconds / (60 * 60 * 24));
console.log("Whole days to try them all:", days);
console.log("Whole years to try them all:", Math.floor(days / 365));
Output
Press Run to see what this program prints.
Note: This IDE is for experimenting with the code in this lesson. Your changes are not saved, and refreshing the page puts back the original lesson code.
What You Have
What you have is based on the possession of a secret token that only the real user has, such as a physical key and lock.• You can open the door if you have the key.
• It avoids the problem of being guessable.
• It is harder for a remote attacker.
• But it can be compromised if the hacker is close by: keys can be copied, phones can be stolen, and even locks can be picked.

What You Are
What you are is based on YOU. You authenticate by presenting yourself to the computer, through biometric authenticators such as fingerprint readers and iris scanners. These are secure but can be expensive, and the data coming off the sensors varies over time.What you know and what you have are deterministic, meaning always predicting the same output from a given input. If you know the password or have the key you are granted access 100 percent of the time, and if you do not, you are granted access 0 percent of the time.
Biometric authenticators are probabilistic, meaning an element of chance is involved and different output may come from the same input.
| Deterministic: what you know, what you have | Probabilistic: what you are | |
|---|---|---|
| Same input, same answer? | Always | Not necessarily |
| Can it refuse the real user? | No | Yes, if lighting is bad or you are wearing glasses |
| Can it admit the wrong person? | Not without the secret or the token | Yes, it can recognise someone who is not you, such as your twin |
| Can it be reset after a compromise? | Yes, change the password or the lock | No |