I'm not sure about Curiosity in particular, but I work in the space industry and can say that commands are normally timestamped and encrypted. The encryption stops someone from commanding the spacecraft, the timestamp stops someone from recording a transmission and resending it later.