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

Mz/move strings #1714

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

Mz/move strings #1714

wants to merge 13 commits into from

Conversation

mayeul-zama
Copy link
Contributor

No description provided.

@cla-bot cla-bot bot added the cla-signed label Oct 23, 2024
@mayeul-zama mayeul-zama force-pushed the mz/move_strings branch 3 times, most recently from ecd0212 to 3cea569 Compare October 24, 2024 08:05
@tmontaigu
Copy link
Contributor

are we sure that we want to move strings into the hlapi module ?

Makefile Outdated
Comment on lines 791 to 795
# .PHONY: test_fhe_strings # Run tests for fhe_strings example
# test_fhe_strings: install_rs_build_toolchain
# RUSTFLAGS="$(RUSTFLAGS)" cargo $(CARGO_RS_BUILD_TOOLCHAIN) test --profile $(CARGO_PROFILE) \
# --example fhe_strings \
# --features=$(TARGET_ARCH_FEATURE),integer
Copy link
Contributor

Choose a reason for hiding this comment

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

needs to be removed or add a target to run string tests and make sure it runs in the CI

Base automatically changed from mz/cleanup_strings to main October 25, 2024 14:16
@tmontaigu
Copy link
Contributor

Hum, thing is that I would provably move the, is the create_trivial_ascii from the ClientKey to the ServerKey as its what exists for integers, imo makes a bit more sense as the user could need the ability to create trivial data, and might prevent user from mistaking trivial as a real encryption

@mayeul-zama
Copy link
Contributor Author

Hum, thing is that I would provably move the, is the create_trivial_ascii from the ClientKey to the ServerKey as its what exists for integers, imo makes a bit more sense as the user could need the ability to create trivial data, and might prevent user from mistaking trivial as a real encryption

I agree it makes more sense to have it on the ServerKey.
But in this case, when switching from encryption to trivial encryption in tests, we must pass a ServerKey instead of a ClientKey which may need changes inmany places.
Maybe we could have this method on the ServerKey, and on the ClientKey behind #[cfg(test)] (applies to all APIs levels)

What do you think?

@tmontaigu
Copy link
Contributor

Hum, thing is that I would provably move the, is the create_trivial_ascii from the ClientKey to the ServerKey as its what exists for integers, imo makes a bit more sense as the user could need the ability to create trivial data, and might prevent user from mistaking trivial as a real encryption

I agree it makes more sense to have it on the ServerKey.

But in this case, when switching from encryption to trivial encryption in tests, we must pass a ServerKey instead of a ClientKey which may need changes inmany places.

Maybe we could have this method on the ServerKey, and on the ClientKey behind #[cfg(test)] (applies to all APIs levels)

What do you think?

That's ok i think

Comment on lines +276 to +281
.unwrap()
.encryption_key_choice()
{
EncryptionKeyChoice::Big => self.large_lwe_secret_key().lwe_dimension().to_lwe_size(),
EncryptionKeyChoice::Small => self.small_lwe_secret_key().lwe_dimension().to_lwe_size(),
};
Copy link
Contributor

Choose a reason for hiding this comment

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

parameters should already have a encryption_lwe_dimension function

Comment on lines +293 to +296
let pbs_order = match params.encryption_key_choice() {
EncryptionKeyChoice::Big => PBSOrder::KeyswitchBootstrap,
EncryptionKeyChoice::Small => PBSOrder::BootstrapKeyswitch,
};
Copy link
Contributor

Choose a reason for hiding this comment

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

PBSOrder::from(params.encryption_key_choice)

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

Successfully merging this pull request may close these issues.

2 participants