https://github.com/thales-e-security/goliboqs
Go wrapper for liboqs; allows Go applications to use quantum-resistant KEMs
https://github.com/thales-e-security/goliboqs
go post-quantum-cryptography quantum-computing
Last synced: about 1 month ago
JSON representation
Go wrapper for liboqs; allows Go applications to use quantum-resistant KEMs
- Host: GitHub
- URL: https://github.com/thales-e-security/goliboqs
- Owner: thales-e-security
- License: mit
- Created: 2019-05-14T10:43:41.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2019-05-24T06:38:45.000Z (almost 7 years ago)
- Last Synced: 2025-08-14T22:51:44.006Z (7 months ago)
- Topics: go, post-quantum-cryptography, quantum-computing
- Language: C
- Homepage:
- Size: 21.5 KB
- Stars: 14
- Watchers: 3
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# goliboqs
[](https://godoc.org/github.com/thales-e-security/goliboqs)
[](https://travis-ci.com/thales-e-security/goliboqs)
goliboqs is a Go wrapper around [liboqs](https://github.com/open-quantum-safe/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.
```go
// 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`.
## Related projects
[go-tls-key-exchange](https://github.com/thales-e-security/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.