Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Golang cgo bindings and CI tests #4

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Golang cgo bindings and CI tests #4

wants to merge 1 commit into from

Conversation

david415
Copy link
Member

This updates the Golang bindings originally written by David Stainton for the Katzenpost Mixnet fork and uses the latest SPHINCS+ reference implementation. This branch enhances the bindings to parameterize building, and to perform comprehensive testing for all parameter sets on GNU/Linux, MacOS, and Windows.

This updates the Golang bindings originally written by David Stainton
for the Katzenpost Mixnet fork and uses the latest SPHINCS+ reference
implementation. This branch enhances the bindings to parameterize
building, and to perform comprehensive testing for all parameter sets on
GNU/Linux, MacOS, and Windows.

// Name returns the string naming of the current
// Sphincs+ that this binding is being used with.
SignatureName = params.Name()
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd say it's fine if it works... this variable assignment. Sometimes golang programmers will do that inside an init function but i'm not clear on when that's necessary.

Copy link
Member Author

@david415 david415 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

return nil
}

// Verify checks whether the given signature is valid.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this may fault? let's remove this commented code section if it's not used.

@@ -0,0 +1,5 @@
//go:build sphincs_haraka_128f
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

neat trick

@@ -0,0 +1,139 @@
//go:build cgo && ((linux && amd64) || (darwin && amd64) || (darwin && arm64) || (windows && amd64)) && (sphincs_haraka_128f || sphincs_haraka_128s || sphincs_haraka_192f || sphincs_haraka_192s || sphincs_haraka_256f || sphincs_haraka_256s || sphincs_sha2_128f || sphincs_sha2_128s || sphincs_sha2_192f || sphincs_sha2_192s || sphincs_sha2_256f || sphincs_sha2_256s || sphincs_shake_128f || sphincs_shake_128s || sphincs_shake_192f || sphincs_shake_192s || sphincs_shake_256f || sphincs_shake_256s)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cool... looks impressive


package sphincsplus

//#cgo amd64 LDFLAGS: -L./
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cool

windows-build-and-test-golang:
runs-on: ${{ matrix.os }}
strategy:
matrix:
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

now that's a large matrix!

- robust
OS: ["ubuntu-latest", "macos-latest"]
go-version: ["1.20"]
#go-version: ["1.22.x"]
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's remove this commented code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants