Skip to content
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

Encodable curve #1

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Encodable curve #1

wants to merge 4 commits into from

Conversation

mdgrs
Copy link
Collaborator

@mdgrs mdgrs commented Nov 13, 2024

We are changing the implementation of PrimeField for Dalek (from using [u8,32] to using the new elliptic_curve::array::array<u8,32> structs. This is something that they will need to do upstream eventually, but there is no clear timeline. We need to make this change to have the version of Primefield used by Dalek be the same as the version used by other curves (k256 for example).

We are bumping versions of common crates to the versions used in async-mpc.

We are adding many implementations that are related to the EncodableCurve trait in async-mpc

The async-mpc PR is here: https://github.com/elusiv-privacy/async-mpc/pull/168

Copy link

@mvuille mvuille left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

curve25519-dalek/src/encodable_curve.rs Show resolved Hide resolved
Comment on lines +1267 to +1282
digest::typenum::UInt<
digest::typenum::UInt<
digest::typenum::UInt<
digest::typenum::UInt<
digest::typenum::UInt<
digest::typenum::UInt<digest::typenum::UTerm, digest::consts::B1>,
digest::consts::B0,
>,
digest::consts::B0,
>,
digest::consts::B0,
>,
digest::consts::B0,
>,
digest::consts::B0,
>,
Copy link

@n-lebel n-lebel Nov 14, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can use typenum::consts::U32 instead of writing everything with bits like here. For large values that aren't in typenum::consts, you can use the typenum-consts crate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants