Using Symmetric Encryption

In cryptography, a key is a combination of numbers that is used to encode plain text using an algorithm of our choice. In symmetric encryption, we use the same key for encryption and decryption. If the key used for symmetric encryption is K, then for symmetric encryption, the following equation holds:

EK(P) = C

Here, P is the plain text and C is the cipher text.

For decryption, we use the same key, K, to convert it back to P:

DK(C) = P

This process is shown in the following diagram:

Now, let's look at how we can use symmetric encryption with Python.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.144.124.232