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

Add support for TFHE.decrypt() #89

Merged
merged 4 commits into from
Aug 1, 2023
Merged

Add support for TFHE.decrypt() #89

merged 4 commits into from
Aug 1, 2023

Conversation

dartdart26
Copy link
Collaborator

@dartdart26 dartdart26 commented Jul 21, 2023

The decrypt() function decrypts the given euint value. There are a few
considerations when doing decryption:

  • if a transaction is reverted due to a failed TFHE.optimisticReq(),
    then any decryptions would leak information as they would already
    have been decrypted when the txn is reverted at the end (due to the
    nature of TFHE.optimistiReq())
  • gas estimation might be more imprecise, because control flow can now
    depend on decrypted values (that gas estimation doesn't know of as it
    always uses 0)

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.

LGTM!

Copy link
Contributor

@tremblaythibaultl tremblaythibaultl left a comment

Choose a reason for hiding this comment

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

lgtm 👍

The decrypt() function decrypts the given euint value. There are a few
considerations when doing decryption:
 * if a transaction is reverted due to a failed TFHE.optimisticReq(),
   then any decryptions would leak information as they would already
   have been decrypted when the txn is reverted at the end (due to the
   nature of TFHE.optimistiReq())
 * gas estimation might be more imprecise, because control flow can now
   depend on decrypted values (that gas estimation doesn't know of as it
   always uses 0)
@dartdart26 dartdart26 merged commit 8bf0e4c into main Aug 1, 2023
1 check passed
@dartdart26 dartdart26 deleted the petar/decrypt branch August 1, 2023 08:13
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.

3 participants