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

Make trivialEncrypt private in TFHE.sol and remove it from docs #675

Open
jatZama opened this issue Dec 24, 2024 · 1 comment
Open

Make trivialEncrypt private in TFHE.sol and remove it from docs #675

jatZama opened this issue Dec 24, 2024 · 1 comment
Assignees
Labels
documentation Improvements or additions to documentation enhancement New feature or request

Comments

@jatZama
Copy link
Member

jatZama commented Dec 24, 2024

We would like to NOT expose the trivial encryption feature anymore to devs using TFHE.sol library.
We need to be very careful not missing cases of handling uninitialized encrypted variables, for eg today we are missing this in TFHE.select at least (and maybe other ops?).

@jatZama jatZama added the enhancement New feature or request label Dec 24, 2024
@jatZama jatZama self-assigned this Dec 24, 2024
@jatZama
Copy link
Member Author

jatZama commented Dec 24, 2024

there is a closely related question to this issue btw from all the contracts I reviewed from fhevm-contracts : we tried to limit as much as possible the use of trivial encrypt, but I noticed that sometimes when a user request a reencrypt or a dapp tries to read a handle from a view function to use it in computation, from a handle which is supposed to belong to him/it - for instance balances[msg.sender] but if it is still uninitialized - we should take extra-care when we will remove completely the trivialEncrypt from TFHE.sol. At least this would mean that both dApp contracts calling other contract as well as front-end devs handling reencrypt request, should put extra-logic for handling uninitialized variables. Something important to keep in mind.

@poppyseedDev poppyseedDev added the documentation Improvements or additions to documentation label Dec 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants