A computer program product, comprising a non-transitory computer-readable medium having a computer-readable program code embodied therein, which, when executed by a processor, cause the processor to perform a method of blocking access to files encrypted with a compromised encryption key, comprising:
- maintaining a map of encryption keys and ranges of containers encrypted by respective encryption keys;
- receiving an indication that an encryption key is compromised as a compromised key;
- fencing a container range corresponding to data segments encrypted by the compromised key to prevent deduplication operations on the data segments;
- making a point-in-time copy of the filesystem managing the data segments, wherein each file of the file system is represented as tree structure having a root level and one or more hierarchical lower levels;
- iteratively inspecting, from the lowest level to a highest level, each container in each level of the file trees of the files to identify containers having segments encrypted by the compromised key for a corresponding level;
- and
- marking files corresponding to the identified containers as not readable to block the access to the files encrypted with the compromised key.