1. A system for providing security in a computer system, the system comprising one or more logic circuits configured to perform a memory refresh of a window of memory locations in a memory, including being configured to at least: perform a periodic read operation followed by a corresponding write operation at each memory location, each memory location storing a version value and a block of ciphertext, the version value being updated with each write operation at a memory location, and the block of ciphertext being produced with a key that depends on the version value and thereby changes with each write operation, the key also changing from memory location to memory location; and between the read operation and corresponding write operation at each memory location; compare the version value stored at the memory location with a chronologically earliest version value stored at any memory location of the window; and verify validity of the block of ciphertext stored at the memory location based on the comparison, the validity of the block of ciphertext being verified in an instance in which the version value stored at the memory location is no earlier than the earliest version value.