Hi, I encountered a type conversion issue among type BigInt:
- Using
Paillier::encrypt in rust-paillier, we need to first convert the BigInt variable to RawPlaintext. However, there is an error:
error[E0277]: the trait bound `RawPlaintext<'_>: From<&curv::BigInt>` is not satisfied
--> ...
|
63 | RawPlaintext::from(&x1)
| ^^^^^^^^^^^^^^^^^^ the trait `From<&curv::BigInt>` is not implemented for `RawPlaintext<'_>`
- Using
Paillier::decrypt in rust-paillier:
let gamma1 = Paillier::decrypt(
&dk,
RawCiphertext::from(C_gamma.clone())
).0
.clone()
.into_owned();
and gamma1 is a paillier::Bigint rather than a curv::BigInt.
I think it is the same origin of problem, would anyone can give me any suggestion?
Thank you!
Hi, I encountered a type conversion issue among type
BigInt:Paillier::encryptin rust-paillier, we need to first convert theBigIntvariable toRawPlaintext. However, there is an error:Paillier::decryptin rust-paillier:and gamma1 is a
paillier::Bigintrather than acurv::BigInt.I think it is the same origin of problem, would anyone can give me any suggestion?
Thank you!