Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .config/liboqs-go.pc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ LIBOQS_LIB_DIR=/usr/local/lib

Name: liboqs-go
Description: Go bindings for liboqs, a C library for quantum resistant cryptography
Version: 0.10.0
Version: 0.15.0
Cflags: -I${LIBOQS_INCLUDE_DIR}
Ldflags: '-extldflags "-Wl,-stack_size -Wl,0x1000000"'
Libs: -L${LIBOQS_LIB_DIR} -loqs
2 changes: 1 addition & 1 deletion .config/liboqs-go.pc.linux
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ LIBOQS_LIB_DIR=/usr/local/lib

Name: liboqs-go
Description: Go bindings for liboqs, a C library for quantum resistant cryptography
Version: 0.10.0
Version: 0.15.0
Cflags: -I${LIBOQS_INCLUDE_DIR}
Ldflags: '-extldflags "-Wl,-stack_size -Wl,0x1000000"'
Libs: -L${LIBOQS_LIB_DIR} -loqs
4 changes: 2 additions & 2 deletions .config/liboqs-go.pc.win64
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ LIBOQS_LIB_DIR=C:/liboqs/lib

Name: liboqs-go
Description: Go bindings for liboqs, a C library for quantum resistant cryptography
Version: 0.10.0
Version: 0.15.0
Cflags: -I${LIBOQS_INCLUDE_DIR}
Ldflags: '-extldflags "-Wl,-stack_size -Wl,0x1000000"'
Ldflags: '-extldflags "-Wl,--stack,16777216"'
Libs: -L${LIBOQS_LIB_DIR} -loqs
100 changes: 64 additions & 36 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,13 @@ env:
LD_LIBRARY_PATH: /usr/local/lib
DYLD_LIBRARY_PATH: /usr/local/lib
POSIX_PKG_CONFIG_PATH: ${{github.workspace}}/.config
WIN_LIBOQS_INSTALL_PATH: C:\liboqs
WIN_PKG_CONFIG_PATH: C:\Strawberry\c\lib\pkgconfig

jobs:
build:
# POSIX builds (Linux, macOS)
build-posix:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}

steps:
Expand All @@ -31,16 +30,14 @@ jobs:
with:
go-version: 1.21

- name: Install liboqs POSIX
if: matrix.os != 'windows-latest'
- name: Install liboqs
run: |
git clone --branch main --single-branch --depth 1 https://github.com/open-quantum-safe/liboqs
cmake -S liboqs -B liboqs/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DBUILD_SHARED_LIBS=ON -DOQS_BUILD_ONLY_LIB=ON
cmake --build liboqs/build --parallel 4
sudo cmake --build liboqs/build --target install

- name: Run examples POSIX
if: matrix.os != 'windows-latest'
- name: Run examples
run: |
export PKG_CONFIG_PATH=${{env.POSIX_PKG_CONFIG_PATH}}
go run ./examples/kem/kem.go
Expand All @@ -49,41 +46,72 @@ jobs:
echo
go run ./examples/rand/rand.go

- name: Run unit tests POSIX
if: matrix.os != 'windows-latest'
- name: Run unit tests
run: |
export PKG_CONFIG_PATH=${{env.POSIX_PKG_CONFIG_PATH}}
go test -v ./oqstests
go test -v -timeout 30m ./oqstests

- name: Install liboqs Windows
if: matrix.os == 'windows-latest'
shell: cmd
# Windows build using MSYS2/MinGW
build-windows:
runs-on: windows-latest
env:
LIBOQS_INSTALL_PATH: C:/liboqs

steps:
- uses: actions/checkout@v3

- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.21

- name: Set up MSYS2
uses: msys2/setup-msys2@v2
with:
msystem: MINGW64
path-type: inherit
update: true
install: git mingw-w64-x86_64-gcc mingw-w64-x86_64-cmake mingw-w64-x86_64-ninja mingw-w64-x86_64-pkg-config

- name: Install liboqs
shell: msys2 {0}
run: |
git clone --branch main --single-branch --depth 1 https://github.com/open-quantum-safe/liboqs
cmake -S liboqs -B liboqs\build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_INSTALL_PREFIX=${{env.WIN_LIBOQS_INSTALL_PATH}} -DBUILD_SHARED_LIBS=ON -DOQS_BUILD_ONLY_LIB=ON
cmake --build liboqs\build --parallel 4
cmake --build liboqs\build --target install
cmake -S liboqs -B liboqs/build -G Ninja \
-DCMAKE_BUILD_TYPE=$BUILD_TYPE \
-DCMAKE_INSTALL_PREFIX=$LIBOQS_INSTALL_PATH \
-DBUILD_SHARED_LIBS=ON \
-DOQS_BUILD_ONLY_LIB=ON \
-DCMAKE_C_FLAGS="-D__ORDER_LITTLE_ENDIAN__=1234 -D__ORDER_BIG_ENDIAN__=4321 -D__BYTE_ORDER__=1234"
cmake --build liboqs/build --parallel 4
cmake --build liboqs/build --target install

