Go 1.26 introduces an experimental runtime/secret package that automatically erases sensitive data from memory after use. The secret.Do function zeroes out registers, stack, and heap allocations used during cryptographic operations, helping implement forward secrecy by preventing session keys from lingering in memory. Currently limited to Linux amd64/arm64, it's designed for cryptographic library developers rather than application developers, with restrictions on goroutines and global variables.

Sort: