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

Faster witness generation and create monorepo with halo2curves #4

Merged
merged 172 commits into from
Feb 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
172 commits
Select commit Hold shift + click to select a range
a96589a
port base
kilic Jun 21, 2021
1e78923
fq2 compiles, wip
kilic Jun 21, 2021
3fcd958
fq6
kilic Jun 22, 2021
ac249d5
fq12
kilic Jun 22, 2021
66b7fa9
fq12 and tests
kilic Jun 22, 2021
245afb6
fr
kilic Jun 23, 2021
9ca05ff
field ext
kilic Jun 23, 2021
dff9f7f
wip
kilic Jun 24, 2021
37625f6
groups
kilic Jun 24, 2021
b15506d
pairing
kilic Jun 25, 2021
e6274aa
tidy 1
kilic Jun 27, 2021
efc1e28
tidy 2
kilic Jun 27, 2021
2daa4bd
tidy 3
kilic Jun 27, 2021
32362a4
clear cofactor
kilic Jun 28, 2021
2a11fb1
pairing engine
kilic Jun 28, 2021
89e7293
tidy 4
kilic Jun 28, 2021
d7830e0
remove unused
kilic Jun 28, 2021
85307d2
remove unused deps
kilic Jun 28, 2021
917ca2d
tidy
kilic Jul 2, 2021
601efca
use local pairing engine
kilic Jul 2, 2021
1738e38
iteration with consumer lib
kilic Jul 12, 2021
6781987
iteration with consumer 2
kilic Jul 15, 2021
73c10b6
allow infinity coordinates
kilic Jul 16, 2021
b1901ea
enable G1 for fft
kilic Jul 27, 2021
341da28
dependency version bump
kilic Oct 12, 2021
f1d13bf
sync with pasta traits
kilic Oct 12, 2021
4b123ab
move from_bytes_wide to BaseExt
kilic Nov 23, 2021
18f6e63
Add get_lower_128 function to FieldExt
kilic Nov 23, 2021
44308e0
sync with pasta traits
kilic Jan 7, 2022
27eb032
Public base field fq
kilic Jan 12, 2022
3f668ba
implement part of the FieldExt for Fq
kilic Jan 12, 2022
b4650f7
github actions test and bench
ashWhiteHat Jan 26, 2022
a1f8f2e
introduce assembly arithmetic
ashWhiteHat Jan 27, 2022
907c3ec
add x86_64 target
ashWhiteHat Jan 27, 2022
b22f569
commonize field method
ashWhiteHat Jan 27, 2022
56c18fd
Merge pull request #6 from appliedzkp/introduce-assembly
kilic Feb 10, 2022
230e2c6
Remove to-from_bytes
kilic Feb 12, 2022
530f4c0
Add constructor to Coordinates struct
kilic Mar 6, 2022
6bed067
MSM optimization
Brechtpd Mar 8, 2022
44aa97f
Fix prefetch feature
Brechtpd Mar 10, 2022
af85374
Add From<bool> traitbound to FieldExt. Should close #3
kilic Mar 14, 2022
49e5991
Revert unnecessary change
Brechtpd Mar 19, 2022
5898601
add cargo description
kilic Mar 30, 2022
3721879
Merge pull request #8 from appliedzkp/from_bool
kilic Apr 9, 2022
c616fb2
Feedback
Brechtpd May 3, 2022
1da2920
Merge pull request #7 from Brechtpd/msm
kilic May 3, 2022
55afb89
use pasta_curves traits everywhere
kilic May 4, 2022
578a657
cargo fmt
kilic May 4, 2022
f34e3da
prefetch only with x86
kilic May 4, 2022
1a64a92
add endomorphism test
kilic May 4, 2022
bea19f9
version
kilic May 4, 2022
dcb3fb8
new package name
kilic May 5, 2022
c5762ee
export pasta
kilic May 5, 2022
31f337c
sync g1 endo with pasta
kilic May 6, 2022
44a5755
batch add
kilic May 6, 2022
f516912
extend CurveAffine
kilic May 7, 2022
a760b9e
bump pasta_curves version
kilic May 17, 2022
8c48fb2
Add `secp256k1` curve
davidnevadoc May 13, 2022
6d23ee3
Move `common` back to `bn256`
davidnevadoc May 14, 2022
99da337
Remove `kzg` feature code
davidnevadoc May 15, 2022
8252607
Add `common_field` macro for `secp256k1` fields
davidnevadoc May 15, 2022
3376ad7
Add single macro for `secp256k1` fields impl
davidnevadoc May 16, 2022
fed2b27
Move `num-biguint` `num-traits` to dependencies
davidnevadoc May 19, 2022
f7c4ea5
Use common implementations and tests
kilic Jun 7, 2022
1199a47
Expose `Secp256k1`
kilic Jun 8, 2022
bb6e391
Bump version to `0.2` account `pse/pairing` as `0.1`
kilic Jun 8, 2022
bbd4cee
Fix affine multiplication: remove skipping a last bit to generelize
kilic Jun 9, 2022
a047fb5
fix: implement `ff::PrimeField::to_repr` for `Fq2`
han0110 Jun 20, 2022
f75ed26
Merge pull request #2 from han0110/fix/impl-fq2-to-repr
han0110 Aug 15, 2022
83c72d4
Use stable channel rust and enable `feature(asm_const)` by condition …
han0110 Sep 19, 2022
fac6fb5
VerifyingKey Serialization: merge Nalin's PR
nalinbhardwaj Oct 7, 2022
9a7f52b
feat: add serialization & deserialization of pkey and vkey using serde
jonathanpwang Oct 8, 2022
a2bcaa1
fix: add `num_fixed_commitments` to vkey serialization so correct number
jonathanpwang Oct 8, 2022
523e194
fix: serialize/deserialize pkey directly to/from file
jonathanpwang Oct 12, 2022
99886cc
Merge remote-tracking branch 'upstream/main' into axiom/add-serializa…
jonathanpwang Oct 25, 2022
3603fbf
bn256: make `Fq2`, `Fq6`, `Fq12` public
jonathanpwang Oct 25, 2022
1dc522c
fq12: fix comments to clarify computation of FQ12 coefficients and use
jonathanpwang Oct 25, 2022
1762b09
Update: implement suggestions for PR
jonathanpwang Nov 1, 2022
efbbde4
update: remove serialization from evaluation as we now recalculate di…
jonathanpwang Nov 1, 2022
5835ad1
Add 'halo2curves/' from commit '1dc522cd798677707e05ed42c8cc6b7ce3d12…
jonathanpwang Nov 9, 2022
7665a3d
Merge commit '0852b2e469bca98ddeb954198d7e49b36457d7d7' as 'ff'
jonathanpwang Nov 9, 2022
0852b2e
Squashed 'ff/' content from commit 1eddf54c
jonathanpwang Nov 9, 2022
2d62d25
feat: add git subtree with halo2curves and ff to start making optimiz…
jonathanpwang Nov 9, 2022
d81168b
chore: rename halocurves to halo2_curves
jonathanpwang Nov 9, 2022
2d7eb8e
Squashed 'ff/' changes from 1eddf54c..9b9a8d9c
jonathanpwang Nov 9, 2022
f92f13e
Merge commit '2d7eb8ec4fe09059620530f398df491582f4caef' into axiom/fa…
jonathanpwang Nov 9, 2022
7e364f8
ff: remove Copy trait to discourage unnecessary copies in code
jonathanpwang Nov 9, 2022
17b9d4b
WIP: remove copy from bn254
jonathanpwang Nov 9, 2022
7e8423a
Squashed 'group/' content from commit e9fc531e
jonathanpwang Nov 9, 2022
d19f146
Merge commit '7e8423a826b52922a7258d6a6938757708bcf86c' as 'group'
jonathanpwang Nov 9, 2022
bb2a02f
add zkcrypto/group to workspace
jonathanpwang Nov 9, 2022
b1b61ee
Squashed 'pasta_curves/' content from commit db830572
jonathanpwang Nov 9, 2022
12ed89e
Merge commit 'b1b61eebe2b4afb0060bfda144555f7ed5a0f81a' as 'pasta_cur…
jonathanpwang Nov 9, 2022
38d9a3b
revert back to including Copy trait because ConditionalSelect require…
jonathanpwang Nov 9, 2022
cb34663
Revert "WIP: remove copy from bn254"
jonathanpwang Nov 9, 2022
e0cf6cd
Revert "ff: remove Copy trait to discourage unnecessary copies in code"
jonathanpwang Nov 9, 2022
e422275
feat: change `region.assign_advice` to return just the `Cell` and
jonathanpwang Nov 9, 2022
9c15ed4
feat: add trait `Hash` to `ff::Field`
jonathanpwang Nov 9, 2022
8ba7270
feat: `region.assign_advice` now returns reference `&Assigned<F>` via
jonathanpwang Nov 9, 2022
c5ed84a
big change: in `prover::WitnessCollection` now use `Rc` to manage smart
jonathanpwang Nov 9, 2022
553c651
chore: restructure workspace to match halo2-ce monorepo
jonathanpwang Nov 10, 2022
5139953
fix: change dependencies so no patching required to use monorepo
jonathanpwang Nov 10, 2022
9e22b57
Squashed 'primitives/poseidon/' content from commit 5d29df01
jonathanpwang Nov 10, 2022
f58809d
Merge commit '9e22b57a15c4a3d8c2a420f6e482a9340fc4e698' as 'primitive…
jonathanpwang Nov 10, 2022
b1b2fcf
primitives/poseidon: initial add from PSE repo
jonathanpwang Nov 10, 2022
7f8a16a
fix: clippy warnings
jonathanpwang Nov 14, 2022
dbfc24c
feat: add conversion functions to `ff:PrimeField` to go between `u64`
jonathanpwang Nov 14, 2022
c647fa7
fix: remove use of `Rc` in `WitnessCollection::assign_advice`
jonathanpwang Nov 15, 2022
201b0b3
feat: add `is_zero_vartime` derived implementation for `Fr`
jonathanpwang Nov 15, 2022
b8627f9
Fix `secp256k1` compressed serialization
davidnevadoc Nov 15, 2022
f6c822d
update: remove `region` from `Cell` since we only use one region
jonathanpwang Nov 17, 2022
1f84218
feat: add trait `BigPrimeField` to `curves::arithmetic`
jonathanpwang Nov 17, 2022
8828b48
chore: rename package "curves" to "halo2curves" for easier patching
jonathanpwang Nov 19, 2022
b18e3b1
update: remove `?` from `WitnessCollection::assign_advice` due to
jonathanpwang Nov 20, 2022
e2af0f1
feat: add back `copy_advice` function for `AssignedCell<&Assigned<F>,
jonathanpwang Nov 21, 2022
a4538d9
feat: implement functions `row_offset` and `column` directly for
jonathanpwang Nov 23, 2022
280141c
Add serde test for curves
davidnevadoc Nov 23, 2022
c9168d5
feat: add `CurveAffineExt::into_coordinates` for raw unchecked affine…
jonathanpwang Nov 23, 2022
d522547
update: modify `assign_fixed` slightly for performance
jonathanpwang Nov 24, 2022
3ea7b9a
feat: implement `ProvingKey` serialization without using external crates
jonathanpwang Nov 25, 2022
fdf539f
examples: add `serialization` example to test `ProvingKey` read and
jonathanpwang Nov 25, 2022
a1b3169
curves: switch to using rust nightly "bigint_helper_methods" for finite
jonathanpwang Nov 25, 2022
cd81bfb
feat: implement `From<$field>` for `[u64; 4]` so field elements can be
jonathanpwang Nov 26, 2022
cd1999d
feat: add `From<[u64;4]>` and `To<[u64;4]>` to field implementations
jonathanpwang Nov 28, 2022
b8647fc
feat: add default implementation of `CurveAffineExt` for `CurveAffine`
jonathanpwang Nov 28, 2022
40ba60b
Squashed 'primitives/poseidon/' content from commit 5d29df01
jonathanpwang Nov 28, 2022
8f553e7
Merge commit '40ba60b86d16325268612a09007417005cdcadca' as 'primitive…
jonathanpwang Nov 28, 2022
f670a96
chore: add "poseidon" crate back as git subtree to handle "halo2curves"
jonathanpwang Nov 28, 2022
278e3ee
Merge pull request #8 from privacy-scaling-explorations/dav/fix/secp_…
kilic Dec 1, 2022
2c7f288
feat: added `to/from_bytes` for `ProvingKey` and `VerifyingKey`
jonathanpwang Dec 2, 2022
c8137e1
Merge branch 'axiom/add-serialization' into axiom/faster-witness-gene…
jonathanpwang Dec 4, 2022
07fb486
fix: get multi-phase constraint system to work with our version of
jonathanpwang Dec 7, 2022
701c27e
Make `Fq2`, `Fq6`, `Fq12` public (#7)
jonathanpwang Dec 9, 2022
c2d1af5
feat: change `region.assign_advice` to allow any `Into<Assigned<F>>` but
jonathanpwang Dec 10, 2022
db04cf3
feat: change `layouter.assign_region` to take `FnOnce` closure instead
jonathanpwang Dec 16, 2022
4a9d602
feat: derive `Serialize`, `Deserialize` for common fields and curves
jonathanpwang Dec 17, 2022
14e67ca
chore: derive `PartialEq, Hash` for `bn256::{Fq,Fr}` and
jonathanpwang Dec 21, 2022
a5cb3b8
fix/curves: `cmp` was not first performing Montgomery reduction
jonathanpwang Dec 21, 2022
5bcc891
feat: add trait `SerdeObject` for serialization of objects into raw
jonathanpwang Dec 21, 2022
dd6f8e4
chore: udpate crate version to 0.3.1
jonathanpwang Dec 21, 2022
01e9de0
chore: remote direct `PartialEq` implementation in bn254/assembly
jonathanpwang Dec 21, 2022
aa09e10
feat: read `VerifyingKey` and `ProvingKey` does not require `params` as
jonathanpwang Dec 21, 2022
79ecad4
fix: add impl `SerdeObject` to assembly macro
jonathanpwang Dec 21, 2022
db67f11
feat: add features "serde-raw" and "raw-unchecked" to
jonathanpwang Dec 21, 2022
2783c57
Merge commit '79ecad4e3b4a9f221c7cfeb6ec01bee43d7c01ff' into axiom/fe…
jonathanpwang Dec 21, 2022
c89ba2d
Merge branch 'feat/serde-raw' into axiom/feat/serde-raw
jonathanpwang Dec 21, 2022
1c61d24
feat: derive `Hash` for `Fq2, G1Affine, G2Affine` for future use
jonathanpwang Dec 21, 2022
417aead
chore: switch to feature "raw-unchecked"
jonathanpwang Dec 21, 2022
63127f6
fix: change `assert` to `debug_assert` in `read_raw_unchecked` functions
jonathanpwang Dec 22, 2022
bd2d87f
feat: add `next_phase` and `get_challenge` functions to `Region` so that
jonathanpwang Dec 22, 2022
afee8f6
Merge commit '63127f69b0f43a828b5f35d466085debe1e11e8c' into axiom/fa…
jonathanpwang Dec 22, 2022
12a0386
Merge branch 'feat/multiphase-in-one-synthesize' into axiom/faster-wi…
jonathanpwang Dec 22, 2022
8480325
update: change `is_less_than` to use `borrowing_sub` because it is
jonathanpwang Dec 23, 2022
75e3591
optimize: revert to old way of subtracting field elements without
jonathanpwang Dec 24, 2022
b070fc1
feat: parallelize (cpu) shplonk prover
jonathanpwang Dec 26, 2022
60ee8e2
shplonk: improve `construct_intermediate_sets` using `BTreeSet` and
jonathanpwang Dec 27, 2022
95ff83a
shplonk: change `construct_intermediate_sets` to use `FxHashSet` instead
jonathanpwang Dec 27, 2022
c228e00
shplonk: add `Send` and `Sync` to `Query` trait for more parallelization
jonathanpwang Dec 27, 2022
dfcc2a4
chore: in derive `field`, default `mul` is `const` again
jonathanpwang Dec 27, 2022
551c782
- Implements `PartialOrd` for `Value<F>`
Dec 7, 2022
7a444d3
chore: switch to halo2curves 0.3.1 tag
jonathanpwang Jan 5, 2023
be10b68
Fix MockProver `assert_verify` panic errors (#118)
CPerezz Jan 9, 2023
e56a4a4
Remove partial ordering for value
Jan 9, 2023
8c26a83
Remove transpose
Jan 9, 2023
0af4611
Merge pull request #115 from privacy-scaling-explorations/feat/challe…
adria0 Jan 9, 2023
b8e458e
Parallelize SHPLONK multi-open prover (#114)
jonathanpwang Jan 10, 2023
7aa1009
fix: FailureLocation::find empty-region handling (#121)
CPerezz Jan 11, 2023
fe81922
Merge remote-tracking branch 'upstream/main' into feat/serde-raw
jonathanpwang Jan 16, 2023
607c3a4
feat: add enum `SerdeFormat` for user to select
jonathanpwang Jan 16, 2023
8697a66
Merge branch 'feat/serde-raw' into axiom/faster-witness-generation
jonathanpwang Jan 16, 2023
475e45f
fix: revert use of raw pointer in `MockProver` and switch to using `Arc`
jonathanpwang Jan 17, 2023
77376d2
feat: add docs
jonathanpwang Feb 3, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@
**/*.rs.bk
Cargo.lock
.vscode
**/*.html
.DS_Store
17 changes: 16 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,21 @@
[workspace]
members = [
"halo2",
"halo2_gadgets",
"halo2_proofs",
"arithmetic/curves",
"primitives/poseidon"
]

[profile.dev]
opt-level = 3

[profile.release]
opt-level = 3
debug = false
debug-assertions = false
overflow-checks = false
lto = true
incremental = false
panic = "abort"
# codegen-units = 1 is not optimal on my machine; always profile locally to determine best preferences
# codegen-units = 1
92 changes: 92 additions & 0 deletions arithmetic/curves/.github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
name: CI Check
on:
pull_request:
push:
branches:
- main

jobs:
build:
if: github.event.pull_request.draft == false
name: Build
runs-on: ubuntu-latest
strategy:
matrix:
include:
- rust: 1.63.0
feature: default
- rust: nightly
feature: asm

steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
override: true
toolchain: ${{ matrix.rust }}
- name: Build
uses: actions-rs/cargo@v1
with:
command: build
args: --features ${{ matrix.feature }}

test:
if: github.event.pull_request.draft == false
name: Test
runs-on: ubuntu-latest
strategy:
matrix:
include:
- rust: 1.63.0
feature: default
- rust: nightly
feature: asm

steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
override: true
toolchain: ${{ matrix.rust }}
- name: Test
uses: actions-rs/cargo@v1
with:
command: test
args: --verbose --release --all --features ${{ matrix.feature }}

fmt:
if: github.event.pull_request.draft == false
name: Rustfmt
timeout-minutes: 30
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
- run: rustup component add rustfmt
- uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check

bench:
if: github.event.pull_request.draft == false
name: Bench
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
override: true
toolchain: nightly
- name: Bench arithmetic
uses: actions-rs/cargo@v1
with:
command: test
args: --profile bench test_field -- --nocapture
- name: Bench assembly arithmetic
uses: actions-rs/cargo@v1
with:
command: test
args: --profile bench test_field --features asm -- --nocapture
5 changes: 5 additions & 0 deletions arithmetic/curves/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/target
Cargo.lock
**/*.rs.bk
.vscode
**/*.html
36 changes: 36 additions & 0 deletions arithmetic/curves/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
[package]
name = "halo2curves"
version = "0.3.1"
authors = [
"Sean Bowe <[email protected]>",
"Jack Grigg <[email protected]>",
"Alex Vlasov <[email protected]>",
"Alex Gluchowski <[email protected]>"
]
license = "MIT/Apache-2.0"
edition = "2018"
readme = "README.md"
description = "Elliptic curve implementations and wrappers for halo2 library"

[dev-dependencies]
criterion = { version = "0.3", features = ["html_reports"] }
rand_xorshift = "0.3"
ark-std = { version = "0.3", features = ["print-trace"] }

[dependencies]
subtle = "2.4"
ff = "0.12"
group = "0.12"
pasta_curves = "0.4.1"
static_assertions = "1.1.0"
rand = "0.8"
rand_core = { version = "0.6", default-features = false }
lazy_static = { version = "1.4.0"}
num-bigint = "0.4.3"
num-traits = "0.2"
serde = { version = "1.0", default-features = false, features = ["derive"] }

[features]
default = []
asm = []
prefetch = []
201 changes: 201 additions & 0 deletions arithmetic/curves/LICENSE-APACHE
Original file line number Diff line number Diff line change
@@ -0,0 +1,201 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/

TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION

1. Definitions.

"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.

"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.

"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.

"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.

"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.

"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.

"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).

"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.

"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."

"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.

2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.

3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.

4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:

(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and

(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and

(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and

(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.

You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.

5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.

6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.

7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.

8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.

9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.

END OF TERMS AND CONDITIONS

APPENDIX: How to apply the Apache License to your work.

To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright [yyyy] [name of copyright owner]

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
23 changes: 23 additions & 0 deletions arithmetic/curves/LICENSE-MIT
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
Permission is hereby granted, free of charge, to any
person obtaining a copy of this software and associated
documentation files (the "Software"), to deal in the
Software without restriction, including without
limitation the rights to use, copy, modify, merge,
publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software
is furnished to do so, subject to the following
conditions:

The above copyright notice and this permission notice
shall be included in all copies or substantial portions
of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
Loading