| CPC G06F 3/0623 (2013.01) [G06F 3/0638 (2013.01); G06F 3/0673 (2013.01)] | 12 Claims |

|
1. A data storage device comprising:
a memory;
a memory controller comprising one or more processors, individually or in combination, configured to read encrypted data stored in a physical address in the memory;
a logical-address-to-physical-address translator configured to:
receive a read request from a host, wherein the read request comprises a logical address and a request tag, wherein the logical address is in an unencoded format;
translate the logical address to the physical address in the memory; and
provide, to the memory controller, the read request with the physical address and the request tag; and
a decryption engine comprising:
a tweak buffer comprising a content-addressable memory (CAM);
a tweak generator configured to:
receive the logical address that is in the read request from the host;
calculate a tweak value from the logical address that is in the read request from the host, wherein the tweak value is calculated in parallel to the logical address being translated to the physical address, and wherein a latency to calculate the tweak value is less than a latency to translate the physical address from the logical address; and
store the tweak value and the request tag in the tweak buffer by:
verifying that there is no match for the request tag in the tweak buffer; and
in response to verifying that there is no match for the request tag in the tweak buffer, initializing a CAM entry in the tweak buffer that associates the tweak value with the request tag; and
a decrypter configured to:
receive the encrypted data and the request tag from the memory controller; and
in response to receiving the encrypted data and the request tag from the memory controller:
use the request tag to attempt to retrieve the tweak value from the tweak buffer;
in response to the attempt to retrieve the tweak value from the tweak buffer being successful:
use the tweak value to decrypt the encrypted data; and
reset the request tag of the CAM entry to an invalid value; and
in response to the attempt to retrieve the tweak value from the tweak buffer being unsuccessful, which indicates that the tweak calculation is not finished:
re-attempt to retrieve the tweak value from the tweak buffer; and
block decryption of the encrypted data until the re-attempt to retrieve the tweak value from the tweak buffer is successful.
|