

0 / 2 embers
0 / 3000 xp
click for more info
Complete a lesson to start your streak
click for more info
Difficulty: 7
click for more info
Not enough gems
Cost: 6 gems
1: Advanced Encryption Standard
incomplete
2: Advanced Encryption Standard
incomplete
3: Nonces
incomplete
4: Nonce Review
incomplete
Back
ctrl+,
Next
ctrl+.
This lesson's interactive features are locked, please to keep using them
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.
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".