[End-user workaround] Constantine-rust: public fields and Default fields#331
Draft
[End-user workaround] Constantine-rust: public fields and Default fields#331
Conversation
6bdb089 to
9f85b83
Compare
Owner
Author
|
If you use the KZG parallel implementation of Constantine, I have changed the API in #394. The threadpool is now directly stored in the KZG context. I can update the branch whenever. No impact on the serial KZG. |
|
Thanks, if you want to work on |
9f85b83 to
275537c
Compare
Owner
Author
|
Happy New Year, I've updated the bindings to latest Constantine. |
275537c to
3ed6eea
Compare
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
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.
Requested by https://github.com/sifraitech/rust-kzg
Due to the orphan rule preventing building traits on top of external libraries, the Sifraitech team needs the fields to be public.
Unfortunately this conflicts with security best practices and isolation concerns, especially given that Constantine may handle sensitive secrets that must be protected in a best effort manner. Keeping fields private is a good way to avoid accidentally spilling data in a debug log for example.
This exposes the fields in a branch while keeping the library pristine.
This also adds a
Defaulttrait implementation for convenience. For elliptic curves using it as-is MAY result in undefined behavior for Jacobian or Projective points, assetInfis the proper initialization.This commit Ensure the projective point at infinity is not all zeros, but (0, 1, 0) fixed an issue with all zero initialization.
Though I'm not sure how to automate it with
bindgen.cc @Armantidas @sauliusgrigaitis