forked from ethereum/go-ethereum
-
Notifications
You must be signed in to change notification settings - Fork 63
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
upgrade package crypto and support KZG cryptography #751
Open
gzliudan
wants to merge
39
commits into
XinFinOrg:dev-upgrade
Choose a base branch
from
gzliudan:upgrade-crypto
base: dev-upgrade
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains 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
gzliudan
requested review from
wjrjerome,
liam-lai,
wgr523,
wanwiset25 and
benjamin202410
November 29, 2024 08:30
gzliudan
force-pushed
the
upgrade-crypto
branch
2 times, most recently
from
December 2, 2024 09:47
6ae07da
to
684ee21
Compare
Package crypto works with or without cgo, which is great. However, to make it work without cgo required setting the build tag `nocgo`. It's common to disable cgo by instead just setting the environment variable `CGO_ENABLED=0`. Setting this environment variable does _not_ implicitly set the build tag `nocgo`. So projects that try to build the crypto package with `CGO_ENABLED=0` will fail. I have done this myself several times. Until today, I had just assumed that this meant that this package requires cgo. But a small build tag change will make this case work. Instead of using `nocgo` and `!nocgo`, we can use `!cgo` and `cgo`, respectively. The `cgo` build tag is automatically set if cgo is enabled, and unset if it is disabled.
…arameters (ethereum#19577) * Removed comment section referring to Cloudflare's bn curve parameters * Added comment to clarify the nature of the parameters * Changed value of xi to i+9
…m#21872) * crypto/bn256: fix bn256Mul fuzzer to not hang on large input * Update crypto/bn256/bn256_fuzz.go Co-authored-by: ligi <[email protected]> Co-authored-by: ligi <[email protected]>
Using curve P384 for encryption causes the error "ecies: shared key params are too big". Also, readme.md says curve P384 should use AES192 not AES256. Co-authored-by: Marius van der Wijden <[email protected]>
* tests/fuzzers/bn256: scale gnark result by constant * tests/fuzzers/bn256: scale gnark result by constant
* crypto/kzg4844: remove unnecessary init call & fix typo * Fix kzg4844 tests/benchmarks * Make init lazy & revert changes to tests
…thereum#28381) This change to fixes a compilation-flaw on master, by putting architecture-specific functions behind corresponding build tags.
gzliudan
force-pushed
the
upgrade-crypto
branch
from
December 4, 2024 01:33
684ee21
to
9779e8f
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Proposed changes
This PR:
crypto
to 2024-03-07Reference:
TODO: apply the following PRs in another PR:
Types of changes
What types of changes does your code introduce to XDC network?
Put an
✅
in the boxes that applyImpacted Components
Which part of the codebase this PR will touch base on,
Put an
✅
in the boxes that applyChecklist
Put an
✅
in the boxes once you have confirmed below actions (or provide reasons on not doing so) that