I have some code which handles sensitive data. I’m manually zeroing important items using std.crypto.secureZero(), but eventually I’m going to forget something.
All of my allocations are made in a per-session arena allocator, is there a way I can get at the arena before destruction and just zero it entirely?
I can see how to do this with a FixedBufferAllocator, but then I lose dynamic sizing. Perhaps there’s a way to hook an allocator to zero as each item is freed?
This whole issue thread is fascinating, even if I don’t understand all of the detail.
From a pragmatic point of view, I was planning to handle this app-side rather than relying on the language by adding small randomised delays around crypto operations to help prevent timing attacks.
I am not a crypto/security expert, and certainly won’t be making claims about the real-world safety of my code. However, I’m finding std.crypto (mostly) very capable and understandable for my uses.