Zeroizing Data in TickV #3709
Replies: 3 comments 15 replies
-
Hi @AndrewImwalle, I don't believe there is currently such a plan, but that seems like a particularly useful feature (this is indeed a similar example use case to one we are concentrating on---a 2FA device, and I agree this sounds important). The most clear tension with the current design is that TikV (somewhat) tries to avoid the performance and flash degradation affects of modifying flash pages in place (because the whole page has to be rewritten generally). A good step might be to write down the specific requirements of such a zeroize key (describing the application and/or the application requirements might be worthwhile since it might help clarify why alternative designs might not be better), and, optionally, a sketch of a feature design. Here might be a reasonable to place to start sketching that out in-lieu of directly opening an issue or a proposal. |
Beta Was this translation helpful? Give feedback.
-
This is a really difficult problem. The issue is that the flash will have a relatively large erase size compared to the data. So for example you might have to erase pages on a 2K granularity, while if your data is only 128 bytes you could have 16 key/values per flash page. So zeroising becomes tricky if you want to clear one entry. As you need to zeroise an entire page but there could potentially be other data there which would be lost. So the process would be something like:
You couldn't really do all of that in userspace, because you might not have permissions to access all of the data in the page. So it's something that would have to be added to the kernel. The hard part is backing up the keys while avoiding writing to the same flash page all of the time (wear leveling). I do think a command could be added to the kernel to do the above. We would want to do it in a way where just calling One much simpler way would be to make sure all key/values are the size of a flash page. That way you can easily erase the entire page. |
Beta Was this translation helpful? Give feedback.
-
This is now implemented in #3715 & #3721. However, those PRs do not make it the default. Should it be the default? I.e., should deleting or modifying a key always zeroize previous values? |
Beta Was this translation helpful? Give feedback.
-
My team is using TickV to store cryptographic keys on an embedded security device. We have a need to immediately clear these keys from storage, selectively. The Invalidate Key operation does not satisfy the security requirements as the value, or cryptographic key data, still exists and can continue to exist after Garbage Collection if any other entries are still valid. Is there a plan to include a feature like this? If not, I would be interested in creating a Zeroize Key command and upstream it to the repo. Any guidelines or processes I should follow to meet both of our expectations?
Beta Was this translation helpful? Give feedback.
All reactions