Is the 'nonce' in bitcoin really a nonce? Reading definitions of nonce and salt it seems the number is used as a salt but the same value can occur in multiple blocks; there's no requirement or indeed method to enforce that the value is not used again.

  • 1
    $\begingroup$ In cryptography, we use 'nonce' including when in legitimate use, the likelihood of reuse is low, which can be achieved by making a random choice in a large set. I do not know if that's how bitcoin uses the term. The question would be much better with a link to the authoritative bitcoin specification with the use of 'nonce' considered. $\endgroup$
    – fgrieu
    Apr 20 '16 at 19:54
  • 2
    $\begingroup$ Even with a stream cipher, the nonce doesn't need to be unique. It's the (key, nonce) tuple that's unique. $\endgroup$ Apr 20 '16 at 20:18

I will assume you mean the nonce that bitcoin miners iterate. Depending on e.g. wallet software other salts or nonces may be involved.

That nonce is only used once, because every miner1 will be hashing a different transaction block (hash) – one which sends the reward for solving the proof of work to their address. A miner could reuse a nonce but they would be recomputing something they have already done so it would be a waste of time.

Since the nonce is only 32 bits, miners will eventually reuse values, but that will be with a new timestamp, or even a new previous-block hash (when someone else solved a block).

1 Slightly more complex for mining pools, of course.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.