github.com/thales-e-security/goliboqs
go get github.com/thales-e-security/goliboqs

github.com/thales-e-security/goliboqs

Go wrapper for liboqs; allows Go applications to use quantum-resistant KEMs

by thales-e-security

v0.0.1 (see all)License:MIT
go get github.com/thales-e-security/goliboqs
Readme

goliboqs

GoDoc Build Status

goliboqs is a Go wrapper around liboqs, which contains C implementations of NIST post-quantum candidate algorithms. This enables Go applications to use quantum-resistant key encapsulation mechanisms (KEMs) on Linux.

Usage

Sample usage is shown below. Error handling omitted for brevity.

// Load the library (don't forget to close)
lib, _ := goliboqs.LoadLib("/path/to/liboqs.so")
defer lib.Close()

// Get a particular KEM (don't forget to close)
kem, _ := lib.GetKem(goliboqs.KemKyber1024)
defer kem.Close()

// Use the kem...
publicKey, secretKey, _ := kem.KeyPair()
sharedSecret, ciphertext, _ := kem.Encaps(publicKey)
recoveredSecret, _ := kem.Decaps(ciphertext, secretKey)
// sharedSecret == recoveredSecret

Running tests

Tests assume liboqs has been installed into /usr/local/liboqs.

go-tls-key-exchange is a fork of Go that supports bespoke key exchanges for TLS 1.3. When combined with this project, it enables quantum-resistant TLS in Go.

GitHub Stars

11

LAST COMMIT

3yrs ago

MAINTAINERS

0

CONTRIBUTORS

1

OPEN ISSUES

1

OPEN PRs

0
VersionTagPublished
v0.0.2-0.20190524063830-dca7a27a2ee9
1yr ago
v0.0.1
2yrs ago
No alternatives found
No tutorials found
Add a tutorial