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

Switch to Montgomery representation #663

Open
wants to merge 25 commits into
base: main
Choose a base branch
from

Conversation

HadarIngonyama
Copy link
Contributor

@HadarIngonyama HadarIngonyama commented Nov 21, 2024

This PR changes the basic field multiplier to be the Montgomery modular multiplier. This means that the Field class now assumes Montgomery as the default representation of elements.

cuda-backend-branch: hadar/gpu_mont_mult

}
END_TIMER(ref, "scalar mult double-and-add", true);

ASSERT_EQ(mult, expected_mult);
}

TYPED_TEST(CurveSanity, ECarith)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yuvalingo keep these tests or remove?

END_TIMER(u64Mult_asm, "U64-MULT-asm", true);
}

#ifndef BARRET
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

keep this test? @Koren-Brand

@HadarIngonyama
Copy link
Contributor Author

The PR is currently missing mul_const optimization which is critial for the EC adder. Even with that optimization the MSM performance is 5% worse in CUDA - can we find the cause?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants