currentSeedfrom the final block of a reveal phase or during a commit phase.
currentSeedgetter. It is important to check the phase (
reveal) and determine when the value is created. Details are available on the Accessing a Random Seed with a Smart Contract page.
N + 1, only for some block between
N + commitRoundLengthand
N + 2*commitRoundLength.
currentSeedvalue is used to seed a generator. However, as soon as the seed is known, the whole sequence is known! To add additional entropy, the seed may be salted with the block hash, however this method is still not considered secure.
hash(currentseed+2), etc., or something similar (e.g.
hash(currentseed+previousHash)). Limitations of this method (regarding security and speed) are discussed here: https://stackoverflow.com/questions/14467805/can-a-cryptographic-hash-algorithm-be-used-as-a-prng