-
Notifications
You must be signed in to change notification settings - Fork 0
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
base: master
Are you sure you want to change the base?
Conversation
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() |
There was a problem hiding this comment.
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.
There was a problem hiding this 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. |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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./ |
There was a problem hiding this comment.
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: |
There was a problem hiding this comment.
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"] |
There was a problem hiding this comment.
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
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.