From the course: Writing Secure Code for Android by Infosec

Unlock this course with a free trial

Join today to access over 24,900 courses taught by industry experts.

Keys, tokens, and secrets

Keys, tokens, and secrets

- Let's talk about keys, tokens, and secrets. Now, what are those? You've probably heard those terms before. A key is anything that can be reduced to a number. That's the secret part that we use as the variable in cryptography. Remember when we talked about encryption and we said that you need something that's not encrypted. We call it clear text, even if it's not text per se. You need a an algorithm, which is a mathematical formula, also known as a cipher. And then you need something that only you or authorized people know, and that is the key, that adds a randomness of variableness to the whole formula. Without a secret key then anybody can come along and read whatever you've created. So a key is anything that can be reduced to a number, which is ultimately how we use keys. We reduce it to some kind of number, and we then use it in the mathematical formula, which is what the cipher does. Token in this case, now token can mean a lot of things, but in our case we're talking about an…

Contents