Nonce generation and packet order / anti-replay checking
Protect against whole-session replay
fix nonce management typos
Doxygen style TODO/FIXME