


To access passwords stored with YAPM, the user's master password (which has to be at least 15 characters) is required. YAPM uses Libsodium (C# wrapper) as the cryptographic library. A mistake here would be to use a fast hash algorithm which isn't designed for password storage, such as MD5 or SHA-256.Īll files are stored in %appdata%/YAPM. Argon2 is very slow, resulting in a delay of a few seconds at login - but that is exactly what we want: The algorithm to hash the password needs to be slow so that brute-force attacks take a long time to find the password used to create the hash. Users are authenticated with an Argon2i hash (and salt) of the master password which is stored in a file called auth. This encryption key is encrypted with AES-GCM-256 bit, using the key as a hash of the master password, and stored in a file called enc_key. YAPM passwords are stored in a file called main_store using AES-GCM-256 bit encryption, and a cryptographically random 32 byte encryption key is used for encrypting and decrypting the stored passwords. However, this also means that the master password has to be very secure - if this is found out, then an attacker has the keys to the kingdom so to speak. Password managers are very useful as they not only remove the problem of forgetting passwords, but also encourage stronger, unique passwords for each account as they do not need to be remembered. I am aware that I have almost certainly made some severe mistake(s) while developing YAPM, so I recommend against using this as your personal password manager (identification of any security issues would be very much appreciated in the comments!). However, this project is for educational purposes to learn about existing protocols, implementation issues and general programming. The general idea behind this is that somewhere during the development of your new protocol or implementation of an existing protocol, you will make some major security mistake which severely impacts the security of the system. There's a saying in information security that we shouldn't roll our own.
