Decryption
Attested Reveal
Attested reveal is similar to Attested Decrypt.
The major difference is that anyone can request a decryption with attestation after e.reveal() has been called on a handle, allowing anyone to submit the decryption result back on-chain.
This contract creates a random 256bit integer and immediately calls e.reveal(), allowing anyone to decrypt, perform computation on it or request an attestation, even though we haven’t explicitly granted permission to any particular address.
The result contains the plaintext with covalidator signature. It can be used to submit back the decryption on-chain by calling “SubmitDecryption” as an alternative to the old callbacks.