Skip to content
Go Bindings for Zenroom
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
lib
.travis.yml
LICENSE.txt
Makefile
README.md
zenroom.go
zenroom.h
zenroom_test.go

README.md

Zenroom-Go

Build Status GoDoc

Zenroom Binding for Go

Introduction

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.

Installation

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

Usage

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)

More Documentation

Contributors

The original Go bindings for Zenroom were created by @chespinoza, later updates by @smulube.

You can’t perform that action at this time.