Comments (8)
We made some progress but I should take a stab at this.
from bls.
updated serialization and randomization now dealing with preparation.
from bls.
add prepare_publickey
and prepare_signature
to EngineBLS trait replacing missing AffineCurve::prepare
method.
from bls.
8d44845 finishes the upgrade single.rs
. However there are some points I need to ask @burdges:
- https://github.com/w3f/bls/blob/skalman-zexe-unprepared/src/single.rs#L665 doesn't fail but https://github.com/w3f/bls/blob/skalman-zexe-unprepared/src/single.rs#L671 can fail what should we do?
- https://github.com/w3f/bls/blob/skalman-zexe-unprepared/src/engine.rs#L249 I'm curious how to call prepare_g1 instead of re-pasting its body here.
from bls.
Where is serialize_uncompressed
defined? I should never fail really.
prepare_g1::<Engine as PairingEngine>
maybe, but why? I'd do a default method in the trait, so
trait .. {
..
/// Prepare public key for Miller loop
fn prepare_public_key(g: impl Into<Self::PublicKeyGroupAffine>) -> Self::PublicKeyPrepared {
let g1: Self::PublicKeyGroupAffine = g.into();
Self::PublicKeyPrepared::from(g1)
}
/// Prepare signature for Miller loop
fn prepare_signature(g: impl Into<Self::SignatureGroupAffine>) -> Self::SignaturePrepared {
let g2: Self::SignatureGroupAffine = g.into();
Self::SignaturePrepared::from(g2)
}
}
from bls.
Where is
serialize_uncompressed
defined? I should never fail really.
https://github.com/scipr-lab/zexe/blob/master/algebra-core/src/serialize/mod.rs#L60
from bls.
I'd do a default method in the trait
Ah that's much more elegant. But just out of curiosity why this doesn't work:
When I implement the function like this:
fn prepare_public_key(g: impl Into<Self::PublicKeyGroupAffine>) -> Self::PublicKeyPrepared {
prepare_g1(g)
}
I get this:
error[E0284]: type annotations needed: cannot satisfy `<_ as PairingEngine>::G1Affine == <E as PairingEngine>::G1Affine`
--> src/engine.rs:256:9
|
256 | prepare_g1(g)
| ^^^^^^^^^^ cannot satisfy `<_ as PairingEngine>::G1Affine == <E as PairingEngine>::G1Affine`
And If I implement it like this:
fn prepare_public_key(g: impl Into<Self::PublicKeyGroupAffine>) -> Self::PublicKeyPrepared {
prepare_g1::<E>(g)
}
I get this:
error[E0599]: no function or associated item named `prepare_g1` found for type parameter `E` in the current scope
--> src/engine.rs:256:12
|
256 | E::prepare_g1(g)
| ^^^^^^^^^^ function or associated item not found in `E`
Do you know what is the correct way of doing that?
from bls.
Appears rustc has trouble unifying that bound, but really not sure why. If you've some minimized example or push it into a branch then we could ask someone who knows rustc open issues better.
from bls.
Related Issues (20)
- Improve serialization of Publickey and Signature HOT 2
- Improve serialization of Publickey and Signature HOT 1
- clean up the depenedancy so they are compatible with substrate HOT 2
- Implement Canonical De/Serialize for SecretKey HOT 1
- Alter the BEEFY structure to have only one aggergated BLS signature HOT 1
- Implement bls signature related functions for (substrate) host API
- Enable BEEFY Keystore to produce BLS signature HOT 2
- Reverse beefy messages to only support unaggregated BLS signatures in Beefy HOT 2
- Implement missing bls function for LocalKeystore HOT 1
- modify `client/beefy/src/worker.rs` to use either ECDSA or BLSnECDSA keystores
- How is `context` meant to be used when creating a new `Message`?
- Make ValidatorSet generic over public key type HOT 3
- Update BLS library to Pairing and Serialization changes HOT 3
- make thread_rng optional on std feature HOT 1
- Write test for BeefyECDSAandBLSKeystore HOT 1
- Implement Chaum Pederson Signature for Keypair HOT 2
- Make `keystore_vs_validator_set` test generic over the keystore HOT 4
- Clean up hash to curve branch and merge it with master HOT 1
- Expose Double Public Key scheme HOT 2
- Implement Serialization for `Double` Schemes HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bls.