I replaced all of the saving code that saved the pw in cleartext with real encryption to make it secure.
I used the cryptography library and Imported Fernet and hashing tools (PBKDF2HMAC) to do the encryption.
I also used Key Derivation and Added a function that takes the master password and hashes it 480.000 times and also with a random salt.
I uses AES-256 which takes a 256-bit and uses it to encrypt your vault data by transforming it into 128 bit blocks. Also gemini helped me with that.
kdf = PBKDF2HMAC(
algorithm=hashes.SHA256(),
length=32, # 32 bytes = 256 bits
salt=salt,
iterations=480000,
)
aes_key = base64.urlsafe_b64encode(kdf.derive(master_password.encode()))
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.