Is the cryptographical meaning of "nonce" a backronym?
The detective work on this one was quite involved. I searched Wiktionary's edit history for the nonce page until I found the first place that
contraction from "number used once"
was added to the etymology for the cryptographical meaning. It was from 4 June 2008, and referenced Security Engineering by Ross Anderson. The author has made the full text of his book freely available online, and a copy can be found here.
The cited text is in chapter 2, page 15 of the 1st edition [2001] (chapter 3, pages 66-67 in the 2nd edition [2008]):
The in-car token sends its name, T, followed by the encrypted value of T concatenated with N, where N stands for “number used once,” or nonce. The purpose of [the] nonce is to assure the recipient that the message is fresh, that is, it is not a replay of an old message that an attacker observed. Verification is simple: the parking garage server reads T, gets the corresponding key, KT, deciphers the rest of the message, checks that the plaintext contains T, and, finally, that the nonce N has not been seen before.
[...]
The term nonce can mean anything that guarantees the freshness of a message. A nonce may, according to the context, be a random number, a serial number, or a random challenge received from a third party[, or even a timestamp].
Bold emphasis mine, revelant 2nd edition additions in [brackets].
It's clear that the author is defining the meaning of the term N, not the etymology of nonce. He also never states that nonce is a contraction.
The Wiktionary page does cite a few authors stating that nonce means number used once, but I haven't seen anyone claim that the cryptographical meaning of nonce is a new word coined without knowledge of the preexisting word. The level of coincidence for that to be true is just too high:
- A new word was coined with the same spelling, unusual pronunciation, and almost the same meaning as a word which has been in continuous use in English for around 800 years
- It was decided to contract number used once to nonce, completely ignoring the word used, instead of nuo or other more likely contractions, assuming no prior knowledge of the the preexisting word
- The pronunciation would more likely be nunce, to match the vowels of number and once, and the spelling would reflect that
- While a nonce can be a number, it can also be any sequence of random bytes, which when appended to text, are considered characters, not numbers
In conclusion, there is no evidence to support the claim that the etymology of the cryptographical meaning of nonce is "a contraction of number used once". We can safely say that the word is a repurposing of the existing word, the etymology is the same as the 800 year old word, and that number used once is a folk etymology.
(Since for some reason the answer seems to have gone down the rabbit hole of comments)
Nonce in the cryptography sense is plausibly from an old (middle English) word meaning used once. Although whether the first person to use it in the crypto sense was a well-rounded student of English literature or just abbreviated N-once is probably known only to them
The criminal slang sense is (like most criminal slang) uncertain