updated symmetric encrypt and verify