| ▲ | alphazard 10 hours ago | |
It can be, another risk it that a secret value is left on the stack, and is never overwritten because the stack doesn't get to that memory address again, so it's never overwritten or zerod. Go really just needs a few `crypto.Secret` values of various sizes, or maybe a generic type that could wrap arrays. Then the runtime can handle all the best practices, like a single place in memory, and aggressive zeroing of any copies, etc. | ||
| ▲ | FiloSottile 9 hours ago | parent [-] | |
It's not that simple! What about intermediate values during arithmetic computations? What about registers spilling during signal handling? I honestly thought it could not be done safely, but the runtime/secret proposal discussion proved me wrong. | ||