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

Flexible plaintext mod #4

Merged
merged 9 commits into from
May 18, 2021
Merged

Flexible plaintext mod #4

merged 9 commits into from
May 18, 2021

Conversation

haochenuw
Copy link
Contributor

Making plaintext modulus customizable.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label May 16, 2021
src/lib.rs Outdated Show resolved Hide resolved
src/integer_arith/scalar.rs Outdated Show resolved Hide resolved
src/lib.rs Outdated Show resolved Hide resolved
src/traits.rs Show resolved Hide resolved
src/lib.rs Outdated Show resolved Hide resolved
@haochenuw haochenuw merged commit c8ee75a into main May 18, 2021
@Groxx
Copy link

Groxx commented Jun 25, 2021

This seems to have broken cargo bench, though I'm not familiar enough with Rust to immediately grasp why:

~/rust/Cupcake main
❯ git rev-parse HEAD
c8ee75a9127fa907dc6d0d8186c28b3a0d6a4d00

~/rust/Cupcake main
❯ cargo bench
   Compiling Cupcake v0.1.1 (/home/user/rust/Cupcake)
error[E0282]: type annotations needed
   --> benches/example.rs:185:20
    |
185 |         let _ = fv.decrypt(&ct, &sk);
    |             -      ^^^^^^^ cannot infer type for type parameter `PT` declared on the trait `SKEncryption`
    |             |
    |             consider giving this pattern a type

error: aborting due to previous error

For more information about this error, try `rustc --explain E0282`.
error: could not compile `Cupcake`

To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: build failed

While if I try the previous commit:

~/rust/Cupcake main
❯ git checkout HEAD^
HEAD is now at 381b99e Adding serialization capability.  (#3)

~/rust/Cupcake @381b99ee
❯ git rev-parse HEAD
381b99ee09fdb7192664224d85d32ac494bf521a

~/rust/Cupcake @381b99ee
❯ cargo bench
   Compiling Cupcake v0.1.1 (/home/user/rust/Cupcake)
    Finished bench [optimized] target(s) in 1.36s
     Running unittests (target/release/deps/cupcake-ea89701d0927524e)

running 28 tests
test fv_scalar_tests::test_add_plain_scalar ... ignored
test fv_scalar_tests::test_add_scalar ... ignored
... (all tests pass)

And this is all on the latest stable rust:

~/rust/Cupcake @381b99ee
❯ rustup show
Default host: x86_64-unknown-linux-gnu
rustup home:  /home/user/.rustup

installed toolchains
--------------------

stable-x86_64-unknown-linux-gnu (default)
nightly-2020-06-22-x86_64-unknown-linux-gnu

active toolchain
----------------

stable-x86_64-unknown-linux-gnu (default)
rustc 1.53.0 (53cb7b09b 2021-06-17)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants