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

feat(num-complex serialization): add serialization for bootstrappingkeys (LWEBSK) #14

Closed
wants to merge 1 commit into from

Conversation

AlexanderViand
Copy link

We were trying to save some time while experimenting by saving the key material to disk and just re-reading it rather than constantly re-generating it just to debug things but we ran into the issue that the BSKs weren't serializable.

When we added the serde traits that are on the other keys, we ran into the issue that complex64 wasn't serializable. However, num-complex does have serde support, it's just optional and fftw does not offer a feature to toggle serde support on. After some digging I came up with this somewhat ugly hack that loads num-complex with the serde feature before loading fftw.

Maybe there's a nicer way to do this and/or this has some issues that I don't see (apart from the obvious fact that this requires manually matching the version number between fftw's depenceny and this "override") since I'm not super experienced with rust.

However, if it is acceptable then here's a PR for it ;)

@aPere3
Copy link
Contributor

aPere3 commented Apr 9, 2021

Hey @AlexanderViand,

Thanks for the PR. It is indeed a pain point to generate those bootstrapping keys.

Can you modify the PR to merge into the develop branch instead ?

@aPere3 aPere3 changed the title Add serialization for bootstrappingkeys (LWEBSK) feat(num-complex serialization): add serialization for bootstrappingkeys (LWEBSK) Apr 9, 2021
@AlexanderViand AlexanderViand changed the base branch from master to develop April 9, 2021 12:46
@AlexanderViand
Copy link
Author

AlexanderViand commented Apr 9, 2021

Can you modify the PR to merge into the develop branch instead ?

@aPere3 Done :)

@aPere3
Copy link
Contributor

aPere3 commented Apr 9, 2021

Thanks 🙂

Before accepting that, I'd like to make sure that we can not achieve the same using the derive for remote approach. I don't have time to check that right away, but I'll try and come back to you.

Also, just for your information, the next release should have a multi-threaded bootstrapping key generation, as well as a new fftw wrapper, with no dependency on num-complex.

@BourgerieQuentin BourgerieQuentin deleted the branch zama-ai:develop April 28, 2021 09:39
@aPere3
Copy link
Contributor

aPere3 commented May 6, 2021

Hello @AlexanderViand ,

We added a proper serialization in #21. It should be in the next release.

@AlexanderViand
Copy link
Author

@aPere3 Thanks, great to hear that!

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.

None yet

3 participants