Cryptography is the science of protecting information by changing it into a format that only certain people can understand. It ensures messages stay private, safe, and unchanged while being sent or stored.

Plaintext

Plaintext is the original message or data that can be easily read and understood.

Example: Hello, this is a secret!

Cipher

A cipher is a method or set of rules used to change plaintext into a secret message.

Example: Caesar Cipher shifts each letter by 3.
HELLO → KHOOR

Encryption

Encryption is the process of using a cipher and a key to turn plaintext into unreadable data (called ciphertext).

encrypt(plaintext, key) → ciphertext

Ciphertext

Ciphertext is the scrambled or unreadable version of the message after encryption.

Example: U2FsdGVkX1+3GjS8kFZbVQ==

Decryption

Decryption is the reverse of encryption. It turns ciphertext back into the original plaintext using a key.

decrypt(ciphertext, key) → plaintext

Encryption Process Diagram

This shows how encryption and decryption work together:

[Plaintext] 
    ↓ (Encryption with Key)
[Ciphertext]
    ↓ (Decryption with Key)
[Plaintext]