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

Tofn compatibility fixes #4

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

Tofn compatibility fixes #4

wants to merge 6 commits into from

Conversation

fjarri
Copy link

@fjarri fjarri commented Nov 8, 2022

This is a continuation of LF-Decentralized-Trust-labs/agora-unknown_order#7 . This PR exposes some internals that are required by the GG20 implementation https://github.com/entropyxyz/tofn (namely, entropyxyz/tofn#27). Please feel free to propose a different API, I understand that you may have a different view on how these things can be exposed in a safe manner.

  • Fix the compilation with wasm feature enabled (using serde_wasm_bindgen)
  • Derive PartialEq for EncryptionKey and DecryptionKey
  • Store n, p, and q in DecryptionKey to assist with ZKP creation
  • Add DecryptionKey::from_rng_with_safe_primes()
  • Add DecryptionKey::decrypt_unchecked(), DecryptionKey::decrypt_with_randomness(), EncryptionKey::encrypt_unchecked(), EncryptionKey::add_unchecked() and EncryptionKey::mul_unchecked()
  • Make the crate no_std.

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.

1 participant