Nonce storage and generation