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

Import the non-FFI Rust sources of zkgroup #392

Merged
merged 5 commits into from
Oct 28, 2021
Merged

Conversation

jrose-signal
Copy link
Contributor

This is the start of an effort to merge zkgroup into libsignal-client, including its Java, Swift, and TypeScript wrappers. For now we'll just concentrate on getting the Rust crate to build and pass its tests.

The first and second commits are mechanical changes that do not need review. Actually integrating zkgroup into the workspace was pretty straightforward as well:

  • Bump the crate version to 0.9.0, mainly so it doesn't get confused with the original repo.
  • Use the poksho in this repo and our custom 3.0.0-lizard2 branch of curve25519-dalek (instead of a 2.0.0-based one).
  • Bump the sha2 dependency to match curve25519-dalek 3.0.
  • Remove the reference to the crate's ffi module.

This is the start of an effort to merge zkgroup into libsignal-client,
including its Java, Swift, and TypeScript wrappers. For now we'll just
concentrate on getting the Rust crate to build and pass its tests.
- Bump the version to 0.9.0, mainly so it doesn't get confused with
  the original repo.
- Use the poksho in this repo and our custom 3.0.0-lizard2 branch of
  curve25519-dalek (instead of a 2.0.0-based one).
- Bump the sha2 dependency to match curve25519-dalek 3.0.
- Remove the reference to the crate's ffi module.

With this, the tests pass and the benchmarks run.
zkgroup uses capitalization to distinguish between scalar values and
curve points, which is conventional in cryptography. However, *most*
files aren't actually doing curve-level operations, and so they don't
need to except themselves from having their names checked.

Also, add deny(unsafe_code) to zkgroup. zkgroup shouldn't need any
unsafe code; like the other crates, let's not bend that policy without
a good reason.
@jrose-signal jrose-signal merged commit ebf8045 into main Oct 28, 2021
@jrose-signal jrose-signal deleted the jrose/zkgroup branch October 28, 2021 19:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants