Reader small image

You're reading from  Ethical Hacking Workshop

Product typeBook
Published inOct 2023
PublisherPackt
ISBN-139781804612590
Edition1st Edition
Right arrow
Authors (2):
Rishalin Pillay
Rishalin Pillay
author image
Rishalin Pillay

Rishalin Pillay is an Offensive Cybersecurity expert who holds a number of awards and certifications from multiple companies in the Cybersecurity industry. He is well known for his contributions to online learning courses related to Red Teaming and as the author of Learn Penetration Testing. He holds Content Publisher Gold and Platinum awards for his contributions made towards the Cybersecurity Industry, including the Events Speaker Gold award for influential public speaking at Tier-1 business events.
Read more about Rishalin Pillay

Mohammed Abutheraa
Mohammed Abutheraa
author image
Mohammed Abutheraa

Mohammed Abutheraa is Cybersecurity specialist who has over 15 years of experience in IT security, risk management, security infrastructure, and technology implementation in both private and public sector environments. He worked as Incident Response and Remediation Advisor and supported customers remediating against major incidents in the last years. He has experience in Threat Intelligence and Proactive Services like Vulnerability Assessments and Red / Purple Teaming experiences.
Read more about Mohammed Abutheraa

View More author details
Right arrow

Cryptography Primer

Cryptography is the cornerstone of communication in today’s world. The use of cryptography to encrypt data has been done since ancient times and is still done today. Today, with the multitudes of data leakage and privacy concerns, it’s no wonder that encryption is a key point in both our daily lives and business communication. This chapter will serve as a primer for cryptography, whereby we will highlight some of the key aspects of encryption.

In this chapter, we will cover the following main topics:

  • What is encryption?
  • Overview of common encryption ciphers
  • Encryption algorithms
  • Common types of encryption attacks
  • Encryption in the cloud

Technical requirements

This chapter has no technical requirements.

What is encryption?

What exactly is encryption? It sounds complex, but it is not. Encryption involves a mathematical algorithm that changes (encodes) plain text data into something that is not readable (ciphertext). Encryption can be broken down into two main components:

  • An encryption algorithm, which is a set of mathematical calculations that serve a specific purpose. You will find that these algorithms are further split into symmetric and asymmetric algorithms, which we will cover a bit later. Essentially, an algorithm is used to encrypt data. It can also be coupled with an authentication measure to provide data integrity.
  • A cryptographic key. This key is a string of letters that is random, unpredictable, and varies in length and is used to encrypt or decrypt data.

Encryption is not new – it has been around for decades. There are historical accounts of encryption being used in ancient Egypt, whereby various hieroglyphics were changed to obscure the meaning...

Encryption algorithms

As you learned in the preceding sections, encryption has been around for many years. You also saw some classic ciphers and their pitfalls. Now, let’s focus on encryption algorithms and look at the difference between symmetric and asymmetric encryption.

Symmetric encryption

When symmetric encryption is used, the same key is used to both encrypt and decrypt data. This means that if two parties are communicating, both parties will hold an identical key that is never exposed. Hence, symmetric encryption is also known as private key encryption.

The following figure shows how symmetric encryption operates, whereby the same key is used to encrypt and decrypt the data:

Figure 3.2 – Symmetric encryption

Figure 3.2 – Symmetric encryption

Symmetric key encryption is used to encrypt copious amounts of data with less resource overhead. It is also faster than asymmetric encryption since it can scale easily and is used a lot in large organizations.

Symmetric...

Encryption in the cloud

As organizations are using cloud services more rapidly, the need to ensure data encryption is in more demand. Cloud vendors today have several different options that are available for consumers to use.

The need for these encryption options has derived from various aspects, such as regulatory constraints, whereby the uncertainty of government agencies having access to your data is a concern, and data protection, whereby you need to ensure that your data is protected and encrypted while in transit and at rest.

Every cloud provider has several encryption offerings that span data in transit, data at rest, and data in use. We will not cover these offerings in this section as you can explore them by visiting your cloud provider’s home page.

The key to encryption in the cloud is understanding the challenges that come with it. Although encryption in the cloud is relatively simple, it is still possible to overlook it. One of the key pillars to understanding...

Summary

Encryption is such as vast topic that we could write books dedicated to just encryption. In this chapter, we covered encryption. We provided an introduction to the history of encryption and looked at how encryption has evolved. We also covered the most common encryption ciphers, along with the most common attacks on encryption technologies today. We covered some classical ciphers that are still being used today. As you do research and read up on rampant malware, you will often find that classic ciphers are used, along with modern ones. In the next chapter, we will start looking at reconnaissance and get our hands dirty with hands-on labs.

lock icon
The rest of the chapter is locked
You have been reading a chapter from
Ethical Hacking Workshop
Published in: Oct 2023Publisher: PacktISBN-13: 9781804612590
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
undefined
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime

Authors (2)

author image
Rishalin Pillay

Rishalin Pillay is an Offensive Cybersecurity expert who holds a number of awards and certifications from multiple companies in the Cybersecurity industry. He is well known for his contributions to online learning courses related to Red Teaming and as the author of Learn Penetration Testing. He holds Content Publisher Gold and Platinum awards for his contributions made towards the Cybersecurity Industry, including the Events Speaker Gold award for influential public speaking at Tier-1 business events.
Read more about Rishalin Pillay

author image
Mohammed Abutheraa

Mohammed Abutheraa is Cybersecurity specialist who has over 15 years of experience in IT security, risk management, security infrastructure, and technology implementation in both private and public sector environments. He worked as Incident Response and Remediation Advisor and supported customers remediating against major incidents in the last years. He has experience in Threat Intelligence and Proactive Services like Vulnerability Assessments and Red / Purple Teaming experiences.
Read more about Mohammed Abutheraa