awnumar / memguard

Secure software enclave for storage of sensitive information in memory.
Apache License 2.0
2.49k stars 123 forks source link

Methods to return arrays of common sizes. Support for setting !EACCES #79

Closed JonathanLogan closed 5 years ago

JonathanLogan commented 5 years ago

New methods to return byte arrays of common sizes (16, 32, 64 bytes). New methods to support buffers that are marked unreadable (!EACCESS) unless used.

awnumar commented 5 years ago

Great pull request. Set the target to the development branch and have a look at the contributing guide.

awnumar commented 5 years ago

Another thing to consider here is when marking a page as NOACCESS, Windows will silently drop the previous VirtualLock on the same memory region.

Memory protected with PAGE_NOACCESS cannot be locked. :: https://msdn.microsoft.com/en-us/library/windows/desktop/aa366895(v=vs.85).aspx

On Unix systems this doesn't seem to be an issue.