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: add support for FHE decryption (for testing) #66

Closed
wants to merge 1 commit into from

Conversation

dartdart26
Copy link
Contributor

No description provided.

@immortal-tofu
Copy link
Collaborator

Why did you rename encrypt to tfheEncrypt?

Copy link
Collaborator

@immortal-tofu immortal-tofu left a comment

Choose a reason for hiding this comment

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

Instead of exposing this decrypt function in the instance, I'd prefer you add it in src/tfhe.ts. Functions in tfhe.ts are already usable in node (for example, we're using createTfheKeypair for tests).

@dartdart26
Copy link
Contributor Author

Why did you rename encrypt to tfheEncrypt?

Just to make it symmetrical as we have decrypt for the classical one and tfheDecrypt for FHE.

@dartdart26
Copy link
Contributor Author

Instead of exposing this decrypt function in the instance, I'd prefer you add it in src/tfhe.ts. Functions in tfhe.ts are already usable in node (for example, we're using createTfheKeypair for tests).

Cool. Should I store the clientKey in the instance and users passing it to these functions in tfhe.ts?

@dartdart26
Copy link
Contributor Author

Will open a new PR with a simpler implementation.

@dartdart26 dartdart26 closed this Jun 11, 2024
Copy link

Coverage report

St.
Category Percentage Covered / Total
🟢 Statements
91.18% (+0.15% 🔼)
248/272
🟢 Branches 86.05% 74/86
🟢 Functions
92.16% (-0.87% 🔻)
47/51
🟢 Lines
91.48% (-0.23% 🔻)
204/223
Show new covered files 🐣
St.
File Statements Branches Functions Lines
🟢 sdk/tfheEncrypt.ts 100% 100% 100% 100%
🟢 sdk/tfheDecrypt.ts 100% 100% 100% 100%
Show files with reduced coverage 🔻
St.
File Statements Branches Functions Lines
🟢 sdk/index.ts
92.5% (-2.28% 🔻)
92.31%
90.91% (-4.33% 🔻)
92.16% (-2.74% 🔻)

Test suite run success

49 tests passing in 6 suites.

Report generated by 🧪jest coverage report action from 1b5ee7e

@immortal-tofu immortal-tofu deleted the petar/fhe-decrypt branch December 5, 2024 20:45
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