-
Notifications
You must be signed in to change notification settings - Fork 313
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
Update to curv@0.9 #144
Update to curv@0.9 #144
Conversation
Hi @survived, I am trying to get everything correct with version numbers but am not sure what is wrong as I seem to be including two versions of When I run
And
I am pulling Any idea what I am doing wrong here? |
Phew, I figured it out, I needed to remove the lock file! Now on to fixing the API errors 👍 |
The case was changed.
Hi @survived, hit a snag with this refactor. It seems that These are the relevant compiler error(s):
And this is the source code where the problem lies: #[derive(Derivative, Serialize, Deserialize)]
#[derivative(Clone(bound = "P: Clone, P::Scalar: Clone"))]
#[derivative(Debug(bound = "P: Debug, P::Scalar: Debug"))]
pub struct Keys<P = Point::<Secp256k1>>
where
P: ECPoint,
{
pub u_i: P::Scalar,
pub y_i: P,
pub dk: DecryptionKey,
pub ek: EncryptionKey,
pub party_index: usize,
pub N_tilde: BigInt,
pub h1: BigInt,
pub h2: BigInt,
pub xhi: BigInt,
pub xhi_inv: BigInt,
} I don't understand yet what the Looking in I am assuming the correct approach to this problem would be to implement |
Hi @tmpfs, I see the confusion — #[derive(Serialize, Deserialize, Clone, Debug)]
#[serde(bounds = "")]
pub struct Keys<E: Curve>
where
P: ECPoint,
{
pub u_i: Scalar<E>,
pub y_i: Point<E>,
pub dk: DecryptionKey,
pub ek: EncryptionKey,
pub party_index: usize,
pub N_tilde: BigInt,
pub h1: BigInt,
pub h2: BigInt,
pub xhi: BigInt,
pub xhi_inv: BigInt,
} I'd highlight two changes: After you update the Documentation has a simple example of writing the code generic over choice of curve, check out Diffie-Hellman example |
@survived, I finished fixing all the clippy warnings. I wasn't sure the preferred approach for using the unit type as |
@DmytroTym, sound like it's me who introduced this error. I'll fix the examples, thanks! |
@DmytroTym, fixed! |
Hey @tmpfs and @survived. I fixed one line that prevented benchmarks from running, but otherwise imo this PR is pretty safe to merge. After all, it does not change any logic and I think that compiler and tests should have done a good job of preventing any accidental changes that would break something. Plus two pair of eyes looked at the code. |
Thanks @DmytroTym - would be great to land this 👍 Maybe just go ahead and close #148 if we are unlikely to add zeroizing in |
fix benches
No description provided.