-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reinstate plaintext fheRand with type support
Use ChaCha20 for PRNG. Have a separate PRNG per contract by seeding it with a global plaintext seed as: `contractSeed = Keccack256(globalSeed || contractAddress)`. Also, use a counter as a nonce that is persisted in the contract's protected storage, ensuring every contract has its own nonce. Can only be called in transactions. Calling it in view functions (i.e. EthCall) will fail. Make sure we don't garbage collect the nonce slot (slot 0) in protected storage by defining it as a reserved slot. That is a temporary solution that we will revise soon by only running garbage collection on actual ciphertext handles.
- Loading branch information
1 parent
cc574ae
commit 84487ce
Showing
4 changed files
with
213 additions
and
85 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.