Probability last character sha256 hash A quick question. I want to use the last character of a SHA256 hash (blockhash of a bitcoin block) as my random source. Is 100 /16(amount of different chars) = 6.25% true for all characters or are some characters more likely to be the last char of a hash.
The output of any modern hash is binary. Not all byte values however map to (printable) characters. So what you are looking at is a textual representation of the hash, using an encoding such as hexadecimals (e.g. for sha256sum) or base 64.

You are mentioning the value 16, so lets presume that the output is in hexadecimals. In that case each of the characters 0-9 together with A-F (in upper- or lowercase) is expected with a probability of precisely $1\over{16}$, given that the observer doesn't have any information on the input.

If the input can be guessed and verified then the chance of guessing the output is a perfect 1: the attacker can simply perform the hash calculation himself to calculate the output. You would have to perform HMAC instead of the hash function and keep the key secret.



Depending on your requirements you are probably better off using a known secure PRNG (or DRBG) and seed it using the input.