One of applications I use has a password manager feature included in it. I can add logins to the password manager and they get stored in a .ini file (for simpler login purpose, I can select an account to log in with without typing username and password). I'd like to know if it is possible to find the key used to encrypt a password when knowing the password and password output. Looking at the .ini file, I can see that the password TEST returns LWa/oKXXFsaPqvG3C/BpDA== and the password 00000000000000000 returns CG/STksOscI5Ib4IectnbK3FYOSAHh+lPtSWMDceias=

I'm sure it is posible to extract the encrypt and decrypt functions from the executable file but I fear this is out of my capacities...

Thanks for your answers !


2 Answers 2


First, try several things to see if it is a simple cipher or something more difficult:

  1. Does the same password always get encrypted to the same output?
  2. What's the input-output size connection?
  3. The output seems like Base64 encoding, so decode it and work on the bytes result instead.
  4. Try encoding a long text and use frequency analysis on the decoded Base64 string, do you notice any patterns?
  5. Try other ways to analyze the input-output and look for patterns.

If you don't see any patterns or anything, try finding what's the encryption algorithm. Usually good encryption algorithms like AES are pretty secure and you won't be able to break it. In this case, you could try searching for the key, is it hard-coded? Is it the same for all computers? Does it make a request to get the encryption key? There are many things that you can analyze before trying to break an encryption algorithm.

Additionally, check to see when the password manager is opened, how does it decrypt the encrypted passwords itself? There are many more questions that you need to find the answer to ...

  • I looked out a bit with new passwords, first thing I notice is : 0-16 lenght password finish with == 17-n lenght password finish with = Secondly, with password 1234567890123456, output is VMWIKc/ow/twRWaurB6ztg== and password 12345678901234567 returns VMWIKc/ow/twRWaurB6ztssfx/H8u26vlHm3rprdCEY= which is VERY similar character n°22
    – Scaar
    Feb 1, 2021 at 10:52
  • A password always get the same result once encrypted. The lenght of the output is 24 from 1-16 lenght passwords then increase by 20 each chunk of 16 characters (17 lenght returns 44 characters, 33 lenght returns 64, ect...)
    – Scaar
    Feb 1, 2021 at 11:13

If proper encryption is used it is not possible to easily get the encryption key from knowing a bit of plain text and the matching encrypted text. It is possible though to brute force the key by trying all possibilities - as long as the encryption algorithm is known. But if properly implemented the key is not easy to guess, so such attack is practically impossible since it takes too long. It is probably much faster to learn instead how to reverse engineer the application and extract the key from it.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .