# How unsafe is to share parts of a password

The best way to ask this question and have a concrete answer is to set a very specific example. This is the example I would be interested in reading an answer to:

Consider that my friend Alice has several (~5) hard drives encrypted with Truecrypt. Alice is using AES (256-bit, 14 rounds) with RIPEMD-160. I could see that she has a script for mounting the different drives -I guess that because she's pretty lazy and just wants to type in one password. Of course, every disk is salted differently, etcetera.

From her script, I can figure out that the password for each drive comes from concatenating a common string (for all drives) with a fixed string set in the script (different for every drive). I don't know the length of the common string (it's user typed), but the fixed strings are like 6-10 characters long.

Let's then first assume that I don't know the common part of the password, but I know the fixed part for every disk because I see it in the script.

So the question is, and don't be afraid of diving into explaining the mathematical reason- how insecure is the fact that she uses a common string, and how could I attack that flaw?

And secondly, what if I didn't know the fixed part for every hard drive but I knew that they begin with the same common part (which value is unknown too)?

If I know your password is k bits long and I know the m bits, then I have to brute force the rest of the k-m bits. That's the standard for any algorithm and independent of whether this is prefix, suffix etc. This means that I have $2^{k-m}$ tests to make.