I have created a utility that encrypts a file (.txt, .dox, so on...). The utility asks for a password from user at the time of file encryption.
Problem
Suppose a user has created 1000 encrypted files with different passwords and forgets his password of some file. How will he recover it?
My thoughts
I should log each password (encrypted) somewhere and by the name and size of file we can find the password of the file which can be provided to the user but here are some catches:
- There can be many files with the same name and size
- User can rename the file so here we will help less
- If we try to find the password by only size then there can be many files with the same size, then it will not be a good way to provide user the exact password.
I also thought to send the whole password log to user on his registered email but then I found this LINK and changed my thoughts.
Request
What will be the best way to provide users the exact password of the encrypted file?
P.S: The utility is build using Objective-c, Cocoa for OSX