I am creating a personal password manager with OTP facility. I have created almost everything using python code. Once completed, I thought if someone will have access to the main .py file he can easily manipulate the code and bypass all the password in the application. Anyone who is smart enough will not try for application, instead he will search the python file in the computer memory which is governing the application. Please help me in this.
1 Answer
There's no bulletproof way to encrypt or obfuscate a Python file.
Instead, your cryptosystem must simply follow Kerckhoff's principle:
A cryptosystem should be secure even if everything about the system, except the key, is public knowledge.
That is, if the would-be attacker can absolutely, fully, read and dissect your code but doesn't have access to the master key that encrypts your passwords (which presumably only you have in your head), it should still be secure.