Input & Encryption
To create an encrypted value, usenew_euint128 or new_ebool with client-encrypted ciphertext.
Creating Encrypted Values (Program Side)
Input Functions
The last parameter in
new_euint128/new_ebool identifies whether the input is ciphertext (0) or plaintext (1). Always pass 0 when working with client-encrypted data.Trivial Encryption
Useas_euint128 and as_ebool to convert plaintext values to encrypted handles directly in your program. This is useful for constants or program-generated values.
Client-Side Encryption
Values must be encrypted client-side before sending to your program. Use the JavaScript SDK to encrypt values:See the JavaScript SDK Encryption documentation for supported types and error handling.