-
Notifications
You must be signed in to change notification settings - Fork 5
Documentation clarifications for BLST integration #35
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| This package simulates the BLST Go bindings https://github.com/supranational/blst/tree/master/bindings/go. | ||
|
|
||
| Files in this folder are copied from the BLST Go binding, specifically from the BLST version supported by the Flow crypto | ||
| (check https://github.com/onflow/crypto/blob/main/blst_src/README.md for the exact BLST version tag). | ||
|
|
||
| Copyright Supranational LLC | ||
| Licensed under the Apache License, Version 2.0, see LICENSE for details. | ||
| SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| The BLST Go bindings are not exported or used by the Flow crypto package. | ||
| Some BLS signature bindings are used only for compatibility tests in https://github.com/onflow/crypto/blob/main/bls_crossBLST_test.go. | ||
| The BLST source code used by Flow crypto is the low level BLS12-381 arithmetic as explained in https://github.com/onflow/crypto/blob/main/blst_src/README.md. The higher level protocols using curve BLS12-381 are implemented within Flow crypto. | ||
|
|
||
| The reason of not importing the BLST Go bindings package but rather duplicating it as an internal package is related to a cgo build limitation. When importing the BLST Go bindings, the low level C and assembly functions are also linked when the tests are run. The cgo linker detects duplications in low level symbols (the ones from the imported BLST package and the ones from Flow crypto) and errors. By avoiding the Go package import and instead copying the BLST go bindings, the tests use the same non-duplicated low level layer for both the BLST bindings and Flow crypto. The tests are still relevant because they check compatibility of the higher layers. | ||
|
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.