In this section of the course, we're going to be focused
on cryptographic solutions and cryptography.
Now, what is cryptography?
Well, cryptography is the practice
of writing and solving codes
in order to hide the true meaning of the information.
Now, most commonly we're going to use cryptography
as a form of encryption.
Now, encryption is the process
of converting ordinary information,
known as plaintext data,
into an unintelligible format known as ciphertext data.
So if I take some plain words
and I encrypt them into some gobbledygook,
nobody else can read it unless they have the key,
and then they can turn it back into plain text
and read it if they have that key.
That is the basic concept of encryption.
Now, encryption is used to provide us with data at rest,
data in transit, and data in use protections
to make sure we're securing all of our data,
and encryption allows us to do all of that.
Now, data exists in one of these three states
at any given time.
Data at rest is used to encrypt inactive data
that's been archived, such as data that's been resident
on a hard drive or storage device.
So when data is just sitting there as a file,
that data is known as data at rest.
Now, data in transit involves data that is moving around
and going across the network,
or data that's residing inside of the computer's memory,
which is random access memory,
and moving to or from the processor
from the storage devices.
That means it is data in transit.
Now, data in use is described as data
that is undergoing a current constant state of change.
So if you have data inside your processor
and calculations are actively being done on it,
that will be considered data in use.
Now, in order to protect our data, we can encrypt that data
while it's at rest, in transit, or in use.
Now, let me go back
and explain how encryption works a little bit here.
Let's say that I have something
like you see here on the screen.
This is gobbledygook.
You have no idea what it means, right?
Do you know what this message is?
Well, I don't the way it's currently written
but if we know that it's using a ROT13 cipher,
then that can tell you how we can figure out
how to get it back to the original plaintext
so you and I can read it.
Now, what is a ROT13 cipher?
Well, it stands for rotate 13 spots.
So if I start with something like the letter C
and I count 13 letters to the right of that,
that gets me to P.
So anytime you see a C, the answer is actually P.
If I go with an R,
13 letters to the right goes all the way past Z,
goes into A, B, C, D, E, and it gets me back to E.
So I now know I have P and E, which is C and R.
Do you see what I'm saying here?
Do you understand what it says yet?
Well, let me help you out.
Instead of making you do all the math
and figuring it on your own, I'm just going to show it to you.
And it stands for cryptography is fun.
Now that you know what the key is, that 13 places,
this makes it really easy for you to figure out
anything we want to convert back and forth,
and that is the idea with encryption.
It's not the fact that we have some algorithm
that's really complicated.
It's about the fact that we know what the key is.
And if you and I both know what that key is,
then we know how to secure our data.
Now, if I told you everything was a rotation,
you simply could figure it out by knowing what the key is
and the number there, which in this case was 13.
Now our encryption is going to be a lot more complicated that
inside of our computers,
but it's basically the same basic principle,
and I want you to understand how this works,
and seeing this ROT13 cipher is a really easy way to do it.
So now that we talked about ROT13
and we understand that it's a rotation,
we would call that an algorithm.
This is a cipher, and we're going to use the cipher,
which is simply an algorithm,
and perform an encryption or decryption function.
In my example, if you added 13, you encrypted.
If you subtracted 13, you were decrypting,
and that's all you're going to do with a ROT13 cipher.
Now, we're going to do things
that are much, much more complicated with ciphers,
and we're going to get into
all the different ciphers we use in our computers
and we'll talk about all their different algorithms,
both symmetric and asymmetric, block and stream ciphers.
We'll talk all about that in this section of the course.
And when we talk about these algorithms,
what we are referring to is a mathematical function.
Something is going to be input,
some things are going to get mathematically changed out,
and out the other side comes some scrambled up value.
So when I took my input as a C
and I went through my ROT13 cipher,
it came out the other side as a P
because it moved 13 spots to the right.
That is the idea with encryption.
All an algorithm is, is a mathematical formula
that tells you how you're going to encrypt
or decrypt something.
Now, as we move through this, we have to think
about what gives us security
inside of our cryptography and encryption devices.
What really is the strength here? Is it that ROT 13 cipher?
Well, no, it wasn't the rotation part.
It wasn't the rotation that was giving us anything,
that was just the algorithm.
Instead, it was the key, and the 13 is the key
because now we know how to move the letters back and forth.
All of our encryption strength always comes from the key,
not the algorithm.
In fact, almost all the algorithms we're going to talk about,
probably all the algorithms we're going to talk about,
have undergone public review,
meaning people have actually designed them
and opened them up so anybody could see the code
and know exactly how it works.
And if you can do that
and you've a good encryption algorithm,
that means that algorithm is not having to be secure.
It's the key that makes it secure.
And we're going to talk about that over and over again
throughout this section
because that is critically important to understand.
Now, when I talk about a key, what am I talking about?
Well, it's that essential piece of information
that determines the output of the cipher.
When we talked about the ROT13 example, the key was the 13.
It was knowing that you need to move 13 places to the right
or to the left to encrypt or decrypt the data.
Now, that's the whole idea,
and so it's really important for you to understand
that the key to security inside of our encryption
is the actual key itself.
To ensure that our keys stay secure,
we need to ensure we're using long, strong keys
and that we rotate those keys frequently
in order to keep our cryptographic implementation secure.
The longer the key, the more secure it's going to be.
And in cryptography, we say that the length of the key
is directly proportional
to the level of security it provides.
So if you have a really long key,
it's going to be stronger and more resistant
to a brute force attack.
For example, if you have 128-bit key,
that is considered secure for most applications.
But if you can go to a 256-bit key,
that's going to give you a much higher degree of protection
and it renders it exponentially more challenging
for an attacker to break it.
Moving from 128 bits to 256 bits is not doubly as strong.
It's actually exponentially as strong
because you're squaring the value.
Now, however, even if you have the strongest key possible,
that key can become vulnerable over time,
and the reason for that is technology advances
or you have prolonged exposure
because that key's been out there
for two years or three years
and somebody can eventually guess it.
Now, this is where the idea of key rotation comes into play.
Regularly changing out your cryptographic keys
is considered a best practice
and it will mitigate the risk of unauthorized decryption.
For example, many organizations implement policies
that rotate their transport layer security,
or TLS keys, annually,
and some cloud providers actually will auto rotate your keys
for you every 90 days to give you additional security.
By combining appropriate key lengths
with consistent key rotation techniques,
your organization can significantly enhance the robustness
and longevity of your cryptographic defenses.
Now, another key thing to remember about encryption
is that most, if not all,
of the encryption algorithms we use today
are considered open-source and publicly accessible.
This means that the secrecy and integrity
of the encryption keys are really what provides us
with that security, like we said before,
and not the encryption algorithm itself.
Cryptographic algorithms are intentionally designed
to be transparent while still ensuring that their strength
is derived from rigorous peer reviews
and not dependent on obfuscation techniques,
because security through obscurity
is considered to be unreliable
and an insecure process when you're operating with security.
Instead, the confidentiality of our data
lies in the secrecy and confidentiality
of those encryption keys.
If your keys are compromised,
the security assurances of the entire system crumbles,
no matter how robust your algorithm is.
Because of this, the keys must be safeguarded at all costs.
These encryption keys should always be stored
in secure hardware modules, encrypted when they're at rest,
and transmitted securely whenever they're going to be used.
Additionally, access to these keys
should be strictly limited to regular audits and monitoring
for unauthorized access
because you want to continuously make sure
that's being performed
and make sure nobody's accessing these keys
that shouldn't be.
In essence, while the entire cryptographic community
trusts the algorithms because of their transparency,
it is the secretive nature
and the stringent protection mechanisms
around those encryption keys
that ensures our data remains confidential and tamper proof.
All right, now that we covered all that,
let's talk about what we're going to talk about
in this section of the course
where we're going to be focused on Domain 1 and Domain 2,
and specifically looking at objectives 1.4, 2.3, and 2.4.
Now, objective 1.4 states
that you must be able to explain the importance
of using appropriate cryptographic solutions.
Objective 2.3 states that you must be able
to explain various types of vulnerabilities,
specifically those types of different attacks
that are trying to overcome
our cryptographic systems or algorithms.
Objective 2.4 states that given a scenario,
you must be able to analyze indicators of malicious activity
in cases of those efforts being successful,
especially downgrade attacks, collision attacks,
birthday attacks, and quantum-based cryptographic attacks.
Now, as we kick off this section,
we're going to start out with the basics of cryptography
and then work our way through the different implementations
and then into the different attack methods.
First, we'll discuss symmetric
and asymmetric encryption algorithms,
and the difference between them.
Symmetric algorithms are going to use the same key
for both encryption and decryption,
while asymmetric algorithms will use a pair of keys
with a public key and a private key
to be able to encrypt and decrypt your data.
Next, we're going to cover the different types
of symmetric algorithms
including DES, 3DES, IDEA, AES, Blowfish, Twofish,
and the Rivest Cipher suite of algorithms.
Then we're going to be focused on our coverage
of asymmetric algorithms, including Diffie-Hellman, RSA,
and Elliptic Curve Cryptography.
After that, we'll explore the world of hashing.
Hashing is a process that converts data
into a fixed-sized string of characters
which we call a message digest using a hash function.
There are various types
of hashing algorithms we're going to cover,
including MD5, the Sha family of hashes, RIPEMD, and HMAC.
Next, we're going to take a look at various types
of hashing attacks and how to increase your hash security.
Then we'll move into public key infrastructure,
known as PKI.
Now, public key infrastructure is a framework
for managing digital keys and certificates
to ensure secure data transfer and authentication occurs.
After that, we're going to look at digital certificates.
Digital certificates are electronic credentials
issued by a trusted authority
that verifies the identity of an entity
and provides a means to establish secure communications.
We'll also perform a quick demonstration
to show you how to explore the contents
of a digital certificate to ensure it's valid
and safe for use on your system.
Next, we're going to be talking about the blockchain.
Now, the blockchain is a decentralized, immutable ledger
that records transactions across multiple computers
to ensure data integrity and transparency.
We'll also talk about things like the blockchain,
the public ledger, cryptocurrency, digital controls,
and supply chain management using the blockchain.
Then we'll move into our coverage of encryption tools
including TPM, HSM,
key management systems and secure enclaves,
all of which play critical roles
in ensuring data security and integrity
across various platforms and environments.
After that, we're going to cover obfuscation techniques,
including steganography, tokenization, and data masking.
Steganography is the practice of hiding secret data
within ordinary non-secret files or messages
to avoid detection and ensure the very existence
of the message remains concealed.
Tokenization is going to involve
substituting sensitive data elements
with nonsensitive equivalents called tokens
which have no intrinsic or exploitable meaning.
Data masking or data obfuscation is the process
of disguising original data to protect sensitive information
while maintaining its authenticity
and usability for a specific purpose.
Then we're going to learn about cryptographic attacks,
including downgrade attacks, collision attacks,
and the threat of quantum computing
against our current family of encryption algorithms.
Finally, we'll take a short quiz
to see what you learned during this section of the course,
and review each of those quiz questions fully
to ensure you understand why each right answer was right.
So if you're ready, let's get started with our coverage
of cryptographic solutions in this section of the course.