Ayubowan 🙏🏾, my name is Asanka

Cover

*NOTICE*

I am discontinuing my Blogger blog in favour of the modern and up to date Hashnode blog. Please find me there moving forward. Refer to this article for more information:
 
🤔 Knowing how to code makes you look at the world from a different perspective 🌏. That's why I'm so passionate about coding. Hello World 👋; welcome to my Blog 🚧. I'm still a student and am 23 years of age, so there's a long journey ahead of me 🙆. I like to dream 💬 big and to see other peoples dreams come true. I'm a tech nerd 🐱‍💻 and a coding enthusiast. Hope you might find me amusing.🤩

  “It is man that ends, but his works can endure.” - The Watchmakers Apprentice

facebook github instagram twitter linkedin YouTube Deviant Pinterest

Catch me on Fiverr        Learn more

Muragala Password Manager - #02 Under the Hood

Poster

Hello All 👋,

I wanted to quickly mention how the application works. Both C# edition and Python edition work the same way. It uses Fernet Encryption which is an advanced encryption method used to encrypt strings of data. It requires a key in order to encrypt data. However, since we want the user to enter their own master password, we do not generate a key, but we hash the password with a salt in order to generate a key.

The salt is stored in a file called preference.en as a dictionary of a JSON. It also contains a hash of the password so that we can verify that the password entered for login is correct. All hashing is done with SHA256.

A separate database.en file stores the passwords. It follows a structure as follows:

Database Structure

In order to decrypt it, we follow the following procedure:

Decryption Method

Regardless of whether C# or Python, the setup goes as above. Therefore data from one edition is cross compatible with the other.

For the Fernet encryption, in Python edition the Cryptgraphy.IO library is used. On the C# application, this is done using Fernet.net library by thangchung.

Cheers 🎉

External Links

Comments