-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
track go/issues/21865: package to wipe/zero secrets. #125
Comments
check what cryptographers recommend. |
see: golang/go#21865 |
see this implementation; https://github.com/rfjakob/gocryptfs/blob/5ad9bda206e476fea866907e2f0545257f74e1f0/internal/cryptocore/cryptocore.go#L152-L173 and its use; https://github.com/rfjakob/gocryptfs/blob/5ad9bda206e476fea866907e2f0545257f74e1f0/mount.go#L131 |
you can zero on GC right now with a finalizer: type Secret struct {
key [16]byte
}
s := &Secret{key: ...}
runtime.SetFinalizer(s, func(s *Secret) { s.key = [16]byte{} })
runtime.GC() |
Maybe we should not even do this at all. It sounds like security theatre without the security. |
#127 was too much work and we don't know if it is even working. This ticket now tracks that one. |
At this place;
ong/enc/enc.go
Line 91 in 2c4db06
we should zero(from memory) the
derivedKey
or
Note that golang/go#21865 has been accepted with the API at golang/go#21865 (comment), we should use that API when it becomes available.
The text was updated successfully, but these errors were encountered: