CryptDice uses provaby fair cryptographic system, each roll is cryptographically fair and can be verified by the player.
A pair of Server Seed and Client Seed is used to calculate a number. Knowing the Server Seed, the Client Seed , Nonce and bet direction, it's possible to calculate the bet result.
string to hash = Server Seed + Client Seed + Nonce + direction(over/under)
we calculate a sha512 hash of the string.
We take the first 5 characters at a time until we find that the decimal number of these 5 chars is less than a million, if it does we divide by 10,000 and this gives the dice number.