FHE Library Documentation
Encrypted Data Types
The library supports the following encrypted data types:
Type | Description |
---|---|
ebool | Encrypted boolean value |
euint8 | Encrypted 8-bit unsigned integer |
euint16 | Encrypted 16-bit unsigned integer |
euint32 | Encrypted 32-bit unsigned integer |
euint64 | Encrypted 64-bit unsigned integer |
euint128 | Encrypted 128-bit unsigned integer |
euint256 | Encrypted 256-bit unsigned integer |
eaddress | Encrypted Ethereum address |
Core Functions
Type Conversion
asEbool (from uint/bool)
asEbool(bool value) → ebool
asEbool(bool value, int32 securityZone) → ebool
Converts a plaintext boolean value to an encrypted boolean.
asEuint8 (from uint)
asEuint8(uint256 value) → euint8
asEuint8(uint256 value, int32 securityZone) → euint8
Converts a plaintext value to an encrypted 8-bit unsigned integer.
asEuint16 (from uint)
asEuint16(uint256 value) → euint16
asEuint16(uint256 value, int32 securityZone) → euint16
Converts a plaintext value to an encrypted 16-bit unsigned integer.
asEuint32 (from uint)
asEuint32(uint256 value) → euint32
asEuint32(uint256 value, int32 securityZone) → euint32
Converts a plaintext value to an encrypted 32-bit unsigned integer.
asEuint64 (from uint)
asEuint64(uint256 value) → euint64
asEuint64(uint256 value, int32 securityZone) → euint64
Converts a plaintext value to an encrypted 64-bit unsigned integer.
asEuint128 (from uint)
asEuint128(uint256 value) → euint128
asEuint128(uint256 value, int32 securityZone) → euint128
Converts a plaintext value to an encrypted 128-bit unsigned integer.
asEuint256 (from uint)
asEuint256(uint256 value) → euint256
asEuint256(uint256 value, int32 securityZone) → euint256
Converts a plaintext value to an encrypted 256-bit unsigned integer.
asEaddress (from address)
asEaddress(address value) → eaddress
asEaddress(address value, int32 securityZone) → eaddress
Converts a plaintext address value to an encrypted address.
asEbool (from InEbool)
asEbool(InEbool memory value) → ebool
Converts an encrypted input structure to an encrypted boolean.
asEuint8 (from InEuint8)
asEuint8(InEuint8 memory value) → euint8
Converts an encrypted input structure to an encrypted 8-bit unsigned integer.
asEuint16 (from InEuint16)
asEuint16(InEuint16 memory value) → euint16
Converts an encrypted input structure to an encrypted 16-bit unsigned integer.
asEuint32 (from InEuint32)
asEuint32(InEuint32 memory value) → euint32
Converts an encrypted input structure to an encrypted 32-bit unsigned integer.
asEuint64 (from InEuint64)
asEuint64(InEuint64 memory value) → euint64
Converts an encrypted input structure to an encrypted 64-bit unsigned integer.
asEuint128 (from InEuint128)
asEuint128(InEuint128 memory value) → euint128
Converts an encrypted input structure to an encrypted 128-bit unsigned integer.
asEuint256 (from InEuint256)
asEuint256(InEuint256 memory value) → euint256
Converts an encrypted input structure to an encrypted 256-bit unsigned integer.
asEaddress (from InEaddress)
asEaddress(InEaddress memory value) → eaddress
Converts an encrypted input structure to an encrypted address.
Type Conversion Between Encrypted Types
asEbool (from euint)
asEbool(euint8 value) → ebool
asEbool(euint16 value) → ebool
asEbool(euint32 value) → ebool
asEbool(euint64 value) → ebool
asEbool(euint128 value) → ebool
asEbool(euint256 value) → ebool
asEbool(eaddress value) → ebool
Converts an encrypted integer to an encrypted boolean.
asEuint8 (from other encrypted types)
asEuint8(ebool value) → euint8
asEuint8(euint16 value) → euint8
asEuint8(euint32 value) → euint8
asEuint8(euint64 value) → euint8
asEuint8(euint128 value) → euint8
asEuint8(euint256 value) → euint8
asEuint8(eaddress value) → euint8
Converts various encrypted types to an encrypted 8-bit unsigned integer.
asEuint16 (from other encrypted types)
asEuint16(ebool value) → euint16
asEuint16(euint8 value) → euint16
asEuint16(euint32 value) → euint16
asEuint16(euint64 value) → euint16
asEuint16(euint128 value) → euint16
asEuint16(euint256 value) → euint16
asEuint16(eaddress value) → euint16
Converts various encrypted types to an encrypted 16-bit unsigned integer.
asEuint32 (from other encrypted types)
asEuint32(ebool value) → euint32
asEuint32(euint8 value) → euint32
asEuint32(euint16 value) → euint32
asEuint32(euint64 value) → euint32
asEuint32(euint128 value) → euint32
asEuint32(euint256 value) → euint32
asEuint32(eaddress value) → euint32
Converts various encrypted types to an encrypted 32-bit unsigned integer.
asEuint64 (from other encrypted types)
asEuint64(ebool value) → euint64
asEuint64(euint8 value) → euint64
asEuint64(euint16 value) → euint64
asEuint64(euint32 value) → euint64
asEuint64(euint128 value) → euint64
asEuint64(euint256 value) → euint64
asEuint64(eaddress value) → euint64
Converts various encrypted types to an encrypted 64-bit unsigned integer.
asEuint128 (from other encrypted types)
asEuint128(ebool value) → euint128
asEuint128(euint8 value) → euint128
asEuint128(euint16 value) → euint128
asEuint128(euint32 value) → euint128
asEuint128(euint64 value) → euint128
asEuint128(euint256 value) → euint128
asEuint128(eaddress value) → euint128
Converts various encrypted types to an encrypted 128-bit unsigned integer.
asEuint256 (from other encrypted types)
asEuint256(ebool value) → euint256
asEuint256(euint8 value) → euint256
asEuint256(euint16 value) → euint256
asEuint256(euint32 value) → euint256
asEuint256(euint64 value) → euint256
asEuint256(euint128 value) → euint256
asEuint256(eaddress value) → euint256
Converts various encrypted types to an encrypted 256-bit unsigned integer.
asEaddress (from euint256)
asEaddress(euint256 value) → eaddress
Converts an encrypted 256-bit unsigned integer to an encrypted address.
Arithmetic Operations
add (euint8)
add(euint8 lhs, euint8 rhs) → euint8
Performs addition of two encrypted 8-bit unsigned integers.
add (euint16)
add(euint16 lhs, euint16 rhs) → euint16
Performs addition of two encrypted 16-bit unsigned integers.
add (euint32)
add(euint32 lhs, euint32 rhs) → euint32
Performs addition of two encrypted 32-bit unsigned integers.
add (euint64)
add(euint64 lhs, euint64 rhs) → euint64
Performs addition of two encrypted 64-bit unsigned integers.
add (euint128)
add(euint128 lhs, euint128 rhs) → euint128
Performs addition of two encrypted 128-bit unsigned integers.
add (euint256)
add(euint256 lhs, euint256 rhs) → euint256
Performs addition of two encrypted 256-bit unsigned integers.
sub (euint8)
sub(euint8 lhs, euint8 rhs) → euint8
Performs subtraction of two encrypted 8-bit unsigned integers.
sub (euint16)
sub(euint16 lhs, euint16 rhs) → euint16
Performs subtraction of two encrypted 16-bit unsigned integers.
sub (euint32)
sub(euint32 lhs, euint32 rhs) → euint32
Performs subtraction of two encrypted 32-bit unsigned integers.
sub (euint64)
sub(euint64 lhs, euint64 rhs) → euint64
Performs subtraction of two encrypted 64-bit unsigned integers.
sub (euint128)
sub(euint128 lhs, euint128 rhs) → euint128
Performs subtraction of two encrypted 128-bit unsigned integers.
sub (euint256)
sub(euint256 lhs, euint256 rhs) → euint256
Performs subtraction of two encrypted 256-bit unsigned integers.
mul (euint8)
mul(euint8 lhs, euint8 rhs) → euint8
Performs multiplication of two encrypted 8-bit unsigned integers.
mul (euint16)
mul(euint16 lhs, euint16 rhs) → euint16
Performs multiplication of two encrypted 16-bit unsigned integers.
mul (euint32)
mul(euint32 lhs, euint32 rhs) → euint32
Performs multiplication of two encrypted 32-bit unsigned integers.
mul (euint64)
mul(euint64 lhs, euint64 rhs) → euint64
Performs multiplication of two encrypted 64-bit unsigned integers.
mul (euint128)
mul(euint128 lhs, euint128 rhs) → euint128
Performs multiplication of two encrypted 128-bit unsigned integers.
mul (euint256)
mul(euint256 lhs, euint256 rhs) → euint256
Performs multiplication of two encrypted 256-bit unsigned integers.
div (euint8)
div(euint8 lhs, euint8 rhs) → euint8
Performs division of two encrypted 8-bit unsigned integers.
div (euint16)
div(euint16 lhs, euint16 rhs) → euint16
Performs division of two encrypted 16-bit unsigned integers.
div (euint32)
div(euint32 lhs, euint32 rhs) → euint32
Performs division of two encrypted 32-bit unsigned integers.
div (euint64)
div(euint64 lhs, euint64 rhs) → euint64
Performs division of two encrypted 64-bit unsigned integers.
div (euint128)
div(euint128 lhs, euint128 rhs) → euint128
Performs division of two encrypted 128-bit unsigned integers.
div (euint256)
div(euint256 lhs, euint256 rhs) → euint256
Performs division of two encrypted 256-bit unsigned integers.
rem (euint8)
rem(euint8 lhs, euint8 rhs) → euint8
Calculates the remainder when dividing two encrypted 8-bit unsigned integers.
rem (euint16)
rem(euint16 lhs, euint16 rhs) → euint16
Calculates the remainder when dividing two encrypted 16-bit unsigned integers.
rem (euint32)
rem(euint32 lhs, euint32 rhs) → euint32
Calculates the remainder when dividing two encrypted 32-bit unsigned integers.
rem (euint64)
rem(euint64 lhs, euint64 rhs) → euint64
Calculates the remainder when dividing two encrypted 64-bit unsigned integers.
rem (euint128)
rem(euint128 lhs, euint128 rhs) → euint128
Calculates the remainder when dividing two encrypted 128-bit unsigned integers.
rem (euint256)
rem(euint256 lhs, euint256 rhs) → euint256
Calculates the remainder when dividing two encrypted 256-bit unsigned integers.
square (euint8)
square(euint8 value) → euint8
Calculates the square of an encrypted 8-bit unsigned integer.
square (euint16)
square(euint16 value) → euint16
Calculates the square of an encrypted 16-bit unsigned integer.
square (euint32)
square(euint32 value) → euint32
Calculates the square of an encrypted 32-bit unsigned integer.
square (euint64)
square(euint64 value) → euint64
Calculates the square of an encrypted 64-bit unsigned integer.
square (euint128)
square(euint128 value) → euint128
Calculates the square of an encrypted 128-bit unsigned integer.
square (euint256)
square(euint256 value) → euint256
Calculates the square of an encrypted 256-bit unsigned integer.
Bitwise Operations
and (ebool)
and(ebool lhs, ebool rhs) → ebool
Performs a bitwise AND operation on two encrypted boolean values.
and (euint8)
and(euint8 lhs, euint8 rhs) → euint8
Performs a bitwise AND operation on two encrypted 8-bit unsigned integers.
and (euint16)
and(euint16 lhs, euint16 rhs) → euint16
Performs a bitwise AND operation on two encrypted 16-bit unsigned integers.
and (euint32)
and(euint32 lhs, euint32 rhs) → euint32
Performs a bitwise AND operation on two encrypted 32-bit unsigned integers.
and (euint64)
and(euint64 lhs, euint64 rhs) → euint64
Performs a bitwise AND operation on two encrypted 64-bit unsigned integers.
and (euint128)
and(euint128 lhs, euint128 rhs) → euint128
Performs a bitwise AND operation on two encrypted 128-bit unsigned integers.
and (euint256)
and(euint256 lhs, euint256 rhs) → euint256
Performs a bitwise AND operation on two encrypted 256-bit unsigned integers.
or (ebool)
or(ebool lhs, ebool rhs) → ebool
Performs a bitwise OR operation on two encrypted boolean values.
or (euint8)
or(euint8 lhs, euint8 rhs) → euint8
Performs a bitwise OR operation on two encrypted 8-bit unsigned integers.
or (euint16)
or(euint16 lhs, euint16 rhs) → euint16
Performs a bitwise OR operation on two encrypted 16-bit unsigned integers.
or (euint32)
or(euint32 lhs, euint32 rhs) → euint32
Performs a bitwise OR operation on two encrypted 32-bit unsigned integers.
or (euint64)
or(euint64 lhs, euint64 rhs) → euint64
Performs a bitwise OR operation on two encrypted 64-bit unsigned integers.
or (euint128)
or(euint128 lhs, euint128 rhs) → euint128
Performs a bitwise OR operation on two encrypted 128-bit unsigned integers.
or (euint256)
or(euint256 lhs, euint256 rhs) → euint256
Performs a bitwise OR operation on two encrypted 256-bit unsigned integers.
xor (ebool)
xor(ebool lhs, ebool rhs) → ebool
Performs a bitwise XOR operation on two encrypted boolean values.
xor (euint8)
xor(euint8 lhs, euint8 rhs) → euint8
Performs a bitwise XOR operation on two encrypted 8-bit unsigned integers.
xor (euint16)
xor(euint16 lhs, euint16 rhs) → euint16
Performs a bitwise XOR operation on two encrypted 16-bit unsigned integers.
xor (euint32)
xor(euint32 lhs, euint32 rhs) → euint32
Performs a bitwise XOR operation on two encrypted 32-bit unsigned integers.
xor (euint64)
xor(euint64 lhs, euint64 rhs) → euint64
Performs a bitwise XOR operation on two encrypted 64-bit unsigned integers.
xor (euint128)
xor(euint128 lhs, euint128 rhs) → euint128
Performs a bitwise XOR operation on two encrypted 128-bit unsigned integers.
xor (euint256)
xor(euint256 lhs, euint256 rhs) → euint256
Performs a bitwise XOR operation on two encrypted 256-bit unsigned integers.
not (ebool)
not(ebool value) → ebool
Performs a bitwise NOT operation on an encrypted boolean value.
not (euint8)
not(euint8 value) → euint8
Performs a bitwise NOT operation on an encrypted 8-bit unsigned integer.
not (euint16)
not(euint16 value) → euint16
Performs a bitwise NOT operation on an encrypted 16-bit unsigned integer.
not (euint32)
not(euint32 value) → euint32
Performs a bitwise NOT operation on an encrypted 32-bit unsigned integer.
not (euint64)
not(euint64 value) → euint64
Performs a bitwise NOT operation on an encrypted 64-bit unsigned integer.
not (euint128)
not(euint128 value) → euint128
Performs a bitwise NOT operation on an encrypted 128-bit unsigned integer.
not (euint256)
not(euint256 value) → euint256
Performs a bitwise NOT operation on an encrypted 256-bit unsigned integer.
shl (euint8)
shl(euint8 lhs, euint8 rhs) → euint8
Performs a shift left operation on an encrypted 8-bit unsigned integer.
shl (euint16)
shl(euint16 lhs, euint16 rhs) → euint16
Performs a shift left operation on an encrypted 16-bit unsigned integer.
shl (euint32)
shl(euint32 lhs, euint32 rhs) → euint32
Performs a shift left operation on an encrypted 32-bit unsigned integer.
shl (euint64)
shl(euint64 lhs, euint64 rhs) → euint64
Performs a shift left operation on an encrypted 64-bit unsigned integer.
shl (euint128)
shl(euint128 lhs, euint128 rhs) → euint128
Performs a shift left operation on an encrypted 128-bit unsigned integer.
shl (euint256)
shl(euint256 lhs, euint256 rhs) → euint256
Performs a shift left operation on an encrypted 256-bit unsigned integer.
shr (euint8)
shr(euint8 lhs, euint8 rhs) → euint8
Performs a shift right operation on an encrypted 8-bit unsigned integer.
shr (euint16)
shr(euint16 lhs, euint16 rhs) → euint16
Performs a shift right operation on an encrypted 16-bit unsigned integer.
shr (euint32)
shr(euint32 lhs, euint32 rhs) → euint32
Performs a shift right operation on an encrypted 32-bit unsigned integer.
shr (euint64)
shr(euint64 lhs, euint64 rhs) → euint64
Performs a shift right operation on an encrypted 64-bit unsigned integer.
shr (euint128)
shr(euint128 lhs, euint128 rhs) → euint128
Performs a shift right operation on an encrypted 128-bit unsigned integer.
shr (euint256)
shr(euint256 lhs, euint256 rhs) → euint256
Performs a shift right operation on an encrypted 256-bit unsigned integer.
rol (euint8)
rol(euint8 lhs, euint8 rhs) → euint8
Performs a rotate left operation on an encrypted 8-bit unsigned integer.
rol (euint16)
rol(euint16 lhs, euint16 rhs) → euint16
Performs a rotate left operation on an encrypted 16-bit unsigned integer.
rol (euint32)
rol(euint32 lhs, euint32 rhs) → euint32
Performs a rotate left operation on an encrypted 32-bit unsigned integer.
rol (euint64)
rol(euint64 lhs, euint64 rhs) → euint64
Performs a rotate left operation on an encrypted 64-bit unsigned integer.
rol (euint128)
rol(euint128 lhs, euint128 rhs) → euint128
Performs a rotate left operation on an encrypted 128-bit unsigned integer.
rol (euint256)
rol(euint256 lhs, euint256 rhs) → euint256
Performs a rotate left operation on an encrypted 256-bit unsigned integer.
ror (euint8)
ror(euint8 lhs, euint8 rhs) → euint8
Performs a rotate right operation on an encrypted 8-bit unsigned integer.
ror (euint16)
ror(euint16 lhs, euint16 rhs) → euint16
Performs a rotate right operation on an encrypted 16-bit unsigned integer.
ror (euint32)
ror(euint32 lhs, euint32 rhs) → euint32
Performs a rotate right operation on an encrypted 32-bit unsigned integer.
ror (euint64)
ror(euint64 lhs, euint64 rhs) → euint64
Performs a rotate right operation on an encrypted 64-bit unsigned integer.
ror (euint128)
ror(euint128 lhs, euint128 rhs) → euint128
Performs a rotate right operation on an encrypted 128-bit unsigned integer.
ror (euint256)
ror(euint256 lhs, euint256 rhs) → euint256
Performs a rotate right operation on an encrypted 256-bit unsigned integer.
Comparison Operations
eq (ebool)
eq(ebool lhs, ebool rhs) → ebool
Checks if two encrypted boolean values are equal and returns an encrypted boolean.
eq (euint8)
eq(euint8 lhs, euint8 rhs) → ebool
Checks if two encrypted 8-bit unsigned integers are equal and returns an encrypted boolean.
eq (euint16)
eq(euint16 lhs, euint16 rhs) → ebool
Checks if two encrypted 16-bit unsigned integers are equal and returns an encrypted boolean.
eq (euint32)
eq(euint32 lhs, euint32 rhs) → ebool
Checks if two encrypted 32-bit unsigned integers are equal and returns an encrypted boolean.
eq (euint64)
eq(euint64 lhs, euint64 rhs) → ebool
Checks if two encrypted 64-bit unsigned integers are equal and returns an encrypted boolean.
eq (euint128)
eq(euint128 lhs, euint128 rhs) → ebool
Checks if two encrypted 128-bit unsigned integers are equal and returns an encrypted boolean.
eq (euint256)
eq(euint256 lhs, euint256 rhs) → ebool
Checks if two encrypted 256-bit unsigned integers are equal and returns an encrypted boolean.
eq (eaddress)
eq(eaddress lhs, eaddress rhs) → ebool
Checks if two encrypted addresses are equal and returns an encrypted boolean.
ne (ebool)
ne(ebool lhs, ebool rhs) → ebool
Checks if two encrypted boolean values are not equal and returns an encrypted boolean.
ne (euint8)
ne(euint8 lhs, euint8 rhs) → ebool
Checks if two encrypted 8-bit unsigned integers are not equal and returns an encrypted boolean.
ne (euint16)
ne(euint16 lhs, euint16 rhs) → ebool
Checks if two encrypted 16-bit unsigned integers are not equal and returns an encrypted boolean.
ne (euint32)
ne(euint32 lhs, euint32 rhs) → ebool
Checks if two encrypted 32-bit unsigned integers are not equal and returns an encrypted boolean.
ne (euint64)
ne(euint64 lhs, euint64 rhs) → ebool
Checks if two encrypted 64-bit unsigned integers are not equal and returns an encrypted boolean.
ne (euint128)
ne(euint128 lhs, euint128 rhs) → ebool
Checks if two encrypted 128-bit unsigned integers are not equal and returns an encrypted boolean.
ne (euint256)
ne(euint256 lhs, euint256 rhs) → ebool
Checks if two encrypted 256-bit unsigned integers are not equal and returns an encrypted boolean.
ne (eaddress)
ne(eaddress lhs, eaddress rhs) → ebool
Checks if two encrypted addresses are not equal and returns an encrypted boolean.
lt (euint8)
lt(euint8 lhs, euint8 rhs) → ebool
Checks if the first encrypted 8-bit unsigned integer is less than the second and returns an encrypted boolean.
lt (euint16)
lt(euint16 lhs, euint16 rhs) → ebool
Checks if the first encrypted 16-bit unsigned integer is less than the second and returns an encrypted boolean.
lt (euint32)
lt(euint32 lhs, euint32 rhs) → ebool
Checks if the first encrypted 32-bit unsigned integer is less than the second and returns an encrypted boolean.
lt (euint64)
lt(euint64 lhs, euint64 rhs) → ebool
Checks if the first encrypted 64-bit unsigned integer is less than the second and returns an encrypted boolean.
lt (euint128)
lt(euint128 lhs, euint128 rhs) → ebool
Checks if the first encrypted 128-bit unsigned integer is less than the second and returns an encrypted boolean.
lt (euint256)
lt(euint256 lhs, euint256 rhs) → ebool
Checks if the first encrypted 256-bit unsigned integer is less than the second and returns an encrypted boolean.
lte (euint8)
lte(euint8 lhs, euint8 rhs) → ebool
Checks if the first encrypted 8-bit unsigned integer is less than or equal to the second and returns an encrypted boolean.
lte (euint16)
lte(euint16 lhs, euint16 rhs) → ebool
Checks if the first encrypted 16-bit unsigned integer is less than or equal to the second and returns an encrypted boolean.
lte (euint32)
lte(euint32 lhs, euint32 rhs) → ebool
Checks if the first encrypted 32-bit unsigned integer is less than or equal to the second and returns an encrypted boolean.
lte (euint64)
lte(euint64 lhs, euint64 rhs) → ebool
Checks if the first encrypted 64-bit unsigned integer is less than or equal to the second and returns an encrypted boolean.
lte (euint128)
lte(euint128 lhs, euint128 rhs) → ebool
Checks if the first encrypted 128-bit unsigned integer is less than or equal to the second and returns an encrypted boolean.
lte (euint256)
lte(euint256 lhs, euint256 rhs) → ebool
Checks if the first encrypted 256-bit unsigned integer is less than or equal to the second and returns an encrypted boolean.
gt (euint8)
gt(euint8 lhs, euint8 rhs) → ebool
Checks if the first encrypted 8-bit unsigned integer is greater than the second and returns an encrypted boolean.
gt (euint16)
gt(euint16 lhs, euint16 rhs) → ebool
Checks if the first encrypted 16-bit unsigned integer is greater than the second and returns an encrypted boolean.
gt (euint32)
gt(euint32 lhs, euint32 rhs) → ebool
Checks if the first encrypted 32-bit unsigned integer is greater than the second and returns an encrypted boolean.
gt (euint64)
gt(euint64 lhs, euint64 rhs) → ebool
Checks if the first encrypted 64-bit unsigned integer is greater than the second and returns an encrypted boolean.
gt (euint128)
gt(euint128 lhs, euint128 rhs) → ebool
Checks if the first encrypted 128-bit unsigned integer is greater than the second and returns an encrypted boolean.
gt (euint256)
gt(euint256 lhs, euint256 rhs) → ebool
Checks if the first encrypted 256-bit unsigned integer is greater than the second and returns an encrypted boolean.
gte (euint8)
gte(euint8 lhs, euint8 rhs) → ebool
Checks if the first encrypted 8-bit unsigned integer is greater than or equal to the second and returns an encrypted boolean.
gte (euint16)
gte(euint16 lhs, euint16 rhs) → ebool
Checks if the first encrypted 16-bit unsigned integer is greater than or equal to the second and returns an encrypted boolean.
gte (euint32)
gte(euint32 lhs, euint32 rhs) → ebool
Checks if the first encrypted 32-bit unsigned integer is greater than or equal to the second and returns an encrypted boolean.
gte (euint64)
gte(euint64 lhs, euint64 rhs) → ebool
Checks if the first encrypted 64-bit unsigned integer is greater than or equal to the second and returns an encrypted boolean.
gte (euint128)
gte(euint128 lhs, euint128 rhs) → ebool
Checks if the first encrypted 128-bit unsigned integer is greater than or equal to the second and returns an encrypted boolean.
gte (euint256)
gte(euint256 lhs, euint256 rhs) → ebool
Checks if the first encrypted 256-bit unsigned integer is greater than or equal to the second and returns an encrypted boolean.
Min/Max Functions
min (euint8)
min(euint8 lhs, euint8 rhs) → euint8
Returns the smaller of two encrypted 8-bit unsigned integers.
min (euint16)
min(euint16 lhs, euint16 rhs) → euint16
Returns the smaller of two encrypted 16-bit unsigned integers.
min (euint32)
min(euint32 lhs, euint32 rhs) → euint32
Returns the smaller of two encrypted 32-bit unsigned integers.
min (euint64)
min(euint64 lhs, euint64 rhs) → euint64
Returns the smaller of two encrypted 64-bit unsigned integers.
min (euint128)
min(euint128 lhs, euint128 rhs) → euint128
Returns the smaller of two encrypted 128-bit unsigned integers.
min (euint256)
min(euint256 lhs, euint256 rhs) → euint256
Returns the smaller of two encrypted 256-bit unsigned integers.
max (euint8)
max(euint8 lhs, euint8 rhs) → euint8
Returns the larger of two encrypted 8-bit unsigned integers.
max (euint16)
max(euint16 lhs, euint16 rhs) → euint16
Returns the larger of two encrypted 16-bit unsigned integers.
max (euint32)
max(euint32 lhs, euint32 rhs) → euint32
Returns the larger of two encrypted 32-bit unsigned integers.
max (euint64)
max(euint64 lhs, euint64 rhs) → euint64
Returns the larger of two encrypted 64-bit unsigned integers.
max (euint128)
max(euint128 lhs, euint128 rhs) → euint128
Returns the larger of two encrypted 128-bit unsigned integers.
max (euint256)
max(euint256 lhs, euint256 rhs) → euint256
Returns the larger of two encrypted 256-bit unsigned integers.
Control Flow
select (euint8)
select(ebool condition, euint8 ifTrue, euint8 ifFalse) → euint8
Conditionally selects between two encrypted 8-bit unsigned integers based on an encrypted boolean condition.
select (euint16)
select(ebool condition, euint16 ifTrue, euint16 ifFalse) → euint16
Conditionally selects between two encrypted 16-bit unsigned integers based on an encrypted boolean condition.
select (euint32)
select(ebool condition, euint32 ifTrue, euint32 ifFalse) → euint32
Conditionally selects between two encrypted 32-bit unsigned integers based on an encrypted boolean condition.
select (euint64)
select(ebool condition, euint64 ifTrue, euint64 ifFalse) → euint64
Conditionally selects between two encrypted 64-bit unsigned integers based on an encrypted boolean condition.
select (euint128)
select(ebool condition, euint128 ifTrue, euint128 ifFalse) → euint128
Conditionally selects between two encrypted 128-bit unsigned integers based on an encrypted boolean condition.
select (euint256)
select(ebool condition, euint256 ifTrue, euint256 ifFalse) → euint256
Conditionally selects between two encrypted 256-bit unsigned integers based on an encrypted boolean condition.
select (ebool)
select(ebool condition, ebool ifTrue, ebool ifFalse) → ebool
Conditionally selects between two encrypted boolean values based on an encrypted boolean condition.
select (eaddress)
select(ebool condition, eaddress ifTrue, eaddress ifFalse) → eaddress
Conditionally selects between two encrypted addresses based on an encrypted boolean condition.
Encryption and Decryption
encrypt (bool)
encrypt(bool value) → ebool
Encrypts a plaintext boolean value.
encrypt (uint8)
encrypt(uint8 value) → euint8
Encrypts a plaintext 8-bit unsigned integer.
encrypt (uint16)
encrypt(uint16 value) → euint16
Encrypts a plaintext 16-bit unsigned integer.
encrypt (uint32)
encrypt(uint32 value) → euint32
Encrypts a plaintext 32-bit unsigned integer.
encrypt (uint64)
encrypt(uint64 value) → euint64
Encrypts a plaintext 64-bit unsigned integer.
encrypt (uint128)
encrypt(uint128 value) → euint128
Encrypts a plaintext 128-bit unsigned integer.
encrypt (uint256)
encrypt(uint256 value) → euint256
Encrypts a plaintext 256-bit unsigned integer.
encrypt (address)
encrypt(address value) → eaddress
Encrypts a plaintext Ethereum address.