arkworks-rs / curves Goto Github PK
View Code? Open in Web Editor NEWImplementations of popular elliptic curves
Home Page: https://www.arkworks.rs
License: Apache License 2.0
Implementations of popular elliptic curves
Home Page: https://www.arkworks.rs
License: Apache License 2.0
The generator point being used is inconsistent with the generator in the bandersnatch paper. This can lead to mismatch with future implementations of bandersnatch that follow the paper.
0.3
The paper https://eprint.iacr.org/2021/1152.pdf on page 6, states that the generator in affine co-ordinates for the Twisted Edwards variant is:
xTE=29c132cc2c0b34c5743711777bbe42f32b79c022ad998465e1e71866a252ae18
yTE=2a6c669eda123e0f157d8b50badcd586358cad81eee464605e3167b6cc974166
In decimal:
xTE=18886178867200960497001835917649091219057080094937609519140440539760939937304
yTE=19188667384257783945677642223292697773471335439753913231509108946878080696678
This differs from the generator being used currently in arkworks: https://github.com/arkworks-rs/curves/blob/master/ed_on_bls12_381_bandersnatch/src/curves/mod.rs#L92
It was previously the point being used in the reference implementation (not sure how it was generated): https://github.com/asanso/Bandersnatch/blob/a4b844082575e576ab9278edf6ec2dc8719b8507/python-ref-impl/bench.py#L58
However, as stated in the paper, all generators are now deterministically computed by finding the lexicographically smallest valid x-coordinate of a point of the curve, and scaling it by the cofactor 4 such that the result is not the point at infinity
Change:
#[rustfmt::skip]
const GENERATOR_X: Fq = field_new!(Fq, "29627151942733444043031429156003786749302466371339015363120350521834195802525");
#[rustfmt::skip]
const GENERATOR_Y: Fq = field_new!(Fq, "27488387519748396681411951718153463804682561779047093991696427532072116857978");
To:
#[rustfmt::skip]
const GENERATOR_X: Fq = field_new!(Fq, "18886178867200960497001835917649091219057080094937609519140440539760939937304");
#[rustfmt::skip]
const GENERATOR_Y: Fq = field_new!(Fq, "19188667384257783945677642223292697773471335439753913231509108946878080696678");
This is a breaking change for libraries using bandersnatch in arkworks. However, GitHub searching for "ark-ed-on-bls12-381" returns one crate which is also not in production, so I believe the surface of affected crates will be negligible.
It seems algebra as a crate should be reserved for parameters; to preserve consistency, I suggest that sw6 pairing related formulas, currently in algebra, be moved to algebra-core as is standard for all other curves, by someone who is more qualified.
We've benchmarks by @achimcc that show MSMs running far slower than equal numbers of individual scalar multiplications. We found in native code for BLS12 curves that an MSM of size 10 runs 14x slower than 10 scalar multiplications, while an MSM of size 1000 runs 2.47 x slower than 1000 scalar multiplications. We found native code for Edwards curves gives even more outlandish results, except for the unrelated #151 issue.
https://github.com/achimcc/substrate-arkworks-examples/blob/main/benchmarks-comparison.md
There are some timeouts for MSMs in cargo bench
which suggests similar issues become visible there, aka not just @achim's benchmarks at fault here.
Benchmarking MSM for Bls12_381::G1: Warming up for 3.0000 s
Warning: Unable to complete 100 samples in 5.0s. You may wish to increase target time to 170.7s, or reduce sample count to 10.
Benchmarking MSM for Bls12_381::G1: Collecting 100 samples in estimated 170.74 sMSM for Bls12_381::G1 time: [1.5952 s 1.6066 s 1.6191 s]
Found 11 outliers among 100 measurements (11.00%)
6 (6.00%) high mild
5 (5.00%) high severe
0.4
Can't find any *Pairing*
match in the benchmark output. Even running cargo criterion --message-output=json
does not seem to produce any string matching "Pairing" in the id
, as one would expect reading ark-bench-templates.
$ cargo bench Pairing
See: #156 (comment)
To make sure we don't try to publish/tag twice, this is a separate task.
Once #133 is merged, the following should still be done:
tag commits on master & publish both crates with:
git tag v0.4.0-alpha.1
git push origin v0.4.0-alpha.1
cargo release publish
I run the bls12_isogeny_computer.sage script by the command sage bls12_isogeny_computer.sage
.
Error logs below:
Traceback (most recent call last):
File "sage/structure/category_object.pyx", line 839, in sage.structure.category_object.CategoryObject.getattr_from_category (build/cythonized/sage/structure/category_object.c:7204)
KeyError: 'point_homset'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/private/var/tmp/sage-10.0-current/local/var/lib/sage/venv-python3.11.1/lib/python3.11/site-packages/sage/schemes/projective/projective_subscheme.py", line 122, in point
return self._point(self.point_homset(), v, check=check)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/private/var/tmp/sage-10.0-current/local/var/lib/sage/venv-python3.11.1/lib/python3.11/site-packages/sage/schemes/elliptic_curves/ell_point.py", line 259, in __init__
point_homset = curve.point_homset()
^^^^^^^^^^^^^^^^^^
File "sage/structure/category_object.pyx", line 833, in sage.structure.category_object.CategoryObject.__getattr__ (build/cythonized/sage/structure/category_object.c:7123)
File "sage/structure/category_object.pyx", line 848, in sage.structure.category_object.CategoryObject.getattr_from_category (build/cythonized/sage/structure/category_object.c:7289)
File "sage/cpython/getattr.pyx", line 356, in sage.cpython.getattr.getattr_from_other_class (build/cythonized/sage/cpython/getattr.c:2706)
AttributeError: 'sage.rings.finite_rings.element_pari_ffelt.FiniteFieldElement_pari_ffelt' object has no attribute '__custom_name'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/private/var/tmp/sage-10.0-current/local/var/lib/sage/venv-python3.11.1/lib/python3.11/site-packages/sage/structure/sequence.py", line 450, in __init__
x[i] = universe(x[i])
^^^^^^^^^^^^^^
File "sage/structure/parent.pyx", line 896, in sage.structure.parent.Parent.__call__ (build/cythonized/sage/structure/parent.c:9516)
File "sage/structure/coerce_maps.pyx", line 161, in sage.structure.coerce_maps.DefaultConvertMap_unique._call_ (build/cythonized/sage/structure/coerce_maps.c:4840)
File "sage/structure/coerce_maps.pyx", line 156, in sage.structure.coerce_maps.DefaultConvertMap_unique._call_ (build/cythonized/sage/structure/coerce_maps.c:4732)
File "/private/var/tmp/sage-10.0-current/local/var/lib/sage/venv-python3.11.1/lib/python3.11/site-packages/sage/categories/sets_cat.py", line 1010, in _element_constructor_from_element_class
return self.element_class(self, *args, **keywords)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "sage/rings/finite_rings/element_pari_ffelt.pyx", line 341, in sage.rings.finite_rings.element_pari_ffelt.FiniteFieldElement_pari_ffelt.__init__ (build/cythonized/sage/rings/finite_rings/element_pari_ffelt.c:3736)
File "sage/rings/finite_rings/element_pari_ffelt.pyx", line 397, in sage.rings.finite_rings.element_pari_ffelt.FiniteFieldElement_pari_ffelt.construct_from (build/cythonized/sage/rings/finite_rings/element_pari_ffelt.c:4055)
TypeError: no coercion defined
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "sage/categories/map.pyx", line 780, in sage.categories.map.Map.__call__ (build/cythonized/sage/categories/map.c:7017)
File "/private/var/tmp/sage-10.0-current/local/var/lib/sage/venv-python3.11.1/lib/python3.11/site-packages/sage/schemes/elliptic_curves/ell_generic.py", line 582, in __call__
return plane_curve.ProjectivePlaneCurve.__call__(self, *args, **kwds)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/private/var/tmp/sage-10.0-current/local/var/lib/sage/venv-python3.11.1/lib/python3.11/site-packages/sage/schemes/generic/scheme.py", line 266, in __call__
return self.point(args)
^^^^^^^^^^^^^^^^
File "/private/var/tmp/sage-10.0-current/local/var/lib/sage/venv-python3.11.1/lib/python3.11/site-packages/sage/schemes/projective/projective_subscheme.py", line 124, in point
return self._point(self, v, check=check)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/private/var/tmp/sage-10.0-current/local/var/lib/sage/venv-python3.11.1/lib/python3.11/site-packages/sage/schemes/elliptic_curves/ell_point.py", line 272, in __init__
v = Sequence(v, R)
^^^^^^^^^^^^^^
File "/private/var/tmp/sage-10.0-current/local/var/lib/sage/venv-python3.11.1/lib/python3.11/site-packages/sage/structure/sequence.py", line 266, in Sequence
return Sequence_generic(x, universe, check, immutable, cr, cr_str, use_sage_types)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/private/var/tmp/sage-10.0-current/local/var/lib/sage/venv-python3.11.1/lib/python3.11/site-packages/sage/structure/sequence.py", line 452, in __init__
raise TypeError("unable to convert {} to an element of {}"
TypeError: unable to convert 92656596759244498130828963753907968110007873365071290181106087243768377627983634113826727000154150730961337906067*X2 + 5686222589310647169557844363658943733572305388244218174554731922275701639384320061976431434204712229824732289989 to an element of Finite Field in X6 of size 258664426012969094010652733694893533536393512754914660539884262666720468348340822774968888139573360124440321458177^6
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/echo/workspace/zk/arkworks/curves/bls12_377/scripts/bls12_isogeny_computer.sage.py", line 312, in <module>
g1_iso, g2_iso = bls12_377_isos()
^^^^^^^^^^^^^^^^
File "/Users/echo/workspace/zk/arkworks/curves/bls12_377/scripts/bls12_isogeny_computer.sage.py", line 116, in bls12_377_isos
assert iso_G2_F6(Ell2_prime.random_point()).curve() == Ell2_6
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "sage/categories/map.pyx", line 782, in sage.categories.map.Map.__call__ (build/cythonized/sage/categories/map.c:7097)
TypeError: (92656596759244498130828963753907968110007873365071290181106087243768377627983634113826727000154150730961337906067*X2 + 5686222589310647169557844363658943733572305388244218174554731922275701639384320061976431434204712229824732289989 : 248046677250249017986114874024006682457694007097948347830762628632585928619585110116869864652763039160563073414223*X2 + 250439256373287637607099457426277997407272350365845484661341840733186665031693545909968721333419263425439379885919 : 1) fails to convert into the map's domain Elliptic Curve defined by y^2 = x^3 + 258664426012969093767803788900155375310718423333002228745348378504588969913928960986831280324668974484999943225339*X6^4*x + 51732885202593818802130546738978706707278702550982932107976852533344093669668164554993777627914672024888064291631*X6^3 over Finite Field in X6 of size 258664426012969094010652733694893533536393512754914660539884262666720468348340822774968888139573360124440321458177^6, but a `pushforward` method is not properly implemented
master
sage bls12_isogeny_computer.sage
My sage version is SageMath version 10.0, Release Date: 2023-05-20
If VariableBaseMSM::multi_scalar_mul
is called with a scalar that exceeds the curve order, the output will not be correct. The scalar is not or incorrectly reduced. Compare to regular point mul
which handles this correctly.
0.3.0
use ark_ff::PrimeField;
use ark_ff::biginteger::BigInteger256;
use ark_ff::biginteger::BigInteger384;
use ark_ec::msm::VariableBaseMSM;
use ark_ec::AffineCurve;
use ark_ec::ProjectiveCurve;
fn main() {
let s: [u64; 4] = [
0x025607A7919D793F,
0xBDF7228F3A3DBD99,
0x68D0564B14693662,
0xAF6DD88BB87CB4AC];
let point = ark_bls12_381::G1Affine::prime_subgroup_generator();
let scalar = BigInteger256::new(s);
assert!(
point.mul(scalar).into_affine() ==
VariableBaseMSM::multi_scalar_mul(&[point], &[scalar]).into_affine());
}
Our new framework explicitly defines the Montgomery curve corresponding to a twisted Edwards curve.
This is, however, not unifying curve25519 and ed25519.
Ed25519 is a twisted Edwards curve, and is "birationally equivalent" to curve25519, but the mapping of A/B to a/d as well as u/v to x/y is different from standard formulas.
This is done with a good cause that ed25519 also needs to use small parameters to facilitate computation, so such adjustment is actually justified.
This, however, seems to suggest that we need to define curve25519 and ed25519 as two separate curves here. These two curves can additionally implement more functions (not covered by traits) for birationally equivalence, if necessary.
This was always the case till recently the patches has been removed here
We always want to implement the newest features for various curves as they become available in Algebra so we need it to be patched to be able to use Algebra master. Perhaps, It makes sense to have a release branch in curve which depends on the corresponding release in Algebra, but it also makes sense that the master to be patched to depends on Algebra's bleeding edge master as it is the case for Algebra itself.
Otherwise, the curve developers will be blocked from taking advantage of new features in Algebra till next release.
Do you plan to implement hashing functions on the supported BLS curves? It would be nice since they are needed in applications like [multi/threshold] signatures.
https://docs.rs/ark-ed-on-bls12-381/latest/ark_ed_on_bls12_381/ says:
This library implements a twisted Edwards curve whose base field is the scalar field of the curve BLS12-377.
That's incorrect; it should say the scalar field of BLS12-381.
Current HEAD in arkworks-rs/curves (d1ced15).
Want to use grumpkin crate as it's not published yet but not able to build when importing through git, able to build from cargo package.
Get following errors:
Compiling ark-bn254 v0.4.0 (https://github.com/arkworks-rs/curves#0a64024e)
error[E0432]: unresolved import `ark_ff::AdditiveGroup`
--> /Users/sambhav.dusad/.cargo/git/checkouts/curves-a0d652819d10cde2/0a64024/bn254/src/curves/g1.rs:7:14
|
7 | use ark_ff::{AdditiveGroup, BigInt, Field, MontFp, PrimeField, Zero};
| ^^^^^^^^^^^^^ no `AdditiveGroup` in the root
error[E0432]: unresolved import `ark_ff::AdditiveGroup`
--> /Users/sambhav.dusad/.cargo/git/checkouts/curves-a0d652819d10cde2/0a64024/bn254/src/curves/g2.rs:6:14
|
6 | use ark_ff::{AdditiveGroup, BigInt, MontFp, PrimeField, Zero};
| ^^^^^^^^^^^^^ no `AdditiveGroup` in the root
error[E0438]: const `ENDO_COEFFS` is not a member of trait `GLVConfig`
--> /Users/sambhav.dusad/.cargo/git/checkouts/curves-a0d652819d10cde2/0a64024/bn254/src/curves/g1.rs:53:5
|
53 | / const ENDO_COEFFS: &'static [Self::BaseField] = &[MontFp!(
54 | | "21888242871839275220042445260109153167277707414472061641714758635765020556616"
55 | | )];
| |_______^ not a member of trait `GLVConfig`
error[E0438]: const `LAMBDA` is not a member of trait `GLVConfig`
--> /Users/sambhav.dusad/.cargo/git/checkouts/curves-a0d652819d10cde2/0a64024/bn254/src/curves/g1.rs:57:5
|
57 | / const LAMBDA: Self::ScalarField =
58 | | MontFp!("21888242871839275217838484774961031246154997185409878258781734729429964517155");
| |_________________________________________________________________________________________________^ not a member of trait `GLVConfig`
error[E0438]: const `SCALAR_DECOMP_COEFFS` is not a member of trait `GLVConfig`
--> /Users/sambhav.dusad/.cargo/git/checkouts/curves-a0d652819d10cde2/0a64024/bn254/src/curves/g1.rs:60:5
|
60 | / const SCALAR_DECOMP_COEFFS: [(bool, <Self::ScalarField as PrimeField>::BigInt); 4] = [
61 | | (false, BigInt!("147946756881789319000765030803803410728")),
62 | | (true, BigInt!("9931322734385697763")),
63 | | (false, BigInt!("9931322734385697763")),
64 | | (false, BigInt!("147946756881789319010696353538189108491")),
65 | | ];
| |______^ not a member of trait `GLVConfig`
error[E0407]: method `endomorphism_affine` is not a member of trait `GLVConfig`
--> /Users/sambhav.dusad/.cargo/git/checkouts/curves-a0d652819d10cde2/0a64024/bn254/src/curves/g1.rs:72:5
|
72 | / fn endomorphism_affine(p: &Affine<Self>) -> Affine<Self> {
73 | | let mut res = (*p).clone();
74 | | res.x *= Self::ENDO_COEFFS[0];
75 | | res
76 | | }
| |_____^ not a member of trait `GLVConfig`
Latest git commit
tried reproducing in a minimal repo.
Estonian e-Identity keys sign using ECDSA on secp384r1.
It's unethical to place human identifying keys on a transparent blockchain of course, like say https://github.com/LogvinovLeon/estid-sig proposes, but people could've off-chain usages, so perhaps secp384r1 makes sense here?
We could also identify pairing friendly curves whose group order agreed with the base field of secp384r1, so that some ECDSA gadget could verify an Estonian e-Identity signature in zero-knowledge. It's still tricky to use this on-chain, but much less awful..
What do people think?
Currently the CI is taking on the order of 19-20 minutes to build all the crates and test them. We should see if there are thing we can do to reduce this. (E.g. split up the curves and do more CI tests in parallel, get incremental builds / caching, etc.)
If we are considering a model in which a group of users are willing to trust a server to preserve their functional privacy, one could consider proof batching. Value privacy is still preserved if the user generates their own proof. If not, the user can also delegate this.
In this setting, it seems that the miller loop arithmetic complexity is the most important number, at least for batching for Groth16, in which case BLS27, which has both the lowest arithmetic complexity and G1 size among all curves considered at the 128-bit security level in the 2019 review on pairings, should be considered.
Taking into account Cheon's attack, I propose to find a curve with a 319-bit modulus, which would have a subgroup of size about 275-bits, giving a security of 125-bits with powers of tau up to 2^23.
These curves are implemented in the O(1)-labs fork, so porting them over is a simple copy-paste job.
In this file, we used this as the CP6-782's ate pairing count.
/// ATE_LOOP_COUNT =
/// 506464946133393486072777102926336625944849939610982267859828541006717966526573193706126370441346337661774335955699621
pub const ATE_LOOP_COUNT: [u64; 13] = [
0x55c5b9b57b942ae8,
0x3d52287d3dfd424a,
0xcf1ff9d6a543deb7,
0x820c9c5711ceeebc,
0x549a2d44305d20fe,
0x50f5c131afd70235,
0xab3596c8617c5792,
0x830c728d80f9d78b,
0x6a7223ee72023d07,
0xbc5d176b746af026,
0xe959283d8f526663,
0xc4d2263babf8941f,
0x3848,
];
However, [u64; 13] above is not 506...9621, but it is q - r
. I.e., the comment and the const here do not match.
How to interpret this?
Note that BN254's comment mentions that
/// MODULUS = 258664426012969094010652733694893533536393512754914660539884262666720468348340822774968888139573360124440321458177
#[rustfmt::skip]
const MODULUS: BigInteger = BigInteger([
0x3c208c16d87cfd47,
0x97816a916871ca8d,
0xb85045b68181585d,
0x30644e72e131a029,
]);
Line 22 in 880a010
However, the modulus number is not the one mentioned there. Indeed, that number in the comment is BLS12-377's.
I will do a double check of the comments in BN254 and submit a PR. A brief checking shows that the code is right, just the comments may need an update.
#9d232a7
I've noticed that the Grumpkin curve which forms a complete half-pairing cycle with Bn254 is missing in the workspace. Therefore, I though it would be nice to add it.
Specially since we need it in https://github.com/privacy-scaling-explorations/folding-schemes to try to verify inside of the EVM a folding-decider proof.
Hence, only Bn254-Grumpkin is useful for us.
I have a PR ready. Hope it's welcome! :)
Currently, the tests are extremely scattershot. This is detrimental to code maintainability.
We should try to refactor the tests to be more standardised (e.g. use test_rng() or XorshiftRng?), extract the common elements. Similar to what is done in algebra-bench and algebra/tests
Your bls12-377 curve (scalar field of order p = 52435875175126190479447740508185965837690552500527637822603658699938581184513
) uses 11
as a multiplicative generator for this subgroup, but 11
actually has order (p-1)/35
. Using 22
as the generator would do the trick.
Code pointer: https://github.com/arkworks-rs/curves/blob/master/bls12_377/src/fields/fr.rs#L56-L58
0.2
Not sure if GENERATOR
means something different than I expected. Assuming this should be fixed, I'm happy to submit a PR.
Implement the Bitcoin curve.
Possible issue: the existing field infrastructure in ark-ff does not support "full-wdith" moduli. For example, a 255-bit modulus is fine, but a 256-bit one might not be.
The implementation can hopefully follow the existing curve implementations. Another option would be to wrap existing fast arithmetic from other libraries/implementations (though there are not many fast pure-Rust libraries).
When trying to build the project, building fails with 10 errors.
master branch
cargo build
Result:
error: unused import: `Field`
--> mnt4_298/src/curves/g2.rs:6:14
|
6 | use ark_ff::{Field, MontFp};
| ^^^^^
|
note: the lint level is defined here
--> mnt4_298/src/lib.rs:4:5
|
4 | unused,
| ^^^^^^
= note: `#[deny(unused_imports)]` implied by `#[deny(unused)]`
error[E0599]: no associated item named `ZERO` found for struct `ark_ff::Fp` in the current scope
--> secp256k1/src/curves/mod.rs:32:29
|
32 | const COEFF_A: Fq = Fq::ZERO;
| ^^^^ associated item not found in `ark_ff::Fp<ark_ff::MontBackend<FqConfig, 4>, 4>`
|
= help: items from traits can only be used if the trait is in scope
help: the following trait is implemented but not in scope; perhaps add a `use` for it:
|
1 | use ark_ec::AdditiveGroup;
|
error: unused import: `Field`
--> bn254/src/curves/g2.rs:5:14
|
5 | use ark_ff::{Field, MontFp, Zero};
| ^^^^^
|
note: the lint level is defined here
--> bn254/src/lib.rs:4:5
|
4 | unused,
| ^^^^^^
= note: `#[deny(unused_imports)]` implied by `#[deny(unused)]`
error[E0432]: unresolved import `ark_ec::Group`
--> bls12_381/src/curves/g1.rs:7:17
|
7 | AffineRepr, Group,
| ^^^^^ no `Group` in the root
error[E0432]: unresolved import `ark_ec::Group`
--> bls12_381/src/curves/g2.rs:9:29
|
9 | AffineRepr, CurveGroup, Group,
| ^^^^^ no `Group` in the root
error[E0599]: no associated item named `ZERO` found for struct `ark_ff::Fp` in the current scope
--> pallas/src/curves/mod.rs:31:29
|
31 | const COEFF_A: Fq = Fq::ZERO;
| ^^^^ associated item not found in `ark_ff::Fp<ark_ff::MontBackend<FqConfig, 4>, 4>`
|
= help: items from traits can only be used if the trait is in scope
help: the following trait is implemented but not in scope; perhaps add a `use` for it:
|
1 | use ark_ec::AdditiveGroup;
|
error: unused import: `Field`
--> bls12_381/src/curves/g1.rs:9:14
|
9 | use ark_ff::{Field, MontFp, PrimeField, Zero};
| ^^^^^
|
note: the lint level is defined here
--> bls12_381/src/lib.rs:4:5
|
4 | unused,
| ^^^^^^
= note: `#[deny(unused_imports)]` implied by `#[deny(unused)]`
error[E0599]: no associated item named `ZERO` found for struct `ark_ff::Fp` in the current scope
--> mnt4_298/src/curves/g2.rs:55:13
|
55 | Fq::ZERO,
| ^^^^ associated item not found in `ark_ff::Fp<ark_ff::MontBackend<FqConfig, 5>, 5>`
|
= help: items from traits can only be used if the trait is in scope
help: the following trait is implemented but not in scope; perhaps add a `use` for it:
|
1 | use ark_ec::AdditiveGroup;
|
error[E0599]: no associated item named `ZERO` found for struct `ark_ff::Fp` in the current scope
--> mnt4_298/src/curves/mod.rs:22:37
|
22 | const TWIST: Fq2 = Fq2::new(Fq::ZERO, Fq::ONE);
| ^^^^ associated item not found in `ark_ff::Fp<ark_ff::MontBackend<FqConfig, 5>, 5>`
|
= help: items from traits can only be used if the trait is in scope
help: the following trait is implemented but not in scope; perhaps add a `use` for it:
|
1 | use ark_ec::AdditiveGroup;
|
error[E0599]: no associated item named `ZERO` found for struct `ark_ff::Fp` in the current scope
--> mnt4_298/src/curves/mod.rs:29:69
|
29 | const TWIST_COEFF_A: Fq2 = Fq2::new(G1_COEFF_A_NON_RESIDUE, Fq::ZERO);
| ^^^^ associated item not found in `ark_ff::Fp<ark_ff::MontBackend<FqConfig, 5>, 5>`
|
= help: items from traits can only be used if the trait is in scope
help: the following trait is implemented but not in scope; perhaps add a `use` for it:
|
1 | use ark_ec::AdditiveGroup;
|
For more information about this error, try `rustc --explain E0599`.
error: could not compile `ark-secp256k1` due to previous error
warning: build failed, waiting for other jobs to finish...
error: could not compile `ark-pallas` due to previous error
error[E0599]: no associated item named `ZERO` found for struct `ark_ff::Fp` in the current scope
--> bn254/src/curves/g1.rs:27:29
|
27 | const COEFF_A: Fq = Fq::ZERO;
| ^^^^ associated item not found in `ark_ff::Fp<ark_ff::MontBackend<FqConfig, 4>, 4>`
|
= help: items from traits can only be used if the trait is in scope
help: the following trait is implemented but not in scope; perhaps add a `use` for it:
|
1 | use ark_ec::AdditiveGroup;
|
error[E0599]: no associated item named `ZERO` found for struct `QuadExtField` in the current scope
--> bn254/src/curves/g2.rs:35:31
|
35 | const COEFF_A: Fq2 = Fq2::ZERO;
| ^^^^ associated item not found in `QuadExtField<Fp2ConfigWrapper<fq2::Fq2Config>>`
|
= help: items from traits can only be used if the trait is in scope
help: the following trait is implemented but not in scope; perhaps add a `use` for it:
|
1 | use ark_ec::AdditiveGroup;
|
error: unused import: `Field`
--> mnt4_753/src/curves/g2.rs:6:14
|
6 | use ark_ff::{Field, MontFp};
| ^^^^^
|
note: the lint level is defined here
--> mnt4_753/src/lib.rs:4:5
|
4 | unused,
| ^^^^^^
= note: `#[deny(unused_imports)]` implied by `#[deny(unused)]`
error[E0432]: unresolved import `ark_ec::Group`
--> bls12_377/src/curves/g2.rs:7:29
|
7 | AffineRepr, CurveGroup, Group,
| ^^^^^ no `Group` in the root
error[E0599]: no associated item named `ZERO` found for struct `ark_ff::Fp` in the current scope
--> mnt4_298/src/fields/fq4.rs:15:42
|
15 | const NONRESIDUE: Fq2 = Fq2::new(Fq::ZERO, Fq::ONE);
| ^^^^ associated item not found in `ark_ff::Fp<ark_ff::MontBackend<FqConfig, 5>, 5>`
|
= help: items from traits can only be used if the trait is in scope
help: the following trait is implemented but not in scope; perhaps add a `use` for it:
|
1 | use ark_ec::AdditiveGroup;
|
error[E0599]: no associated item named `ZERO` found for struct `ark_ff::Fp` in the current scope
--> bls12_381/src/curves/g2.rs:209:9
|
209 | Fq::ZERO,
| ^^^^ associated item not found in `ark_ff::Fp<ark_ff::MontBackend<FqConfig, 6>, 6>`
|
= help: items from traits can only be used if the trait is in scope
help: the following trait is implemented but not in scope; perhaps add a `use` for it:
|
1 | use ark_ec::AdditiveGroup;
|
error[E0599]: no associated item named `ZERO` found for struct `ark_ff::Fp` in the current scope
--> bls12_381/src/curves/g2.rs:226:9
|
226 | Fq::ZERO
| ^^^^ associated item not found in `ark_ff::Fp<ark_ff::MontBackend<FqConfig, 6>, 6>`
|
= help: items from traits can only be used if the trait is in scope
help: the following trait is implemented but not in scope; perhaps add a `use` for it:
|
1 | use ark_ec::AdditiveGroup;
|
error: could not compile `ark-mnt4-298` due to 5 previous errors
error[E0599]: no associated item named `ZERO` found for struct `ark_ff::Fp` in the current scope
--> bls12_381/src/curves/g1.rs:42:29
|
42 | const COEFF_A: Fq = Fq::ZERO;
| ^^^^ associated item not found in `ark_ff::Fp<ark_ff::MontBackend<FqConfig, 6>, 6>`
|
= help: items from traits can only be used if the trait is in scope
help: the following trait is implemented but not in scope; perhaps add a `use` for it:
|
1 | use ark_ec::AdditiveGroup;
|
error[E0599]: no method named `mul_bigint` found for struct `ark_ec::short_weierstrass::Projective` in the current scope
--> bls12_381/src/curves/g1.rs:69:49
|
69 | let minus_x_squared_times_p = x_times_p.mul_bigint(crate::Config::X).neg();
| ^^^^^^^^^^ method not found in `ark_ec::short_weierstrass::Projective<curves::g1::Config>`
|
::: /Users/user/.cargo/git/checkouts/algebra-7e23afa68841b66e/c015ea3/ec/src/lib.rs:60:8
|
60 | fn mul_bigint(&self, other: impl AsRef<[u64]>) -> Self;
| ---------- the method is available for `ark_ec::short_weierstrass::Projective<curves::g1::Config>` here
|
= help: items from traits can only be used if the trait is in scope
help: the following trait is implemented but not in scope; perhaps add a `use` for it:
|
1 | use ark_ec::PrimeGroup;
|
error[E0599]: no method named `double` found for struct `ark_ec::short_weierstrass::Projective` in the current scope
--> bls12_381/src/curves/g2.rs:101:69
|
101 | let mut psi2_p2 = double_p_power_endomorphism(&p_projective.double());
| ^^^^^^ method not found in `ark_ec::short_weierstrass::Projective<curves::g2::Config>`
|
::: /Users/user/.cargo/git/checkouts/algebra-7e23afa68841b66e/c015ea3/ff/src/fields/mod.rs:93:8
|
93 | fn double(&self) -> Self {
| ------ the method is available for `ark_ec::short_weierstrass::Projective<curves::g2::Config>` here
|
= help: items from traits can only be used if the trait is in scope
help: the following trait is implemented but not in scope; perhaps add a `use` for it:
|
1 | use ark_ec::AdditiveGroup;
|
error[E0599]: no method named `mul_bigint` found for struct `ark_ec::short_weierstrass::Projective` in the current scope
--> bls12_381/src/curves/g2.rs:109:21
|
109 | tmp2 = tmp2.mul_bigint(x).neg();
| ^^^^^^^^^^ method not found in `ark_ec::short_weierstrass::Projective<curves::g2::Config>`
|
::: /Users/user/.cargo/git/checkouts/algebra-7e23afa68841b66e/c015ea3/ec/src/lib.rs:60:8
|
60 | fn mul_bigint(&self, other: impl AsRef<[u64]>) -> Self;
| ---------- the method is available for `ark_ec::short_weierstrass::Projective<curves::g2::Config>` here
|
= help: items from traits can only be used if the trait is in scope
help: the following trait is implemented but not in scope; perhaps add a `use` for it:
|
1 | use ark_ec::PrimeGroup;
|
error: could not compile `ark-bn254` due to 3 previous errors
error[E0599]: no associated item named `ZERO` found for struct `ark_ff::Fp` in the current scope
--> mnt4_753/src/curves/g2.rs:62:13
|
62 | Fq::ZERO,
| ^^^^ associated item not found in `ark_ff::Fp<ark_ff::MontBackend<FqConfig, 12>, 12>`
|
= help: items from traits can only be used if the trait is in scope
help: the following trait is implemented but not in scope; perhaps add a `use` for it:
|
1 | use ark_ec::AdditiveGroup;
|
error[E0599]: no associated item named `ZERO` found for struct `ark_ff::Fp` in the current scope
--> mnt4_753/src/curves/mod.rs:25:54
|
25 | const TWIST: Fp2<Self::Fp2Config> = Fp2::new(Fq::ZERO, Fq::ONE);
| ^^^^ associated item not found in `ark_ff::Fp<ark_ff::MontBackend<FqConfig, 12>, 12>`
|
= help: items from traits can only be used if the trait is in scope
help: the following trait is implemented but not in scope; perhaps add a `use` for it:
|
1 | use ark_ec::AdditiveGroup;
|
error[E0599]: no associated item named `ZERO` found for struct `ark_ff::Fp` in the current scope
--> mnt4_753/src/curves/mod.rs:32:86
|
32 | const TWIST_COEFF_A: Fp2<Self::Fp2Config> = Fp2::new(G1_COEFF_A_NON_RESIDUE, Fq::ZERO);
| ^^^^ associated item not found in `ark_ff::Fp<ark_ff::MontBackend<FqConfig, 12>, 12>`
|
= help: items from traits can only be used if the trait is in scope
help: the following trait is implemented but not in scope; perhaps add a `use` for it:
|
1 | use ark_ec::AdditiveGroup;
|
error[E0599]: no associated item named `ZERO` found for struct `ark_ff::Fp` in the current scope
--> bls12_377/src/curves/g2.rs:125:9
|
125 | Fq::ZERO,
| ^^^^ associated item not found in `ark_ff::Fp<ark_ff::MontBackend<FqConfig, 6>, 6>`
|
= help: items from traits can only be used if the trait is in scope
help: the following trait is implemented but not in scope; perhaps add a `use` for it:
|
1 | use ark_ec::AdditiveGroup;
|
error[E0599]: no associated item named `ZERO` found for struct `ark_ff::Fp` in the current scope
--> bls12_377/src/curves/g2.rs:132:13
|
132 | Fq::ZERO,
| ^^^^ associated item not found in `ark_ff::Fp<ark_ff::MontBackend<FqConfig, 6>, 6>`
|
= help: items from traits can only be used if the trait is in scope
help: the following trait is implemented but not in scope; perhaps add a `use` for it:
|
1 | use ark_ec::AdditiveGroup;
|
error[E0599]: no associated item named `ZERO` found for struct `ark_ff::Fp` in the current scope
--> bls12_377/src/curves/g2.rs:138:13
|
138 | Fq::ZERO
| ^^^^ associated item not found in `ark_ff::Fp<ark_ff::MontBackend<FqConfig, 6>, 6>`
|
= help: items from traits can only be used if the trait is in scope
help: the following trait is implemented but not in scope; perhaps add a `use` for it:
|
1 | use ark_ec::AdditiveGroup;
|
error[E0599]: no associated item named `ZERO` found for struct `ark_ff::Fp` in the current scope
--> bls12_377/src/curves/g1.rs:39:29
|
39 | const COEFF_A: Fq = Fq::ZERO;
| ^^^^ associated item not found in `ark_ff::Fp<ark_ff::MontBackend<FqConfig, 6>, 6>`
|
= help: items from traits can only be used if the trait is in scope
help: the following trait is implemented but not in scope; perhaps add a `use` for it:
|
1 | use ark_ec::AdditiveGroup;
|
error[E0599]: no associated item named `ZERO` found for struct `ark_ff::Fp` in the current scope
--> bls12_377/src/curves/g2.rs:58:13
|
58 | Fq::ZERO,
| ^^^^ associated item not found in `ark_ff::Fp<ark_ff::MontBackend<FqConfig, 6>, 6>`
|
= help: items from traits can only be used if the trait is in scope
help: the following trait is implemented but not in scope; perhaps add a `use` for it:
|
1 | use ark_ec::AdditiveGroup;
|
error[E0599]: no method named `double` found for struct `ark_ec::short_weierstrass::Projective` in the current scope
--> bls12_377/src/curves/g2.rs:83:69
|
83 | let mut psi2_p2 = double_p_power_endomorphism(&p_projective.double());
| ^^^^^^ method not found in `ark_ec::short_weierstrass::Projective<curves::g2::Config>`
|
::: /Users/user/.cargo/git/checkouts/algebra-7e23afa68841b66e/c015ea3/ff/src/fields/mod.rs:93:8
|
93 | fn double(&self) -> Self {
| ------ the method is available for `ark_ec::short_weierstrass::Projective<curves::g2::Config>` here
|
= help: items from traits can only be used if the trait is in scope
help: the following trait is implemented but not in scope; perhaps add a `use` for it:
|
1 | use ark_ec::AdditiveGroup;
|
error[E0599]: no method named `mul_bigint` found for struct `ark_ec::short_weierstrass::Projective` in the current scope
--> bls12_377/src/curves/g2.rs:91:21
|
91 | tmp2 = tmp2.mul_bigint(x);
| ^^^^^^^^^^ method not found in `ark_ec::short_weierstrass::Projective<curves::g2::Config>`
|
::: /Users/user/.cargo/git/checkouts/algebra-7e23afa68841b66e/c015ea3/ec/src/lib.rs:60:8
|
60 | fn mul_bigint(&self, other: impl AsRef<[u64]>) -> Self;
| ---------- the method is available for `ark_ec::short_weierstrass::Projective<curves::g2::Config>` here
|
= help: items from traits can only be used if the trait is in scope
help: the following trait is implemented but not in scope; perhaps add a `use` for it:
|
1 | use ark_ec::PrimeGroup;
|
error: unused import: `ops::Neg`
--> bls12_381/src/curves/g1.rs:11:15
|
11 | use ark_std::{ops::Neg, One};
| ^^^^^^^^
Some errors have detailed explanations: E0432, E0599.
For more information about an error, try `rustc --explain E0432`.
error: could not compile `ark-bls12-381` due to 10 previous errors
error: could not compile `ark-bls12-377` due to 8 previous errors
error[E0599]: no associated item named `ZERO` found for struct `ark_ff::Fp` in the current scope
--> mnt4_753/src/fields/fq4.rs:15:42
|
15 | const NONRESIDUE: Fq2 = Fq2::new(Fq::ZERO, Fq::ONE);
| ^^^^ associated item not found in `ark_ff::Fp<ark_ff::MontBackend<FqConfig, 12>, 12>`
|
= help: items from traits can only be used if the trait is in scope
help: the following trait is implemented but not in scope; perhaps add a `use` for it:
|
1 | use ark_ec::AdditiveGroup;
|
error: could not compile `ark-mnt4-753` due to 5 previous errors
error[E0432]: unresolved import `ark_ec::Group`
--> /Users/user/.cargo/git/checkouts/r1cs-std-264917fec42faaac/f85e92d/src/groups/curves/short_weierstrass/non_zero_affine.rs:2:5
|
2 | use ark_ec::Group;
| ^^^^^^^^^^^^^ no `Group` in the root
error[E0432]: unresolved import `ark_ec::Group`
--> /Users/user/.cargo/git/checkouts/r1cs-std-264917fec42faaac/f85e92d/src/groups/curves/twisted_edwards/mod.rs:6:29
|
6 | AffineRepr, CurveGroup, Group,
| ^^^^^ no `Group` in the root
error[E0599]: no method named `double` found for associated type `<P as Bls12Config>::Fp` in the current scope
--> /Users/user/.cargo/git/checkouts/r1cs-std-264917fec42faaac/f85e92d/src/groups/curves/short_weierstrass/bls12/mod.rs:202:36
|
202 | let two_inv = P::Fp::one().double().inverse().unwrap();
| ^^^^^^ method not found in `<P as Bls12Config>::Fp`
|
::: /Users/user/.cargo/git/checkouts/algebra-7e23afa68841b66e/c015ea3/ff/src/fields/mod.rs:93:8
|
93 | fn double(&self) -> Self {
| ------ the method is available for `<P as Bls12Config>::Fp` here
|
= help: items from traits can only be used if the trait is in scope
help: the following trait is implemented but not in scope; perhaps add a `use` for it:
|
1 | use crate::ark_ff::AdditiveGroup;
|
error[E0599]: no method named `double` found for struct `ark_ec::short_weierstrass::Projective` in the current scope
--> /Users/user/.cargo/git/checkouts/r1cs-std-264917fec42faaac/f85e92d/src/groups/curves/short_weierstrass/non_zero_affine.rs:75:18
|
75 | .double()
| ^^^^^^ method not found in `ark_ec::short_weierstrass::Projective<P>`
|
::: /Users/user/.cargo/git/checkouts/algebra-7e23afa68841b66e/c015ea3/ff/src/fields/mod.rs:93:8
|
93 | fn double(&self) -> Self {
| ------ the method is available for `ark_ec::short_weierstrass::Projective<P>` here
|
= help: items from traits can only be used if the trait is in scope
help: the following trait is implemented but not in scope; perhaps add a `use` for it:
|
1 | use crate::ark_ff::AdditiveGroup;
|
error[E0599]: no method named `double` found for associated type `<P as CurveConfig>::BaseField` in the current scope
--> /Users/user/.cargo/git/checkouts/r1cs-std-264917fec42faaac/f85e92d/src/groups/curves/short_weierstrass/mod.rs:248:34
|
248 | let three_b = P::COEFF_B.double() + &P::COEFF_B;
| ^^^^^^ method not found in `<P as CurveConfig>::BaseField`
|
::: /Users/user/.cargo/git/checkouts/algebra-7e23afa68841b66e/c015ea3/ff/src/fields/mod.rs:93:8
|
93 | fn double(&self) -> Self {
| ------ the method is available for `<P as CurveConfig>::BaseField` here
|
= help: items from traits can only be used if the trait is in scope
help: the following trait is implemented but not in scope; perhaps add a `use` for it:
|
1 | use crate::ark_ff::AdditiveGroup;
|
error[E0599]: no method named `double` found for associated type `<P as CurveConfig>::BaseField` in the current scope
--> /Users/user/.cargo/git/checkouts/r1cs-std-264917fec42faaac/f85e92d/src/groups/curves/short_weierstrass/mod.rs:462:34
|
462 | let three_b = P::COEFF_B.double() + &P::COEFF_B;
| ^^^^^^ method not found in `<P as CurveConfig>::BaseField`
|
::: /Users/user/.cargo/git/checkouts/algebra-7e23afa68841b66e/c015ea3/ff/src/fields/mod.rs:93:8
|
93 | fn double(&self) -> Self {
| ------ the method is available for `<P as CurveConfig>::BaseField` here
|
= help: items from traits can only be used if the trait is in scope
help: the following trait is implemented but not in scope; perhaps add a `use` for it:
|
1 | use crate::ark_ff::AdditiveGroup;
|
error[E0599]: no method named `double` found for associated type `<P as CurveConfig>::BaseField` in the current scope
--> /Users/user/.cargo/git/checkouts/r1cs-std-264917fec42faaac/f85e92d/src/groups/curves/short_weierstrass/mod.rs:636:38
|
636 | let three_b = P::COEFF_B.double() + &P::COEFF_B;
| ^^^^^^ method not found in `<P as CurveConfig>::BaseField`
|
::: /Users/user/.cargo/git/checkouts/algebra-7e23afa68841b66e/c015ea3/ff/src/fields/mod.rs:93:8
|
93 | fn double(&self) -> Self {
| ------ the method is available for `<P as CurveConfig>::BaseField` here
|
= help: items from traits can only be used if the trait is in scope
help: the following trait is implemented but not in scope; perhaps add a `use` for it:
|
1 | use crate::ark_ff::AdditiveGroup;
|
error[E0599]: no method named `double` found for struct `ark_ec::twisted_edwards::Projective` in the current scope
--> /Users/user/.cargo/git/checkouts/r1cs-std-264917fec42faaac/f85e92d/src/groups/curves/twisted_edwards/mod.rs:482:42
|
482 | *self = Self::constant(value.double());
| ^^^^^^ method not found in `ark_ec::twisted_edwards::Projective<P>`
|
::: /Users/user/.cargo/git/checkouts/algebra-7e23afa68841b66e/c015ea3/ff/src/fields/mod.rs:93:8
|
93 | fn double(&self) -> Self {
| ------ the method is available for `ark_ec::twisted_edwards::Projective<P>` here
|
= help: items from traits can only be used if the trait is in scope
help: the following trait is implemented but not in scope; perhaps add a `use` for it:
|
1 | use crate::ark_ff::AdditiveGroup;
|
error[E0599]: no method named `double` found for associated type `<P as CurveConfig>::BaseField` in the current scope
--> /Users/user/.cargo/git/checkouts/r1cs-std-264917fec42faaac/f85e92d/src/groups/curves/twisted_edwards/mod.rs:496:38
|
496 | let t0 = xy.value()?.double();
| ^^^^^^ method not found in `<P as CurveConfig>::BaseField`
|
::: /Users/user/.cargo/git/checkouts/algebra-7e23afa68841b66e/c015ea3/ff/src/fields/mod.rs:93:8
|
93 | fn double(&self) -> Self {
| ------ the method is available for `<P as CurveConfig>::BaseField` here
|
= help: items from traits can only be used if the trait is in scope
help: the following trait is implemented but not in scope; perhaps add a `use` for it:
|
1 | use crate::ark_ff::AdditiveGroup;
|
error[E0599]: no method named `double` found for associated type `<P as CurveConfig>::BaseField` in the current scope
--> /Users/user/.cargo/git/checkouts/r1cs-std-264917fec42faaac/f85e92d/src/groups/curves/twisted_edwards/mod.rs:506:43
|
506 | let two = P::BaseField::one().double();
| ^^^^^^ method not found in `<P as CurveConfig>::BaseField`
|
::: /Users/user/.cargo/git/checkouts/algebra-7e23afa68841b66e/c015ea3/ff/src/fields/mod.rs:93:8
|
93 | fn double(&self) -> Self {
| ------ the method is available for `<P as CurveConfig>::BaseField` here
|
= help: items from traits can only be used if the trait is in scope
help: the following trait is implemented but not in scope; perhaps add a `use` for it:
|
1 | use crate::ark_ff::AdditiveGroup;
|
error: could not compile `ark-r1cs-std` due to 10 previous errors
We did a lot of benchmarking for our ark-substrate fork of ark-curves which replaces costly operations by host function calls. There we encountered very high benchmark times for affine multiplications on ed_on_bls12_377: https://github.com/achimcc/substrate-arkworks-examples/blob/main/benchmarks-comparison.md Are these results plausible?
0.4.0
Check the benchmarks in:
https://github.com/achimcc/substrate-arkworks-examples
https://github.com/achimcc/native-bench-arkworks
https://github.com/achimcc/wasm-bench-arkworks
latest master
I stumbled upon a problem while using zexe CanonDeserialization
for bls12_381::G1Affine
.
I have an existing code which utilizes zkcrypto/pairing
library.
That code reads a 96 bytes long uncompressed G1Affine
:
0x0db882cf5db3e8567f16b4db1772d4d1f5a3fe8d62f0df2eb8a5cfa50806702afde8fc25335eb5ec859c2818b2610b2e19ab445dac720bb1f2b0cd3336f7a1acc62bf1b3a321826264dc7e469281e23b218394d598689da04e136878ff9a7897
by calling pairing::bls12_381::G1Uncompressed(data).into_affine()
I expected algebra::CanonDeserialization::deserialize
to correctly read this data as well, but it does not work.
I also tried reading compressed G1Affine
, but it also does not work.
zexe
for zcash sapling verification in no-std
environments. debris/zexe-sapling. For now I added pairing
-like deserialization there, but it would be nice if it was supported out of the box in zexe.Right now MNT{4,6}-753 take a long time to complete execution, slowing down CI overall by a large amount. We should make a more intelligent CI that only runs tests for curves if either
(a) the dependencies have changed, or
(b) the curve code has changed.
In a test upstream in marlin
, there seem to be errors, probably related to Rust 1.48.
Any idea?
error[E0277]: the size for values of type `[u64]` cannot be known at compilation time
--> bls12_381/src/fields/fq6.rs:15:9
|
15 | / field_new!(Fq, BigInteger384([
16 | | 0x760900000002fffd,
17 | | 0xebf4000bc40c0002,
18 | | 0x5f48985753c758ba,
... |
21 | | 0x15f65ec3fa80e493,
22 | | ])),
| |___________^ doesn't have a size known at compile-time
|
= help: the trait `Sized` is not implemented for `[u64]`
= note: all local variables must have a statically known size
= help: unsized locals are gated as an unstable feature
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: the size for values of type `[u64]` cannot be known at compilation time
--> bn254/src/curves/g2.rs:52:30
|
52 | const COFACTOR_INV: Fr = field_new!(Fr, BigInteger256([
| ______________________________^
53 | | 0x7fff17d53ff2895e,
54 | | 0xd0617390cf7919e5,
55 | | 0xb9af426b22d0eb61,
56 | | 0x270485e31bd72a4d,
57 | | ]));
| |_______^ doesn't have a size known at compile-time
|
= help: the trait `Sized` is not implemented for `[u64]`
= note: all local variables must have a statically known size
= help: unsized locals are gated as an unstable feature
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: the size for values of type `[u64]` cannot be known at compilation time
--> bls12_381/src/fields/fq6.rs:23:9
|
23 | / field_new!(Fq, BigInteger384([
24 | | 0x760900000002fffd,
25 | | 0xebf4000bc40c0002,
26 | | 0x5f48985753c758ba,
... |
29 | | 0x15f65ec3fa80e493,
30 | | ])),
| |___________^ doesn't have a size known at compile-time
|
= help: the trait `Sized` is not implemented for `[u64]`
= note: all local variables must have a statically known size
= help: unsized locals are gated as an unstable feature
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.