FHE.sol
isInitialized
function isInitialized(ebool v) internal pure returns (bool)
isInitialized
function isInitialized(euint8 v) internal pure returns (bool)
isInitialized
function isInitialized(euint16 v) internal pure returns (bool)
isInitialized
function isInitialized(euint32 v) internal pure returns (bool)
isInitialized
function isInitialized(euint64 v) internal pure returns (bool)
isInitialized
function isInitialized(euint128 v) internal pure returns (bool)
isInitialized
function isInitialized(euint256 v) internal pure returns (bool)
isInitialized
function isInitialized(eaddress v) internal pure returns (bool)
mathHelper
function mathHelper(uint8 utype, uint256 lhs, uint256 rhs, function (uint8,bytes,bytes) pure external returns (bytes) impl) internal pure returns (uint256 result)
add
function add(euint8 lhs, euint8 rhs) internal pure returns (euint8)
This function performs the add operation
If any of the inputs are expected to be a ciphertext, it verifies that the value matches a valid ciphertext Pure in this function is marked as a hack/workaround - note that this function is NOT pure as fetches of ciphertexts require state access
Parameters
Name | Type | Description |
---|---|---|
lhs | euint8 | The first input |
rhs | euint8 | The second input |
Return Values
Name | Type | Description |
---|---|---|
[0] | euint8 | The result of the operation |
add
function add(euint16 lhs, euint16 rhs) internal pure returns (euint16)
This function performs the add operation
If any of the inputs are expected to be a ciphertext, it verifies that the value matches a valid ciphertext Pure in this function is marked as a hack/workaround - note that this function is NOT pure as fetches of ciphertexts require state access
Parameters
Name | Type | Description |
---|---|---|
lhs | euint16 | The first input |
rhs | euint16 | The second input |
Return Values
Name | Type | Description |
---|---|---|
[0] | euint16 | The result of the operation |
add
function add(euint32 lhs, euint32 rhs) internal pure returns (euint32)
This function performs the add operation
If any of the inputs are expected to be a ciphertext, it verifies that the value matches a valid ciphertext Pure in this function is marked as a hack/workaround - note that this function is NOT pure as fetches of ciphertexts require state access
Parameters
Name | Type | Description |
---|---|---|
lhs | euint32 | The first input |
rhs | euint32 | The second input |
Return Values
Name | Type | Description |
---|---|---|
[0] | euint32 | The result of the operation |
add
function add(euint64 lhs, euint64 rhs) internal pure returns (euint64)
This functions performs the add operation
If any of the inputs are expected to be a ciphertext, it verifies that the value matches a valid ciphertext Pure in this function is marked as a hack/workaround - note that this function is NOT pure as fetches of ciphertexts require state access
Parameters
Name | Type | Description |
---|---|---|
lhs | euint64 | The first input |
rhs | euint64 | The second input |
Return Values
Name | Type | Description |
---|---|---|
[0] | euint64 | The result of the operation |
add
function add(euint128 lhs, euint128 rhs) internal pure returns (euint128)
This functions performs the add operation
If any of the inputs are expected to be a ciphertext, it verifies that the value matches a valid ciphertext Pure in this function is marked as a hack/workaround - note that this function is NOT pure as fetches of ciphertexts require state access
Parameters
Name | Type | Description |
---|---|---|
lhs | euint128 | The first input |
rhs | euint128 | The second input |
Return Values
Name | Type | Description |
---|---|---|
[0] | euint128 | The result of the operation |
sealoutput
function sealoutput(ebool value, bytes32 publicKey) internal pure returns (string)
performs the sealoutput function on a ebool ciphertext. This operation returns the plaintext value, sealed for the public key provided
Pure in this function is marked as a hack/workaround - note that this function is NOT pure as fetches of ciphertexts require state access
Parameters
Name | Type | Description |
---|---|---|
value | ebool | Ciphertext to decrypt and seal |
publicKey | bytes32 | Public Key that will receive the sealed plaintext |
Return Values
Name | Type | Description |
---|---|---|
[0] | string | Plaintext input, sealed for the owner of publicKey |
sealoutput
function sealoutput(euint8 value, bytes32 publicKey) internal pure returns (string)
performs the sealoutput function on a euint8 ciphertext. This operation returns the plaintext value, sealed for the public key provided
Pure in this function is marked as a hack/workaround - note that this function is NOT pure as fetches of ciphertexts require state access
Parameters
Name | Type | Description |
---|---|---|
value | euint8 | Ciphertext to decrypt and seal |
publicKey | bytes32 | Public Key that will receive the sealed plaintext |
Return Values
Name | Type | Description |
---|---|---|
[0] | string | Plaintext input, sealed for the owner of publicKey |
sealoutput
function sealoutput(euint16 value, bytes32 publicKey) internal pure returns (string)
performs the sealoutput function on a euint16 ciphertext. This operation returns the plaintext value, sealed for the public key provided
Pure in this function is marked as a hack/workaround - note that this function is NOT pure as fetches of ciphertexts require state access
Parameters
Name | Type | Description |
---|---|---|
value | euint16 | Ciphertext to decrypt and seal |
publicKey | bytes32 | Public Key that will receive the sealed plaintext |
Return Values
Name | Type | Description |
---|---|---|
[0] | string | Plaintext input, sealed for the owner of publicKey |
sealoutput
function sealoutput(euint32 value, bytes32 publicKey) internal pure returns (string)
performs the sealoutput function on a euint32 ciphertext. This operation returns the plaintext value, sealed for the public key provided
Pure in this function is marked as a hack/workaround - note that this function is NOT pure as fetches of ciphertexts require state access
Parameters
Name | Type | Description |
---|---|---|
value | euint32 | Ciphertext to decrypt and seal |
publicKey | bytes32 | Public Key that will receive the sealed plaintext |
Return Values
Name | Type | Description |
---|---|---|
[0] | string | Plaintext input, sealed for the owner of publicKey |
sealoutput
function sealoutput(euint64 value, bytes32 publicKey) internal pure returns (string)
performs the sealoutput function on a euint64 ciphertext. This operation returns the plaintext value, sealed for the public key provided
Pure in this function is marked as a hack/workaround - note that this function is NOT pure as fetches of ciphertexts require state access
Parameters
Name | Type | Description |
---|---|---|
value | euint64 | Ciphertext to decrypt and seal |
publicKey | bytes32 | Public Key that will receive the sealed plaintext |
Return Values
Name | Type | Description |
---|---|---|
[0] | string | Plaintext input, sealed for the owner of publicKey |
sealoutput
function sealoutput(euint128 value, bytes32 publicKey) internal pure returns (string)
performs the sealoutput function on a euint128 ciphertext. This operation returns the plaintext value, sealed for the public key provided
Pure in this function is marked as a hack/workaround - note that this function is NOT pure as fetches of ciphertexts require state access
Parameters
Name | Type | Description |
---|---|---|
value | euint128 | Ciphertext to decrypt and seal |
publicKey | bytes32 | Public Key that will receive the sealed plaintext |
Return Values
Name | Type | Description |
---|---|---|
[0] | string | Plaintext input, sealed for the owner of publicKey |
sealoutput
function sealoutput(euint256 value, bytes32 publicKey) internal pure returns (string)
performs the sealoutput function on a euint256 ciphertext. This operation returns the plaintext value, sealed for the public key provided
Pure in this function is marked as a hack/workaround - note that this function is NOT pure as fetches of ciphertexts require state access
Parameters
Name | Type | Description |
---|---|---|
value | euint256 | Ciphertext to decrypt and seal |
publicKey | bytes32 | Public Key that will receive the sealed plaintext |
Return Values
Name | Type | Description |
---|---|---|
[0] | string | Plaintext input, sealed for the owner of publicKey |
sealoutput
function sealoutput(eaddress value, bytes32 publicKey) internal pure returns (string)
performs the sealoutput function on a eaddress ciphertext. This operation returns the plaintext value, sealed for the public key provided
Pure in this function is marked as a hack/workaround - note that this function is NOT pure as fetches of ciphertexts require state access
Parameters
Name | Type | Description |
---|---|---|
value | eaddress | Ciphertext to decrypt and seal |
publicKey | bytes32 | Public Key that will receive the sealed plaintext |
Return Values
Name | Type | Description |
---|---|---|
[0] | string | Plaintext input, sealed for the owner of publicKey |
decrypt
function decrypt(ebool input1) internal pure returns (bool)
Performs the decrypt operation on a ciphertext
Verifies that the input value matches a valid ciphertext. Pure in this function is marked as a hack/workaround - note that this function is NOT pure as fetches of ciphertexts require state access
Parameters
Name | Type | Description |
---|---|---|
input1 | ebool | the input ciphertext |
decrypt
function decrypt(euint8 input1) internal pure returns (uint8)
Performs the decrypt operation on a ciphertext
Verifies that the input value matches a valid ciphertext. Pure in this function is marked as a hack/workaround - note that this function is NOT pure as fetches of ciphertexts require state access
Parameters
Name | Type | Description |
---|---|---|
input1 | euint8 | the input ciphertext |
decrypt
function decrypt(euint16 input1) internal pure returns (uint16)
Performs the decrypt operation on a ciphertext
Verifies that the input value matches a valid ciphertext. Pure in this function is marked as a hack/workaround - note that this function is NOT pure as fetches of ciphertexts require state access
Parameters
Name | Type | Description |
---|---|---|
input1 | euint16 | the input ciphertext |
decrypt
function decrypt(euint32 input1) internal pure returns (uint32)
Performs the decrypt operation on a ciphertext
Verifies that the input value matches a valid ciphertext. Pure in this function is marked as a hack/workaround - note that this function is NOT pure as fetches of ciphertexts require state access
Parameters
Name | Type | Description |
---|---|---|
input1 | euint32 | the input ciphertext |
decrypt
function decrypt(euint64 input1) internal pure returns (uint64)
Performs the decrypt operation on a ciphertext
Verifies that the input value matches a valid ciphertext. Pure in this function is marked as a hack/workaround - note that this function is NOT pure as fetches of ciphertexts require state access
Parameters
Name | Type | Description |
---|---|---|
input1 | euint64 | the input ciphertext |
decrypt
function decrypt(euint128 input1) internal pure returns (uint128)
Performs the decrypt operation on a ciphertext
Verifies that the input value matches a valid ciphertext. Pure in this function is marked as a hack/workaround - note that this function is NOT pure as fetches of ciphertexts require state access
Parameters
Name | Type | Description |
---|---|---|
input1 | euint128 | the input ciphertext |
decrypt
function decrypt(euint256 input1) internal pure returns (uint256)
Performs the decrypt operation on a ciphertext
Verifies that the input value matches a valid ciphertext. Pure in this function is marked as a hack/workaround - note that this function is NOT pure as fetches of ciphertexts require state access
Parameters
Name | Type | Description |
---|---|---|
input1 | euint256 | the input ciphertext |
decrypt
function decrypt(eaddress input1) internal pure returns (address)
Performs the decrypt operation on a ciphertext
Verifies that the input value matches a valid ciphertext. Pure in this function is marked as a hack/workaround - note that this function is NOT pure as fetches of ciphertexts require state access
Parameters
Name | Type | Description |
---|---|---|
input1 | eaddress | the input ciphertext |
lte
function lte(euint8 lhs, euint8 rhs) internal pure returns (ebool)
This function performs the lte operation
If any of the inputs are expected to be a ciphertext, it verifies that the value matches a valid ciphertext Pure in this function is marked as a hack/workaround - note that this function is NOT pure as fetches of ciphertexts require state access
Parameters
Name | Type | Description |
---|---|---|
lhs | euint8 | The first input |
rhs | euint8 | The second input |
Return Values
Name | Type | Description |
---|---|---|
[0] | ebool | The result of the operation |