Want to keep learning?

This content is taken from the Raspberry Pi Foundation & National Centre for Computing Education's online course, Introduction to Encryption and Cryptography. Join the course to learn more.

What is encryption?

In this step you will learn what encryption is and how it can be used.

The definition of encryption

Encryption is a process that transforms data into something that appears random and nonsensical, or otherwise obscures the meaning of the data; the original data can be recovered through the process of decryption. The data that is encrypted is often referred to as the plaintext; it becomes the ciphertext when it is encrypted.

A machine that takes a plaintext message and a key and outputs a ciphertext

This data could be a secret message, an image, a voice recording, or even the entire contents of your phone.

There are lots of ways of encrypting data. In this course, you will learn about several modern and historical examples.

What is the purpose of encryption?

Encryption is used to protect information. Encryption is used to protect the messages you send to your bank, to prevent hackers from spending your money. You might also use it to encrypt your messages to friends, or the contents of your computer. It is used by organisations and governments to protect sensitive data and plans, as well as by offenders, to stop the police collecting evidence on them.

You might think about encryption as a way of restricting access to data. When data has been encrypted, it is accessible only to those who know how to reverse the encryption process, or decrypt the data.

A machine that takes a ciphertext and a key and outputs a plaintext message

Any encryption can be decrypted, and for every example of encryption you learn about in this course, you will also learn about its decryption process.

Encrypting, enciphering, and encoding

When learning about encryption, you will encounter many new terms, some of which may sound similar. It might help if you create a glossary of terms as you work through the steps. If you have any other, more creative ways of learning technical terms or teaching them to your students, share them in the comments.

Three terms that are often confused are encrypting, enciphering, and encoding. As you now know, encrypting data transforms it from its plaintext form to something that cannot be understood.

The algorithm used for encryption is often referred to as a cipher, so sometimes the act of encryption is also called enciphering. This is a form of encryption that can only be used on text. When text is enciphered, it is transformed from plaintext to ciphertext. It can then be deciphered back into plaintext again.

When you encode data, you also transform it from one format to another. However, the objective of encoding is to change the usability of data, not its accessibility. An example of encoding data is converting a sound file from MP3 to WAV format. This process can be completed and reversed by anyone, but if the sound file had been encrypted, only those who had been given permission would be able to decrypt it. We will look at how permission is given in a later step.

You can find out more about encoding in our Data representation course.

Next steps

In the next step, you will see a brief history of encryption and learn about the ways in which it has developed over the past 2,000 years.


  • Do you use encryption in any of the ways discussed in this step? Do you use encryption in any other ways?
  • Do you understand how the encryption systems you use work?
  • How secure do you think modern encryption systems are?

Share your thoughts in the comments.

Share this article:

This article is from the free online course:

Introduction to Encryption and Cryptography

Raspberry Pi Foundation