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

EmbeddedCurvePoint cannot represent the point at infinity #4978

Closed
TomAFrench opened this issue May 5, 2024 · 0 comments · Fixed by AztecProtocol/aztec-packages#6384
Closed
Assignees
Labels
bug Something isn't working

Comments

@TomAFrench
Copy link
Member

The below code should return the point at infinity but instead it will fail to execute, we should update EmbeddedCurvePoint to have an infinity: bool field.

use dep::std::scalar_mul::EmbeddedCurvePoint;
use dep::std::println;

fn main() {
    let g1_x : Field = 0x0000000000000000000000000000000000000000000000000000000000000001;
    let g1_y : Field = 17631683881184975370165255887551781615748388533673675138860;

    let point = EmbeddedCurvePoint { x: g1_x, y: g1_y };
    let negated_point = EmbeddedCurvePoint { x: g1_x, y: -g1_y };

    let sum = point + negated_point;
    println(sum);
}
@github-project-automation github-project-automation bot moved this to 📋 Backlog in Noir May 5, 2024
@TomAFrench TomAFrench added the bug Something isn't working label May 5, 2024
@guipublic guipublic self-assigned this May 13, 2024
TomAFrench pushed a commit to AztecProtocol/aztec-packages that referenced this issue May 17, 2024
Resolves noir-lang/noir#4978

Since elliptic curve addition in barretenberg is already handling the
point at infinity, I simply expose it in the ACIR opcode.
@github-project-automation github-project-automation bot moved this from 📋 Backlog to ✅ Done in Noir May 17, 2024
AztecBot pushed a commit to AztecProtocol/barretenberg that referenced this issue May 18, 2024
Resolves noir-lang/noir#4978

Since elliptic curve addition in barretenberg is already handling the
point at infinity, I simply expose it in the ACIR opcode.
AztecBot pushed a commit to AztecProtocol/aztec-nr that referenced this issue May 18, 2024
Resolves noir-lang/noir#4978

Since elliptic curve addition in barretenberg is already handling the
point at infinity, I simply expose it in the ACIR opcode.
signorecello pushed a commit to AztecProtocol/aztec-packages that referenced this issue May 20, 2024
Resolves noir-lang/noir#4978

Since elliptic curve addition in barretenberg is already handling the
point at infinity, I simply expose it in the ACIR opcode.
superstar0402 added a commit to superstar0402/aztec-nr that referenced this issue Aug 16, 2024
Resolves noir-lang/noir#4978

Since elliptic curve addition in barretenberg is already handling the
point at infinity, I simply expose it in the ACIR opcode.
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
Status: ✅ Done
Development

Successfully merging a pull request may close this issue.

2 participants