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

Add compile warnings to every AffinePoint / ExtendedPoint getters #41

Open
ZER0 opened this issue Aug 18, 2020 · 0 comments
Open

Add compile warnings to every AffinePoint / ExtendedPoint getters #41

ZER0 opened this issue Aug 18, 2020 · 0 comments
Assignees
Labels
area:architecture Issues related to general architectural improvements to enhance performance and/or maintainabilty area:cryptography anything related to cryptographic primitives, hashing and ZKP status:minor Low priority improvements team:Core Low Level Core Development Team (Rust)

Comments

@ZER0
Copy link

ZER0 commented Aug 18, 2020

The coordinates of AffinePoint and ExtendedPoint are internals value that ideally should never be exposed as public APIs.
However, we need access to them in few critical cases, such PLONK since they're really coupled together, and the only way for PLONK to access to them is let make them public getters and available to every library.

This brings to misuse and overuse of such internals (with some interesting result, for example when we're trying to hashing: https://github.com/dusk-network/dusk-pki/pull/1/files#diff-96f32075a85698229737b72d5e411bcfR4-R9).

Therefore a developer shouldn't easily use it as regular public APIs.
We should raise a compiler error if the developer is trying to use them, so he's aware he needs to think twice before proceed: the idea is made the getters behind features, however a custom message might be useful to explain why it is happening.

Also, we'll wrap some specific use case in methods / functions of JubJub repo so that a developer doesn't need to access to the internals directly (see issue: #40)

@ZER0 ZER0 added area:architecture Issues related to general architectural improvements to enhance performance and/or maintainabilty area:cryptography anything related to cryptographic primitives, hashing and ZKP labels Aug 18, 2020
@CPerezz CPerezz changed the title Add compile errors to every AffinePoint / ExtendedPoint getters Add compile warnings to every AffinePoint / ExtendedPoint getters Aug 19, 2020
@ZER0 ZER0 added team:Core Low Level Core Development Team (Rust) type:question status:minor Low priority improvements labels Jan 15, 2021
@autholykos autholykos added team:R&D Research & Development (Cryptographic Protocol) and removed team:Core Low Level Core Development Team (Rust) labels Jul 1, 2021
@autholykos autholykos added team:Core Low Level Core Development Team (Rust) and removed team:R&D Research & Development (Cryptographic Protocol) labels Jul 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:architecture Issues related to general architectural improvements to enhance performance and/or maintainabilty area:cryptography anything related to cryptographic primitives, hashing and ZKP status:minor Low priority improvements team:Core Low Level Core Development Team (Rust)
Projects
None yet
Development

No branches or pull requests

2 participants