A memory system, comprising: a memory controller configured to control access to a memory and to process memory access requests; and rekeying logic configured to rotate a first key that was used to scramble data in the memory and re-scramble the data with a second key by: determining when the memory controller is in an idle cycle and performing a rekeying operation on a portion of the memory during the idle cycle, wherein the portion is located between a first boundary address (B1) and a second boundary address (B2); and pausing the rekeying operation when the memory controller is not in an idle cycle to allow memory access requests to be performed and resuming the rekeying operation during a next idle cycle; wherein the rekeying logic is further configured to: rotate keys based on a key rotation interval, wherein the key rotation interval is determined by an amount of idle cycles determined by the memory controller and a total size of the memory being rekeyed, and store the first boundary address (B1) and the second boundary address (B2) in a boundary register , wherein the boundary addresses are useable to define borders in the memory and to identify which portions of the memory correspond to which key. a memory controller configured to control access to a memory and to process memory access requests; and rekeying logic configured to rotate a first key that was used to scramble data in the memory and re-scramble the data with a second key by: determining when the memory controller is in an idle cycle and performing a rekeying operation on a portion of the memory during the idle cycle, wherein the portion is located between a first boundary address (B1) and a second boundary address (B2); and pausing the rekeying operation when the memory controller is not in an idle cycle to allow memory access requests to be performed and resuming the rekeying operation during a next idle cycle; determining when the memory controller is in an idle cycle and performing a rekeying operation on a portion of the memory during the idle cycle, wherein the portion is located between a first boundary address (B1) and a second boundary address (B2); and pausing the rekeying operation when the memory controller is not in an idle cycle to allow memory access requests to be performed and resuming the rekeying operation during a next idle cycle; wherein the rekeying logic is further configured to: rotate keys based on a key rotation interval, wherein the key rotation interval is determined by an amount of idle cycles determined by the memory controller and a total size of the memory being rekeyed, and store the first boundary address (B1) and the second boundary address (B2) in a boundary register , wherein the boundary addresses are useable to define borders in the memory and to identify which portions of the memory correspond to which key. rotate keys based on a key rotation interval, wherein the key rotation interval is determined by an amount of idle cycles determined by the memory controller and a total size of the memory being rekeyed, and store the first boundary address (B1) and the second boundary address (B2) in a boundary register , wherein the boundary addresses are useable to define borders in the memory and to identify which portions of the memory correspond to which key. <EOS>