Skip to content

Adding Stark curve #1000

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

Closed
wants to merge 3 commits into from
Closed

Adding Stark curve #1000

wants to merge 3 commits into from

Conversation

shramee
Copy link
Contributor

@shramee shramee commented Jun 26, 2025

Description

Adds Stark curve on 252 bit field.

This library implements the Stark curve, An elliptic curve defined over the
STARK field by equation y² ≡ x³ + α·x + β (mod q)
Where:

  • α = 1
  • β = 0x6f21413efbe40de150e596d72f7a8c5609ad26c15c915c1f4cdfcb99cee9e89
  • q = 3618502788666131213697322783095070105623107215331596699973092056135872020481
  • or, q = 2^251 + 17 * 2^192 + 1
    Generator point:
  • x = 0x1ef15c18599971b7beced415a40f0c7deacfd9b0d1819e03d723d8bc943cfca
  • y = 0x5668060aa49730b7be4801df46ec62de53ecd11abe43a32873000c36e8dc1f

https://docs.starknet.io/architecture/cryptography/#the_stark_curve

⚠️ Help needed: fields::tests::fq::test_fft test fails because of excessively high 2 adicity of the base field at 192.

image


Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.

  • Targeted PR against correct branch (master)
  • Linked to GitHub issue with discussion and accepted design OR have an explanation in the PR that describes this work.
  • Update: Existing tests for fields and curve group via the macro.
  • Updated relevant documentation in the code
  • Added a relevant changelog entry to the Pending section in CHANGELOG.md
  • Re-reviewed Files changed in the GitHub PR explorer

@shramee shramee requested review from a team as code owners June 26, 2025 18:28
@shramee shramee requested review from z-tech, Pratyush and mmagician and removed request for a team June 26, 2025 18:28
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.

1 participant