That is an interesting idea, yet still a lot of work, sadly. I was hoping somebody had done the legwork already. I looked at Tink [1] and age [2] based on my co-worker's recommendation, but they all seem to have limited implementations in other languages.
The Go implementation supports every OS. The Rust implementation (rage) also does, and can be called from C, JavaScript, Python, and anything else with a C FFI. Also, age can be implemented entirely on top of libsodium, so anything with libsodium bindings can easily get an age implementation. I’m working to a TypeScript implementation to demonstrate it.
I’d be interested to hear what language support is missing, to know where to invest in the future.
I wasn't aware that there is widespread support in other languages. I'll have to look into it. The ideal state IMHO would be age support in the standard library of most popular languages, or at least as ubiquitous support as for instance OpenSSL.
My concrete suggestions to make age as ubiquitous as OpenPGP and OpenSSL, would be:
- Better documentation: The age GitHub page and the man page are geared towards the CLI tool, and not the use as a library. There are no examples for other languages and not even a link to rage or the FFI examples you mentioned. Maybe make a website or a mkdocs documentation showing examples, something like this [1] (disclaimer: this is mine)
- Officially supported libraries in other languages: This one is tough, because it's hard work. But maybe if you create a CONTRIBUTING.md document and ask for people to step forward, they will. List out the languages you want to support and specifically call out that you're looking for help.
Once again, thanks for creating age. Much appreciated!!
[1] https://ntfy.sh/docs/publish/
Edit: I could not find instructions on how to use age/rage with Python or JS. Can you point me to them?
Do C (or something where the mapping to C is known), and lots of languages have FFI libs where wrapping that is fairly trivial, reducing the need to make your own libraries for all languages.
Or do a tool with a CLI, and other langs can call that.
Ideally, your primary implementation does both of those, making it easy to wrap and call. That's how things like GPG are so widely supported.