Proper Use of Types
Never save garbledtext in storage
Never save garbledtext in storage
garbledtext in storagecontract BadContract {
gtUint64 private storedGarbledText;
function setZero() public{
storedGarbledText = mpcCore.SetPublic64(0);
}
} contract GoodContract {
ctUint64 private storedCipherText;
function setZero() public {
gtUint64 gtZero = mpcCore.SetPublic64(0);
storedCipherText = mpcCore.offboard(gtZero);
}
}Never Pass Ciphertext as Parameter to Another Contract or As User Input
Ciphertext as Parameter to Another Contract or As User InputNever Return a Ciphertext to Another Contract
Ciphertext to Another ContractWas this helpful?