Zenroom Binding for Go
Zenroom is a brand new virtual machine for fast cryptographic operations on Elliptic Curves. The Zenroom VM has no external dependencies, includes a cutting edge selection of C99 libraries and builds a small executable ready to run on: desktop, embedded, mobile, cloud and browsers (webassembly). This library adds a CGO wrapper for Zenroom, which aims to make the Zenroom VM easy to use from Go.
Currently the bindings are only available for Linux machines, but if this is your current environment you should be able to just do:
$ go get github.com/DECODEproject/zenroom-go
package main
import (
"fmt"
"log"
"github.com/DECODEproject/zenroom-go"
)
genKeysScript := []byte(`
keyring = ecdh.new('ec25519')
keyring:keygen()
output = JSON.encode({
public = keyring:public():base64(),
private = keyring:private():base64()
})
print(output)
`)
keys, err := zenroom.Exec(genKeysScript)
if err != nil {
log.Fatal(err)
}
log.Printf("Keys: %s", keys)
- Zenroom documentation https://zenroom.dyne.org/
The original Go bindings for Zenroom were created by @chespinoza, later updates by @smulube.