Logo

dev-resources.site

for different kinds of informations.

Encryption Symmetric

Published at
10/13/2024
Categories
security
symmetricencryption
cipher
encryption
Author
kartikey_srivastava
Author
19 person written this
kartikey_srivastava
open
Encryption Symmetric

In simple words, converting a readable information(plain text) into something unreadable(also known as cipher text) to protect it from anyone who isn’t supposed to see it is what is called as Encryption. Encryption involves scrambling of a plain text to produce a cipher text with the help of a key.

Imagine you(Person A) want to send some physical item to a friend(Person B) sitting abroad. This thing is very personal and if it gets exposed both of you guys might get into some problem. So you pack the thing inside a box and lock it with a key. Both you and your friend have same copy of this key. You locked the box with the thing inside and send it to your friend. Your friend received the box and unlocked it with the same key he had and access the thing.

In this scenario, ‘A’ did encryption(boxing) whereas ‘B’ did decryption(unboxing). Since both of the parties use the same key to both encrypt and decrypt hence this process is known as ‘Symmetric Encryption’.

Below is the representation of how symmetric encryption works:

Image description

Image description

The key thing to note here is that the algorithm used here is just a mathematical formula which is designed to scramble the input whereas the key is used as a part of this formula. This algorithm is generic but the key, this is what ensures the uniqueness of the scrambled data.

Let’s understand one of the simplest encryption algorithm, called the Caesar Cipher.

This algorithm is a very basic one which simply replaces each alphabet with its subsequent character. Simply speaking, A becomes B, B becomes C and so on.

With this algorithm in play, “Hello” can become “Ifmmp” which isn’t readable hence known as the Cipher text.

This is a very poor algorithm and is rarely used in the industries as we all know a simple brute force can help us determine the actual input. Who would want their credit card information to be leaked this easily?

Modern encryption algorithms like AES-256 ensure proper uniqueness and hence are very secure from threats. I’ve myself used this algorithm in one of our company’s project. Considering the current computing capabilities, it could take almost a trillion year to decrypt this information.

Symmetric Encryption uses the same key for encryption and decryption. Hence, its very important that the key should be kept secure. Sharing this key could lead to security issues and your data can be easily exposed.

An effective strategy to use encryption algorithm is to generate the key at runtime.

This means, a new key is generated each time the data needs to be encrypted or decrypted. By new key, I mean that for a single transaction the key would remain same but for every new transaction it should be unique. After the session ends, you can either drop the key(if stored in the database) or you can expire it.

Symmetric Encryption is usually used for encrypting data at rest such as for files stored on a disk or a database. Databases that store sensitive information (like user credentials or payment details) often use symmetric encryption to secure that data when it is not actively being used.

This is it about Symmetric encryption. In future posts, we’ll dive deeper into other encryption techniques, including asymmetric encryption as well.

If you read it till here, I’d like you to please share your story in case you used this encryption algorithm in your experience. If not used, do consider giving it a try and if you liked this post, please like, comment and share to increase the reach. You can also follow me for more such content. I post on weekends. Thanks :)

encryption Article's
30 articles in total
Favicon
Encryption in React Native apps enhances data security, protecting user information and ensuring privacy. However, it also presents challenges, such as performance overhead and complex implementation
Favicon
A Deep Dive into WhatsApp’s Encryption: Identity, Keys, and Message Security
Favicon
The Birthday Paradox: A Statistical Breakdown and How it Relates to Online Security
Favicon
Obfuscating “Hello world!” obfuscate on Python
Favicon
Introducing Inline Cryptography Toolkit: Simplify Encryption, Decryption, and Hashing in VS Code 🚀
Favicon
Advantages of Asymmetric Encryption with Random Public and Symmetric Private Keys
Favicon
Cloud Security Challenges and Encryption, Identity Management, and Compliance
Favicon
Microsoft Certified Azure Administrator Associate Exam (AZ-104) Lab Preparation #5: Azure Disk Encryption
Favicon
Encryption: ciphers, digests, salt, IV
Favicon
The Evolution of Hashing Algorithms: From MD5 to Modern Day
Favicon
Email Security and Data Protection for Startups: Affordable Solutions
Favicon
Understanding SNI (Server Name Indication) and Modern Encryption Solutions
Favicon
What is RSA Asymmetric Encryption? Basics, Principles and Applications
Favicon
Encryption Vs. Decryption: What’s the Difference?
Favicon
Laravel Data Encryption and Decryption
Favicon
Unveiling A Groundbreaking Open-Source Encrypted Machine Learning Framework
Favicon
Secure Text Encryption and Decryption with Vanilla JavaScript
Favicon
Understanding SSL/TLS: The Role of Encryption and Security Protocols in Internet Communication
Favicon
Implications for Encryption and Cybersecurity with Quantum Computing
Favicon
How to Generate Your Own Public and Secret Keys for PGP Encryption
Favicon
Does S/MIME Encrypt Emails and Attachments?
Favicon
What is Token Signing in Software Publisher Certificate?
Favicon
Encryption Symmetric
Favicon
Secret management for the layman
Favicon
JavaScript Base-32 Encryption
Favicon
Comprehensive Encryption and Security Service in NestJS: Argon2 Hashing, Token Generation, and AES Encryption
Favicon
Difference Between Encryption and Hashing 🔐🔑
Favicon
Ransomware Explained: How It Works and Best Defense Mechanisms to Protect Your Data
Favicon
Debunking Most Common Cloud Computing Myths & Misconceptions
Favicon
Implementing HTTP Request and Response Encryption in ASP.NET Core with Custom Attributes

Featured ones: