Protecting a short password I figured that a really secure password would be an AES 128 key. If this key were to be base 64 encoded, I could replace 4 random bytes in it in order to make it unusable unless you know which bytes were replaced and by what.

The process would be like this:


generate a key: [²ú·0ýóQS%ô6
base64 encode it to make it readable: iVuy+rcw/fNRU56AiiX0Ng==
replace 4 random bytes of it iVuy+icw/fNRG5oAiiJ0Ng== 

I would remember what the 4 bytes are i.e. the password
the computer would remember which bytes got changed (in this case: 13, 6, 19, 15) and in what order



My question is: how difficult (how many attempts) would it be to guess the correct key if you got hold of the original.

Another way of asking this is: how long has the key to be in order to make it difficult (several decades of guessing with a super computer) with changing just 4 random bytes.

I guess there is a simple mathematical formula to calculate this. But I don't know it.

thank you for your support
The adversary has


a ciphertext encrypted under your key;
a copy of the key with $k$ bytes erased; and
knowledge of which $k$ bytes have been erased.


The adversary can try to decrypt the ciphertext and decide if the decryption makes sense in time $T$.

To find the key, the adversary need only do $2^{8k}$ trial decryptions, for a total time cost of $2^{8k} T$.

The key point is that there's usually no sensible way to make $T$ big.

Ergo, when $k$ is $4$, this is obviously easy.