Score:0

Strange hash lengths in OpenLDAP

fk flag

I recently went through all the hashes stored in an LDAP instance I have access to and noticed something strange that I can't explain.

Despite all the hashes being marked as SSHA (which should be seeded SHA1), most hashes were 32 characters in length, with only a small part being 40 characters.

There's no obvious timing that would explain that newer ones are longer or anything like this.

Additionally, afaict, that makes most of these hashes too short for SHA1.

What is going on here??

HBruijn avatar
in flag
It might be that some have directly been stored with base64 encoding while others are “raw” (and for example still have the `/` separator between salt and hash clearly visible)?
Score:1
fk flag

Some more research yielded the correct answer:

The password hashes are stored in binary format, not ASCII, doubly base64-encoded. Checking the length in that case leaves us with 24 and 28 bytes, which corresponds to the 20 bytes of a binary format SHA-1 hash plus 4 or 8 bytes for the salt.

This makes sense in the context I'm looking at, and I'm answering here so that others don't have to stumble over the Gitlab docs to finally put it all together, like I did

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.