Crates.io | stark-curve |
lib.rs | stark-curve |
version | |
source | src |
created_at | 2023-11-24 14:55:01.162865 |
updated_at | 2024-12-06 12:03:11.115159 |
description | Stark curve implementation |
homepage | |
repository | https://github.com/LFDT-Lockness/stark-curve |
max_upload_size | |
id | 1047083 |
Cargo.toml error: | TOML parse error at line 17, column 1 | 17 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include` |
size | 0 |
Pure Rust implementation of Stark Curve. Provides basic elliptic curve arithmetic backed by
primeorder, elliptic-curve, and ff crates. #![no_std]
friendly.
As specified in a stark curve specs, this crate provides an implementation of a curve defined by equation:
$$y^2 = x^3 + \alpha x + \beta \pmod p$$
where:
$$ \begin{aligned} \alpha &= 1\\ \beta &= 3141592653589793238462643383279502884197169399375105820974944592307816406665\\ p &= 3618502788666131213697322783095070105623107215331596699973092056135872020481\\ &= 2^{251} + 17 \cdot 2^{192} + 1 \end{aligned} $$
Also, curve order $n$, which is not mentioned in the specs but can be found here:
$n = 3618502788666131213697322783095070105526743751716087489154079457884512865583$
Both $p$ and $n$ are prime.
This crate doesn't implement any sensitive cryptography code. Instead, we delegate scalar arithmetic to ff crate, and elliptic point arithmetic to primeorder crate, which are considered to be heavily used and tested.
Feel free to reach out to us in Discord!
Licensed under either of
at your option.