slowli / elastic-elgamal Goto Github PK
View Code? Open in Web Editor NEWElGamal encryption and related zero-knowledge proofs
License: Apache License 2.0
ElGamal encryption and related zero-knowledge proofs
License: Apache License 2.0
I am trying to serialize the polynomials generated by participant.public_info().into_owned()
to send them to different peers on a network.
error[E0277]: the trait bound `PublicInfo<'_, Ristretto>: Serialize` is not satisfied
--> src/lib.rs:21:10
|
21 | #[derive(Serialize, Deserialize, Debug)]
| ^^^^^^^^^ the trait `Serialize` is not implemented for `PublicInfo<'_, Ristretto>`
...
24 | RequestPoly(PublicInfo<'a, Ristretto>),
| ---------- required by a bound introduced by this call
|
= help: the following other types implement trait `Serialize`:
&'a T
&'a mut T
()
(T0, T1)
(T0, T1, T2)
(T0, T1, T2, T3)
(T0, T1, T2, T3, T4)
(T0, T1, T2, T3, T4, T5)
and 133 others
note: required by a bound in `serialize_newtype_variant`
--> /Users/tadad/.cargo/registry/src/index.crates.io-6f17d22bba15001f/serde-1.0.188/src/ser/mod.rs:936:12
|
936 | T: Serialize;
| ^^^^^^^^^ required by this bound in `Serializer::serialize_newtype_variant`
error[E0277]: the trait bound `PublicInfo<'a, Ristretto>: Deserialize<'_>` is not satisfied
--> src/lib.rs:24:17
|
24 | RequestPoly(PublicInfo<'a, Ristretto>),
| ^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Deserialize<'_>` is not implemented for `PublicInfo<'a, Ristretto>`
|
= help: the following other types implement trait `Deserialize<'de>`:
&'a Path
&'a [u8]
&'a str
()
(T0, T1)
(T0, T1, T2)
(T0, T1, T2, T3)
(T0, T1, T2, T3, T4)
and 136 others
note: required by a bound in `newtype_variant`
--> /Users/tadad/.cargo/registry/src/index.crates.io-6f17d22bba15001f/serde-1.0.188/src/de/mod.rs:2117:12
|
2117 | T: Deserialize<'de>,
| ^^^^^^^^^^^^^^^^ required by this bound in `VariantAccess::newtype_variant`
I believe this might have something to do with Ristretto
not implementing Serialize/Deserialize because PublicInfo
does. You can serialize Ristretto elements with myElement.serialize_element()
but that doesn't let you easily serialize a PublicInfo
- maybe not at all, I'm still trying to get it to work. Also possible I'm just doing something wrong...let me know, thanks!
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.