- name: Configure pkgconfig Windows
if: matrix.os == 'windows-latest'
shell: cmd
- name: Configure pkgconfig
shell: msys2 {0}
run: |
copy .\.config\liboqs-go.pc.win64 ${{env.WIN_PKG_CONFIG_PATH}}\liboqs-go.pc
mkdir -p /mingw64/lib/pkgconfig
cp .config/liboqs-go.pc.win64 /mingw64/lib/pkgconfig/liboqs-go.pc

- name: Run examples Windows
if: matrix.os == 'windows-latest'
shell: cmd
- name: Run examples
shell: msys2 {0}
env:
CGO_ENABLED: 1
CC: gcc
PKG_CONFIG_PATH: /mingw64/lib/pkgconfig
run: |
set PATH=%PATH%;${{env.WIN_LIBOQS_INSTALL_PATH}}\bin
go run .\examples\kem\kem.go
echo.
go run .\examples\sig\sig.go
echo.
go run .\examples\rand\rand.go

- name: Run unit tests Windows
shell: cmd
if: matrix.os == 'windows-latest'
export PATH="/c/liboqs/bin:$PATH"
go run ./examples/kem/kem.go
echo
go run ./examples/sig/sig.go
echo
go run ./examples/rand/rand.go

- name: Run unit tests
shell: msys2 {0}
env:
CGO_ENABLED: 1
CC: gcc
PKG_CONFIG_PATH: /mingw64/lib/pkgconfig
run: |
set PATH=%PATH%;${{env.WIN_LIBOQS_INSTALL_PATH}}\bin
go test -v .\oqstests
export PATH="/c/liboqs/bin:$PATH"
go test -v -timeout 30m ./oqstests
80 changes: 38 additions & 42 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,86 +1,82 @@
# Version 0.12.0 - January 15, 2025

