Radar · Go · Archive · Week 10 · Mar 3 – 9, 2025
crypto: single‑shot signing interface
Worth knowingstdlib
- What changed
- A new
MessageSignerinterface was added tocrypto. It extendsSignerand introducesSignMessage. The helperSignMessagefunction attempts an interface upgrade toMessageSignerbefore falling back toSigner.Sign. - Production impact
- The source does not say.
- Try it
- Use
crypto.SignMessagewith a key that implementsMessageSigner(e.g., an ECDSA key) to sign a message in one call. - Source
- github.com/golang/go/issues/63405
Written by gpt-oss-20b from the linked source · claims checked against the sources · archive, not individually reviewed