github.com/FiloSottile/age
This package has a good security score with no known vulnerabilities.
Community Reviews
Secure-by-default encryption with minimal API surface and excellent error handling
The streaming API works beautifully for large files. I've used it for backup encryption and secrets management, and the armor format makes it easy to embed encrypted content in configuration files. Key generation is dead simple, and the X25519 recipient format integrates well with existing SSH keys, which reduced onboarding friction significantly.
From a security perspective, this is one of the best-maintained crypto libraries in the Go ecosystem. Filippo Valsorda's track record speaks for itself. The codebase is compact, auditable, and dependencies are minimal. No CVE surprises, and the library hasn't required security-driven API changes since adoption. It genuinely follows secure-by-default principles—you'd have to work hard to misuse it.
Best for: Projects requiring file encryption, backup systems, or secrets management where simplicity and security correctness are priorities over format compatibility.
Avoid if: You need OpenPGP compatibility, require multi-signature threshold schemes, or need enterprise key management integration out of the box.
Clean encryption API with excellent ergonomics, limited ecosystem tooling
Error handling is generally good with clear error types, though some edge cases like malformed keys return generic errors that could be more descriptive. The biggest pain point is the lack of comprehensive godoc examples - the package documentation is sparse, and you'll find yourself referencing the age CLI source code or specification to understand features like plugin recipients or SSH key support.
Type safety is solid with no reflection magic or interface{} abuse. IDE autocompletion works well for the main APIs. The library is stable and the API hasn't broken between versions, making upgrades painless. For a security-critical library, the simplicity and auditability are major advantages.
Best for: Projects needing simple, modern file encryption with strong security guarantees and minimal complexity.
Avoid if: You need extensive documentation, rich error context, or complex key management features beyond basic public key/passphrase encryption.
Simple, well-designed encryption library with excellent API ergonomics
Error messages are helpful and specific. When you mess up key formats or try to decrypt with the wrong identity, you get actionable errors that point you in the right direction. The package follows Go idioms perfectly—everything uses standard `io.Reader` and `io.Writer` interfaces, making it easy to integrate with existing code. Debugging is straightforward because there's not much magic happening.
The only real challenge is understanding the age format itself (X25519 vs SSH keys vs passphrase), but the package documentation does a good job explaining these concepts. GitHub issues get responses, though the community is smaller than mainstream crypto libraries. For 95% of encryption use cases in Go applications, this is my go-to choice now.
Best for: Projects needing modern, simple file or data encryption without complex key management requirements.
Avoid if: You need enterprise features like HSM integration, extensive audit trails, or backward compatibility with legacy encryption formats.
Sign in to write a review
Sign In