4 ms·
It's probably also a good idea to call VirtualLock so that the passwotrd is guaranteed to never be written to virtual memory.
by yrro 6y ago
It's probably also a good idea to call VirtualLock so that the passwotrd is guaranteed to never be written to virtual memory.
- acqq 6y agoRight, at least, avoiding C allocation and deallocation functions can surely give one more control over the used memory segment. And I am not aware of any discussion of the positive or negative aspects of CryptMemAlloc and CryptMemFree.
- yrro 6y agoDoes the memory managed by these functions have any special properties? The docs don't mention any, other than that these functions are used by Crypt* functions that return buffers (i.e., client sshould free returned buffers with CryptMemFree).
- acqq 6y ago> Does the memory managed by these functions have any special properties? That's what I'd like to read too. It's surely possible to figure that out. Obviously, nothing special is promised by the description of the functions. I know that some people, long ago, even wrote their own kernel drivers to make sure some part of the memory won't end in the virtual memory on the disk. They didn't think VirtualLock gives that guarantee.