It’s also UK slang for peadophile, so be careful that everyone understands you are talking about cryptography not sex offenders if you use the word in public as there could be a nasty misunderstanding!
There's a lot of vocabulary like that. I've had conversations about ensuring a daemon reaped zombie children in public before we realized what it sounded like.
Nonce is from "then anes", meaning "the one".
The "-n" got smooshed into the latter word, to become "nonce", rather like "an ewt" became "newt".