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

Projective vs Affine representation #7

Open
nmohnblatt opened this issue Apr 21, 2023 · 1 comment
Open

Projective vs Affine representation #7

nmohnblatt opened this issue Apr 21, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@nmohnblatt
Copy link
Contributor

nmohnblatt commented Apr 21, 2023

Make sure that we are using the right representation based on context. Anything that is being serialized or sent to external code should be converted to affine coordinates to guarantee that no information leaks and that points have a unique representation.

This issue may cause some proofs to fail. We add points to our Fiat-Shamir transcripts using the to_bytes macro. Given two different projective coordinates for the same point, to_bytes will produce different bytes. This would lead our Fiat-Shamir hash function to produce different challenges even though it is hashing the same point, thus failing to verify a proof.

The main questions are: at what point do we convert to affine coordinates? how much does it degrade performance?

References:
leaky projective coordinates https://eprint.iacr.org/2003/191

@nmohnblatt nmohnblatt added the bug Something isn't working label Apr 21, 2023
@nmohnblatt
Copy link
Contributor Author

nmohnblatt commented Apr 21, 2023

My intuition tells me that it's fine to keep everything in projective coordinates inside the code but any I/O (including outputting to the Fiat-Shamir transcript) must first convert to affine coordinates

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant