0% found this document useful (0 votes)
5 views5 pages

Understanding Encryption Basics

Encryption transforms messages into secret codes to protect information, ensuring only authorized individuals can access it. There are two main types: symmetric, which uses one key, and asymmetric, which uses a pair of keys. The document also explains the Caesar Cipher as a basic encryption method and includes a Python program for encrypting and decrypting messages.

Uploaded by

ishikasharma1204
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views5 pages

Understanding Encryption Basics

Encryption transforms messages into secret codes to protect information, ensuring only authorized individuals can access it. There are two main types: symmetric, which uses one key, and asymmetric, which uses a pair of keys. The document also explains the Caesar Cipher as a basic encryption method and includes a Python program for encrypting and decrypting messages.

Uploaded by

ishikasharma1204
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

What is Encryption?

Encryption is like turning a message into a secret code so that only the right person can understand

it.

It protects information by changing it into unreadable form, and only someone with the correct key

can unlock it.

Why Do We Need Encryption?

When we chat, shop, or send data online, we want our information to stay safe. Encryption helps

protect our messages, passwords, and more.

Types of Encryption:

- Symmetric: One key is used for both locking and unlocking the message.

- Asymmetric: Uses two keys - a public one to lock and a private one to unlock.
Caesar Cipher - How It Works:

This method shifts each letter in the message by a fixed number of positions in the alphabet.

Example:

Message: ANAND

Shift: 2

Encrypted: CPCPF

Why It Matters:

It's a simple way to learn how modern encryption hides information.


Python Program to Encrypt and Decrypt 'Anand Niketan':

def encrypt(text, shift):


result = ""
for char in text:
if [Link]():
if [Link]():
result += chr((ord(char) - 65 + shift) % 26 + 65)
else:
result += chr((ord(char) - 97 + shift) % 26 + 97)
else:
result += char
return result

def decrypt(cipher, shift):


return encrypt(cipher, -shift)

message = "Anand Niketan"


shift = 3
encrypted = encrypt(message, shift)
decrypted = decrypt(encrypted, shift)

print("Original:", message)
print("Encrypted:", encrypted)
print("Decrypted:", decrypted)
Conclusion:

Encryption is a powerful tool in cybersecurity. Even a simple method like the Caesar Cipher teaches

how messages can be made secure.

What I Learned:

I understood the basics of encryption, saw how it works in real life, and even wrote a Python

program to try it out.

What's Next?

Id love to learn about stronger encryption methods like AES and RSA in the future.

You might also like