Skip to content

Use runtime/secret to erase transient key material - #92

Open
wallyqs wants to merge 2 commits into
mainfrom
wq/use-runtime-secret
Open

wallyqs wants to merge 2 commits into
mainfrom
wq/use-runtime-secret

Conversation

@wallyqs

@wallyqs wallyqs commented Oct 29, 2026

Copy link
Copy Markdown
Member

When built with GOEXPERIMENT=runtimesecret, wrap operations that derive or handle private key material in secret.Do so registers, stack and heap used for them are erased.

When built with GOEXPERIMENT=runtimesecret, wrap operations that
derive or handle private key material (seed decode/encode, ed25519
key expansion, signing, curve25519 and nacl box) in secret.Do so
registers, stack and heap used for them are erased. Without the
experiment the helper simply invokes the function.

Signed-off-by: Waldemar Quevedo <wally@nats.io>
staticcheck@latest (v0.8.2) requires go >= 1.26, so installing it under
the go.mod version (1.25.0) with GOTOOLCHAIN=local fails. Use the
matrix's go: stable instead of go.mod so CI tooling tracks current Go
without raising the module's minimum version.

Signed-off-by: Waldemar Quevedo <wally@nats.io>
@coveralls

Copy link
Copy Markdown

Coverage Report for CI Build 40882577242

Coverage increased (+2.2%) to 83.302%

Details

  • Coverage increased (+2.2%) from the base build.
  • Patch coverage: 7 uncovered changes across 2 files (123 of 130 lines covered, 94.62%).
  • No coverage regressions found.

Uncovered Changes

File Changed Covered %
xkeys.go 59 54 91.53%
keypair.go 55 53 96.36%
Total (4 files) 130 123 94.62%

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 539
Covered Lines: 449
Line Coverage: 83.3%
Coverage Strength: 31.48 hits per line

💛 - Coveralls

@wallyqs
wallyqs requested a review from philpennock October 29, 2026 13:33
@wallyqs
wallyqs marked this pull request as ready for review November 3, 2026 00:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants