awnumar / memguard

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

[Question] Does memguard protect against bit flips caused by cosmic rays? #146

Closed 1366613 closed 1 year ago

prologic commented 1 year ago

Isn't that what ECC Memory is for? 😆

1366613 commented 1 year ago

@prologic Protection against bit flips can be implemented without a hardware. One way to do it is just by serving multiple copies of the same config data in different areas of the memory and then to constantly check them all against each other. I just didn't know if such a thing was implemented in memguard.

prologic commented 1 year ago

I think memguard's use case is different

awnumar commented 1 year ago

Memguard doesn't implement any specific detection or correction for bit flips. It may detect a bit flip if it happened in the canary region of a Buffer, or to the ciphertext in an Enclave, but this would result in a crash

As @prologic said, bit flips are not something Memguard aims to handle