# Does grouping password characters for readability decrease entropy?

For example, for a randomly generated password of 28 lowercase letters, which is about 128 bits of entropy, how would adding a space after every four characters affect it?

ijaxjnddkcswzovcrpbnqqiwaqyb
ijax jndd kcsw zovc rpbn qqiw aqyb

• Good question, but just consider that a password of "ijax jndd kcsw zovc rpbn qqiw aqyb" has a lot less entropy than you think because the user will have to write it down on a Post-it and stick it to the VDU. See key derivation functions. Sep 4 '21 at 23:21
• @PaulUszak it is not clear what notion of entropy you are discussing, but it does not appear to be Shannon entropy.
– Mark
Sep 4 '21 at 23:52
• @Mark You're right. It's common sense entropy I guess. Both GCHQ and NIST now suggest avoiding password complexity in favour of things like "running rats rainbows". It's been dropped from 800-90b too. That way you don't need to stick it to the terminal. Sep 4 '21 at 23:59
• @PaulUszak I agree systems like that (explicitly tools like diceware) are better to memorize a (master) password, and you should use a password manager for your other passwords. But this question also has a formal mathematical answer --- $H(X) = H(f(X))$ for any discrete distribution $X$, and any (injective) function $f$. The discussed encoding is injective, so cannot decrease entropy.
– Mark
Sep 5 '21 at 0:02