use nonce correctly, not public_id

we set the nonce variable already, just use it for generate_aead()