1
$\begingroup$

It's my first venture into cryptography, and I'm struggling with how to use a nonce in an encryption standard between two digital radios.

The two radios support AES encryption, only requiring a 128-bit key and a nonce for the encryption/decryption of each packet. To my understanding, the key should be the same for either radio, all the time. The nonce however needs to change with every packet sent/received. My question is: how will the two radios agree on a continuously changing nonce for any given transmission/reception? Example: when Radio A picks its nonce to encrypt its message, how should Radio B know which nonce to use to decrypt the message?

The radios may not necessarily be synced in time so that can't be used. Is there any way to do this without using time as the nonce? Does the nonce need to be agreed upon ahead of time in an un-encrypted exchange?

Any guidance on this is appreciated.

$\endgroup$
1
$\begingroup$

The standard approach is to have the sender pick his nonce (either randomly, or as a counter), and send it with the packet. The decryptor then knows what nonce to use to decrypt, because it's right there. Because nonces aren't assumed to be secret, this works.

$\endgroup$
  • $\begingroup$ OK, but if the nonce goes with the encrypted packet, how will the decryptor know how to decrypt it? $\endgroup$ – Mr. Gravy Mar 19 '15 at 21:31
  • 1
    $\begingroup$ @BrentonGraefe: Because you don't encrypt it -- you send the unencrypted nonce along with the encrypted packet. $\endgroup$ – poncho Mar 20 '15 at 0:44
  • $\begingroup$ OK, makes much more sense now. Thanks for the help! $\endgroup$ – Mr. Gravy Mar 20 '15 at 13:27

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.