- Fixes https://github.com/open-quantum-safe/liboqs-go/issues/44. The API that
NIST has introduced in [FIPS 204](https://csrc.nist.gov/pubs/fips/204/final)
for ML-DSA includes a context string of length >= 0. Added new API for
signing with a context string
- `func (sig *Signature)
SignWithCtxStr(message []byte, context []byte) ([]byte, error)`
- `func (sig *Signature)
VerifyWithCtxStr(message []byte, signature []byte, context []byte,
publicKey []byte) (bool, error)`
# Changelog for liboqs-go

## Version 0.15.0 - January 20, 2026

- Updated compatibility for liboqs 0.15.0
- **Breaking change:** Dilithium has been removed from liboqs 0.15.0. Users must migrate to ML-DSA (FIPS 204)
- SPHINCS+ is still supported in liboqs 0.15.0 but will be removed in liboqs 0.16.0 and replaced by SLH-DSA
- liboqs 0.15.0 adds support for NTRU (re-added), updated CROSS to version 2.2, and includes SLH-DSA implementation
- Updated GitHub Actions workflow to increase the test timeout from the default 10 minutes to 30 minutes.

## Version 0.12.0 - January 15, 2025

- Fixes [Issue #44](https://github.com/open-quantum-safe/liboqs-go/issues/44). The API that NIST has introduced in [FIPS 204](https://csrc.nist.gov/pubs/fips/204/final) for ML-DSA includes a context string of length >= 0. Added new API for signing with a context string:

> `func (sig *Signature) SignWithCtxStr(message []byte, context []byte) ([]byte, error)`

> `func (sig *Signature) VerifyWithCtxStr(message []byte, signature []byte, context []byte, publicKey []byte) (bool, error)`

- Updated examples to use `ML-KEM` and `ML-DSA` as the defaults
- Removed the `oqs.rand` package and moved the `RandomBytes` family of
functions from `oqs.rand` to the main `oqs` package to avoid warnings about
linking liboqs twice
- Removed the `oqs.rand` package and moved the `RandomBytes` family of functions from `oqs.rand` to the main `oqs` package to avoid warnings about linking liboqs twice

# Version 0.10.0 - March 27, 2024
## Version 0.10.0 - March 27, 2024

- Bumped Go version to 1.21
- Replaced CHANGES by
[CHANGES.md](https://github.com/open-quantum-safe/liboqs-go/blob/main/CHANGES.md),
as we now use Markdown format to keep track of changes in new releases
- Removed the NIST PRNG as the latter is no longer exposed by liboqs' public
API
- Added the
[.config-static](https://github.com/open-quantum-safe/liboqs-go/tree/main/.config-static)
pkg-config configuration directory for linking statically against liboqs, see
[README.md](https://github.com/open-quantum-safe/liboqs-go/blob/main/README.md)
for more details

# Version 0.9.0 - October 30, 2023
- Replaced CHANGES by [CHANGES.md](https://github.com/open-quantum-safe/liboqs-go/blob/main/CHANGES.md), as we now use Markdown format to keep track of changes in new releases
- Removed the NIST PRNG as the latter is no longer exposed by liboqs' public API
- Added the [.config-static](https://github.com/open-quantum-safe/liboqs-go/tree/main/.config-static) pkg-config configuration directory for linking statically against liboqs, see [README.md](https://github.com/open-quantum-safe/liboqs-go/blob/main/README.md) for more details

## Version 0.9.0 - October 30, 2023

- No modifications, release bumped to match the latest release of liboqs

# Version 0.8.0 - July 5, 2023
## Version 0.8.0 - July 5, 2023

- This is a maintenance release, minor fixes
- Minimalistic Docker support
- Go minimum required version bumped to 1.15
- Removed AppVeyor and CircleCI, all continuous integration is now done via
GitHub actions
- Removed AppVeyor and CircleCI, all continuous integration is now done via GitHub actions

# Version 0.7.2 - August 26, 2022
## Version 0.7.2 - August 26, 2022

- Added liboqs library version retrieval function `LiboqsVersion() string`

# Version 0.7.1 - January 5, 2022
## Version 0.7.1 - January 5, 2022

- Release numbering updated to match liboqs
- Switched continuous integration from Travis CI to CircleCI, we now support
macOS & Linux (CircleCI) and Windows (AppVeyor)
- Switched continuous integration from Travis CI to CircleCI, we now support macOS & Linux (CircleCI) and Windows (AppVeyor)

# Version 0.4.0 - November 28, 2020
## Version 0.4.0 - November 28, 2020

- Bugfixes
- Renamed 'master' branch to 'main'

# Version 0.3.0 - June 10, 2020
## Version 0.3.0 - June 10, 2020

- Full Windows support and AppVeyor continuous integration
- Minor fixes

# Version 0.2.2 - December 10, 2019
## Version 0.2.2 - December 10, 2019

- Changed panics to errors in the API

# Version 0.2.1 - November 7, 2019
## Version 0.2.1 - November 7, 2019

- Added a client/server KEM over TCP/IP example

# Version 0.2.0 - November 2, 2019
## Version 0.2.0 - November 2, 2019

- Minor API change to account for Go naming conventions
- Concurrent unit testing

# Version 0.1.2 - October 31, 2019
## Version 0.1.2 - October 31, 2019

- Added support for RNGs from `<oqs/rand.h>`

# Version 0.1.1 - October 24, 2019
## Version 0.1.1 - October 24, 2019

- Added support for Go modules

# Version 0.1.0 - October 22, 2019
## Version 0.1.0 - October 22, 2019

- Initial release
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,9 @@ The project contains the following files and directories:

## Functional restrictions

No known issues as of liboqs-0.12.0
No known issues as of liboqs-0.15.0

**Important:** As of liboqs 0.15.0, Dilithium has been removed. Users should migrate to ML-DSA (FIPS 204) instead. SPHINCS+ is still supported in liboqs 0.15.0 but will be removed in 0.16.0 and replaced by SLH-DSA.

---

Expand Down
8 changes: 4 additions & 4 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# liboqs-go version 0.12.0
# liboqs-go version 0.15.0

---

Expand All @@ -24,12 +24,12 @@ See in particular limitations on intended use.

## Release notes

This release of liboqs-go was released on January 15, 2025. Its release page on
GitHub is https://github.com/open-quantum-safe/liboqs-go/releases/tag/0.12.0.
This release of liboqs-go was released on January 26, 2026. Its release page on
GitHub is https://github.com/open-quantum-safe/liboqs-go/releases/tag/0.15.0.

---

## What's New

This is the 14th release of liboqs-go. For a list of changes see
This is the 15th release of liboqs-go. For a list of changes see
[CHANGES.md](https://github.com/open-quantum-safe/liboqs-go/blob/main/CHANGES.md).