Skip to content

Update cryptography.adoc #1625

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

Merged
merged 7 commits into from
Jun 9, 2025
Merged

Update cryptography.adoc #1625

merged 7 commits into from
Jun 9, 2025

Conversation

feltroidprime
Copy link
Contributor

@feltroidprime feltroidprime commented Jun 6, 2025

Description of the Changes

Add information about the curve order.

PR Preview URL

https://starknet-io.github.io/starknet-docs/pr-1625/architecture-and-concepts/cryptography/#the_stark_curve

Check List

  • Changes made against main branch and PR does not conflict
  • PR title is meaningful, e.g: minor typos fix in README
  • Detailed description added under "Description of the Changes"
  • Specific URL(s) added under "PR Preview URL"

This change is Reviewable

@starknet-bot
Copy link
Collaborator

Oops, your pull request failed to pass the Typo tests stage :( . see the result:
error: DECALRE should be DECLARE
--> ./components/Starknet/modules/architecture-and-concepts/pages/network-architecture/starknet-state.adoc:52:21
|
52 | * stem:[$tx$] is a DECALRE transaction, and stem:[$S'$] contains the class hash and definition in the contract class's mapping
| ^^^^^^^
|

Please fix the typo, commit and push!

@starknet-bot
Copy link
Collaborator

Oops, your pull request failed to pass the Typo tests stage :( . see the result:
error: DECALRE should be DECLARE
--> ./components/Starknet/modules/architecture-and-concepts/pages/network-architecture/starknet-state.adoc:52:21
|
52 | * stem:[$tx$] is a DECALRE transaction, and stem:[$S'$] contains the class hash and definition in the contract class's mapping
| ^^^^^^^
|

Please fix the typo, commit and push!

@starknet-bot
Copy link
Collaborator

Oops, your pull request failed to pass the Typo tests stage :( . see the result:
error: DECALRE should be DECLARE
--> ./components/Starknet/modules/architecture-and-concepts/pages/network-architecture/starknet-state.adoc:52:21
|
52 | * stem:[$tx$] is a DECALRE transaction, and stem:[$S'$] contains the class hash and definition in the contract class's mapping
| ^^^^^^^
|

Please fix the typo, commit and push!

@starknet-bot
Copy link
Collaborator

Your preview build is ready! ✨ Check the following link in 1-2 minutes: https://starknet-io.github.io/starknet-docs/pr-1625/ .

@starknet-bot
Copy link
Collaborator

Your preview build is ready! ✨ Check the following link in 1-2 minutes: https://starknet-io.github.io/starknet-docs/pr-1625/ .

1 similar comment
@starknet-bot
Copy link
Collaborator

Your preview build is ready! ✨ Check the following link in 1-2 minutes: https://starknet-io.github.io/starknet-docs/pr-1625/ .

@LandauRaz
Copy link
Collaborator

Hey @feltroidprime, thanks for the contribution 🙏
The typo has been fixed, but regarding the info about the number of points on the STARK curve:

  1. Can you add more information on how you got to it?
  2. Why did you feel adding this info was necessary in the first place?

@feltroidprime
Copy link
Contributor Author

feltroidprime commented Jun 8, 2025

Hey @feltroidprime, thanks for the contribution 🙏 The typo has been fixed, but regarding the info about the number of points on the STARK curve:

1. Can you add more information on how you got to it?

2. Why did you feel adding this info was necessary in the first place?

1 . It can be verified by pasting this SageMath snippet ( https://sagecell.sagemath.org/ ) :

a = 1
b = 3141592653589793238462643383279502884197169399375105820974944592307816406665
p = 2^251 + 17*2^192 +1

E = EllipticCurve(GF(p), [0,0,0,a,b])
print(E)
n=E.order()
print(f"order = {n}")
print(f"      = {hex(n)}")
print(f"order is prime: {n.is_prime()}")

output:

Elliptic Curve defined by y^2 = x^3 + x + 3141592653589793238462643383279502884197169399375105820974944592307816406665 over Finite Field of size 3618502788666131213697322783095070105623107215331596699973092056135872020481
order = 3618502788666131213697322783095070105526743751716087489154079457884512865583
      = 0x800000000000010ffffffffffffffffb781126dcae7b2321e66a241adc64d2f
order is prime: True
  1. Short answer : because I was looking for it, so other might too.

The order of an elliptic is a standard information, for most (if not all) algorithms using an elliptic curve, the order is needed (signatures like ecdsa, zk-proof, etc).

See https://github.com/xJonathanLEI/starknet-rs/blob/194631520a02ce0f0b7c7bd3784831047bc43eac/starknet-crypto/src/rfc6979.rs#L7 for example.

@LandauRaz LandauRaz self-requested a review June 9, 2025 15:03
@LandauRaz
Copy link
Collaborator

Got it, thanks for the clarification, and thanks again for the contribution!

@LandauRaz LandauRaz merged commit 737861d into starknet-io:main Jun 9, 2025
1 check was pending
@starknet-bot
Copy link
Collaborator

Your preview build is ready! ✨ Check the following link in 1-2 minutes: https://starknet-io.github.io/starknet-docs/pr-1625/ .

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