-
Notifications
You must be signed in to change notification settings - Fork 291
chore: use dedicated types for compressed modswitched conformance #3058
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
base: main
Are you sure you want to change the base?
Conversation
1343ae9 to
ad33cd3
Compare
mayeul-zama
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mayeul-zama reviewed 20 of 20 files at r1, all commit messages.
Reviewable status: all files reviewed, 5 unresolved discussions (waiting on @IceTDrinker and @tmontaigu)
tfhe/src/core_crypto/entities/compressed_modulus_switched_multi_bit_lwe_ciphertext.rs line 541 at r1 (raw file):
.as_ref() .is_none_or(|packed_diffs| packed_diffs.is_conformant(&lwe_dim)) && *lwe_dimension == ct_params.lwe_dim
Could also destructure ct_params
tfhe/src/core_crypto/entities/compressed_modulus_switched_lwe_ciphertext.rs line 150 at r1 (raw file):
{ pub ct_params: LweCiphertextConformanceParams<Scalar>, pub ms_decompression_method: MsDecompressionType,
"Type" vs "method", would be clearer to use only one name
I have no personal preference
tfhe/src/core_crypto/entities/compressed_modulus_switched_lwe_ciphertext.rs line 168 at r1 (raw file):
let CompressedModulusSwitchedLweCiphertextConformanceParams { ct_params,
Could also destructure ct_params
tfhe/src/high_level_api/integers/unsigned/compressed.rs line 226 at r1 (raw file):
); impl CompressedRadixCiphertextConformanceParams {}
To remove
tfhe/src/shortint/ciphertext/compressed_modulus_switched_ciphertext.rs line 86 at r1 (raw file):
} = self; compressed_modulus_switched_lwe_ciphertext.is_conformant(¶m.ct_params)
Not really releveant to this PR
param could be destructured
I don't know how time consuming it would be to make sure we follow this pattern in all conformance code, maybe not so much
ad33cd3 to
6908188
Compare
nsarlin-zama
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 11 of 23 files reviewed, 5 unresolved discussions (waiting on @IceTDrinker, @mayeul-zama, and @tmontaigu)
tfhe/src/core_crypto/entities/compressed_modulus_switched_lwe_ciphertext.rs line 150 at r1 (raw file):
Previously, mayeul-zama wrote…
"Type" vs "method", would be clearer to use only one name
I have no personal preference
done
tfhe/src/core_crypto/entities/compressed_modulus_switched_lwe_ciphertext.rs line 168 at r1 (raw file):
Previously, mayeul-zama wrote…
Could also destructure
ct_params
done
tfhe/src/core_crypto/entities/compressed_modulus_switched_multi_bit_lwe_ciphertext.rs line 541 at r1 (raw file):
Previously, mayeul-zama wrote…
Could also destructure
ct_params
done
tfhe/src/high_level_api/integers/unsigned/compressed.rs line 226 at r1 (raw file):
Previously, mayeul-zama wrote…
To remove
done
tfhe/src/shortint/ciphertext/compressed_modulus_switched_ciphertext.rs line 86 at r1 (raw file):
Previously, mayeul-zama wrote…
Not really releveant to this PR
paramcould be destructuredI don't know how time consuming it would be to make sure we follow this pattern in all conformance code, maybe not so much
done, required a small refacto to remove an unused field
mayeul-zama
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mayeul-zama reviewed 4 of 4 files at r2, 8 of 8 files at r3, all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on @IceTDrinker and @tmontaigu)
6908188 to
66a05cb
Compare
66a05cb to
9e626f6
Compare
mayeul-zama
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mayeul-zama reviewed 2 of 2 files at r4, all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on @IceTDrinker and @tmontaigu)
PR content/description
modswitched expansion type info was stored into the CiphertextConformanceParams, which meant that we had to provide this information even for ciphertexts that were not compressed. This PR adds dedicated types for modswitched ciphertexts conformance params.
This change is