# Tag Info

9

No, theoretically a SHA1 hash can be any 160-bit value, including the string of 160 zeroes. As for your second question, if we fudge a little bit and consider SHA1 a truly random function this becomes the same question as the following: If we flip 160 coins, what is the probability that at least 128 of them will be heads? Solution is left as an exercise ...

2

Is there any mathematical result that gives us the minimum number of 1's in a 160-bit SHA-1 hash output? A good (secure) hash function has output that is uniformly and evenly distributed and shouldn't be distinguishable from random value. Chi-squared tests of several hash functions So the minimum number of possible ones is $0$ and the maximum ...

1

Base64 provides a 1:1 transform from input to output (and back again if desired). So if you take a set of unique items and base64 encode all of them they will all be unique. So the question becomes if you run a GUID through SHA1, will the resulting hash have the same uniqueness as the GUID? The answer is practically - yes; theoretically not quite. Multiple ...

1

Assuming no cosmetics, the length of a GUID is 32 bytes so better question would be "What's the collision probability of SHA1 with 32 bytes of input?" I'm sure someone else will answer with the exact statistics but the answer to your question is yes, it's pretty unique (an attacker has a negligible probability of success). Note that I've completely ignored ...

Only top voted, non community-wiki answers of a minimum length are eligible