Post by Anjali Prajapati

Senior Software Engineer (AI Engineer) at CitiusTech | Python | Docker | AWS | Django | SQL | CI CD Jenkins | K8s | Grafana | LOKI | RabbitMq | Kafka

Encryption Vs Hashing Vs Salting: Ever been asked about Hashing vs. Encryption vs. Salting? 1) Hashing #: It's like a one-way street with no U-turns. When you hash data, you're transforming it into a fixed-size string of characters, making it practically impossible to reverse the process. It's great for data integrity and verifying file integrity, but there's no way to retrieve the original data from the hash. 2) Encryption 🔐: Think of it as putting your message in a locked box. Encryption scrambles your data so only someone with the right key can unscramble it back to its original form. It's like locking your message and giving the key only to the person you want to read it. 3) Salting (# + salt ) : Salting is a technique used for password hashing algorithms, It involves adding a random string of characters, known as a "salt," to each password either as a suffix or as a prefix before hashing it. This salt is then stored alongside the hashed password in a database. Let's say we have two users, user1 is having a pwd as : "pass123" and user2 is having a pwd as "mypass453". Now we will generate a random and unique salt for both of these users as "3@&457#" and "eag6#@38", then their salted pwds will be "pass@1233@&457#" and "mypass@453eag6#@38" respectively. Next step is to Hash each salted passwords and then store the generated hash with the salt in the database. *By salting passwords, even if two users have the same password, their hashed passwords will be different due to the unique salts. This adds a layer of security to the hashing process, specifically against brute force attacks.* Please feel free to add any additional information, feedback or insights you may have regarding this topic. Your inputs and feedback would be greatly appreciated.😊

Post content