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

Expose symmetric encryptions #343

Merged
merged 15 commits into from
Feb 11, 2024
Merged

Conversation

samtay
Copy link
Contributor

@samtay samtay commented Feb 10, 2024

On the outside, all this does is expose extra encrypt_symmetric_* methods wherever there were encrypt_* methods, on both the Runtime and the LogProofBuilder. Internally I've changed a few things

  • Gotten rid of the runtime::BfvEncryptionComponents. This lived at the runtime level and contained the higher level plaintext and ciphertext types that are supposed to be agnostic to seal, however it also contained types specific to seal. And it kind of forced a wrapping and unwrapping of seal data, when logproof itself is already seal specific. So instead, just define and deal with types AsymmetricComponents and SymmetricComponents from the seal_fhe layer. The builder interacts with these as the runtime iterates over the inner plaintexts.
  • Added a marker to the seal_fhe::Encryptor to track whether or not it supports sym/asym encryptions.

See Sunscreen-tech/SEAL#8 for seal changes.

Copy link
Contributor

@ryanorendorff ryanorendorff left a comment

Choose a reason for hiding this comment

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

Looks good! The cleanup of the components and splitting into the AsymmetricComponents and SymmetricComponents is a nice abstraction.

logproof/src/bfv_statement.rs Show resolved Hide resolved
logproof/src/bfv_statement.rs Show resolved Hide resolved
logproof/src/bfv_statement.rs Show resolved Hide resolved
seal_fhe/src/encryptor_decryptor.rs Show resolved Hide resolved
sunscreen_runtime/src/builder.rs Show resolved Hide resolved
@samtay samtay enabled auto-merge (squash) February 11, 2024 14:58
@samtay samtay merged commit b0df5e7 into main Feb 11, 2024
4 checks passed
@samtay samtay deleted the samtay/expose-symmetric-encryptions branch February 11, 2024 15:16
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.

2 participants