0
0
Cybersecurityknowledge~30 mins

Data encryption in cloud in Cybersecurity - Mini Project: Build & Apply

Choose your learning style9 modes available
Data Encryption in Cloud
📖 Scenario: You are working with a cloud storage service that holds sensitive user data. To protect this data, you need to encrypt it before uploading it to the cloud. Encryption transforms readable data into a secret code that only authorized users can decode.In this project, you will simulate the process of encrypting data using a simple method before storing it.
🎯 Goal: Build a simple data encryption setup that converts plain text into an encrypted form using a basic cipher technique. This will help you understand how data encryption works in cloud environments to keep information safe.
📋 What You'll Learn
Create a dictionary called data_to_encrypt with three exact entries: 'username': 'cloudUser', 'password': 'safePass123', and 'email': 'user@example.com'.
Create a variable called encryption_key and set it to the integer 3.
Write a function called encrypt_text that takes a string and shifts each letter forward by the encryption_key positions in the alphabet (Caesar cipher). Non-letter characters should remain unchanged.
Create a new dictionary called encrypted_data that contains the encrypted versions of the values from data_to_encrypt using the encrypt_text function.
💡 Why This Matters
🌍 Real World
Encrypting data before uploading to cloud storage protects sensitive information from unauthorized access.
💼 Career
Understanding basic encryption techniques is essential for cybersecurity roles and cloud data protection.
Progress0 / 4 steps
1
Create the data dictionary
Create a dictionary called data_to_encrypt with these exact entries: 'username': 'cloudUser', 'password': 'safePass123', and 'email': 'user@example.com'.
Cybersecurity
Need a hint?

Use curly braces {} to create a dictionary with keys and values separated by colons.

2
Set the encryption key
Create a variable called encryption_key and set it to the integer 3.
Cybersecurity
Need a hint?

Simply assign the number 3 to the variable encryption_key.

3
Write the encryption function
Write a function called encrypt_text that takes a string parameter called text and returns a new string where each letter is shifted forward by encryption_key positions in the alphabet (Caesar cipher). Letters should wrap around from 'z' to 'a'. Non-letter characters should remain unchanged.
Cybersecurity
Need a hint?

Use the ord() and chr() functions to shift letters. Check if a character is a letter with isalpha(). Keep other characters as they are.

4
Encrypt the data dictionary
Create a new dictionary called encrypted_data that contains the same keys as data_to_encrypt but with values encrypted by calling encrypt_text on each original value.
Cybersecurity
Need a hint?

Use a dictionary comprehension to apply encrypt_text to each value in data_to_encrypt.