Overview
In FHE-enabled smart contracts, you often need to perform operations between encrypted values and regular plaintext values. Trivial encryption is the operation of converting a plaintext value into an encrypted format that can interact with other encrypted data. This conversion is done using theFHE.asEuint family of functions, which take standard Solidity types and transform them into their encrypted counterparts.
Privacy Considerations
Trivially encrypted values are not confidential - they are merely a tool to enable interaction between encrypted and non-encrypted types. The original plaintext value remains visible to anyone observing the blockchain, just in a different format. This is a crucial concept to understand when developing confidential contracts. Any value that is trivially encrypted (e.g.encrypted_number) should be treated as public information, even though it uses the same data type as truly encrypted values.
When two trivially-encrypted numbers are combined in an FHE operation, the result is still not confidential, because an observer can keep track of the calculations.