We're sorry but this app doesn't work properly without JavaScript enabled. Please enable it to continue.

This lesson's interactive features are locked, please to keep using them

Nonce Review

In some modes of AES, a nonce is used to prevent attacks that exploit the reuse of keys. It can be catastrophic if the same key is used to encrypt two different messages because some information will be leaked that an attacker can utilize.

To be able to use the same key while staying secure, we combine the key with a random nonce for each new encryption. This provides uniqueness to each encryption and prevents information leakage.

Nonces in Bitcoin

In Bitcoin, a nonce is used to mine new coins. Miners increment (or randomly generate) new nonces and check if the result has a specific value. If it does, the miner earns some Bitcoin as a reward.

We'll talk more about hashes later, but just know that at the end of the day, Bitcoin miners are just spending electricity to continuously loop through nonces trying to find the "golden nonce".