Maybe salt hashed JID in identd requests?
Reading the code, i realized that biboumi gateway transmits a raw hash of the user JID to the IRC server when identd service is enabled.
I understand in some situations, it is desirable for the biboumi server to be transparent to the IRC server (for reputation), and that a hash of the JID is useful to ban individual users not the whole bridge. However, i argue a simple SHA1 hash defies expectations:
- when you set biboumi to broadcast user JIDs, then the privacy implications are clear
- when biboumi is sending a hashed version of JIDs, then it should not be trivial for a passive attacker, or the remote IRC server, to figure out who's who
Simply using sha1 to hash the JID opens the way for side channels to reveal JIDs of people despite it not being obvious from the configuration. For example, it becomes trivial for someone with a huge list of JIDs (eg. obtained from a compromised XMPP server) to hash them and make correlations.
So i'm proposing two things:
- use a more modern hashing function that is not broken yet (SHA1 has collision attacks ongoing and is deprecated in most software)
- include a salt in the hash, that's unique per server and not guessable by a passive attacker ; it may be a random value generated once server side, or even just
/etc/machine-id
if this is portable across systems