Bringing TEE Attestations On Chain
Blocky's Chain Integrations are currently under development. We are excited to share a demo of a working prototype that demonstrates how to bring attestations onto Base Mainnet.
The following diagram shows the process of the interactions for a User, who obtains attestation from the Blocky Attestation Service and wants to process attested data in their smart contract.
- A User requests an Enclave Attestation (EA) from the Blocky Attestation Service running in a TEE.
- The Blocky Attestation Service returns an EA, which among other things, attests to the enclave application public key,
enclAppPubKey
, corresponding to an enclave application private key generated in a TEE enclave. - The User uses
bky-as
to verify the EA to extract the attestedenclAppPubkey
. - The User calls the
setTASigningKey
function in the User Contract to set theenclAppPubkey
in contract memory. - The User requests a Transitive Attestation (TA) from the Blocky Attestation Service, for example containing the results of the
bky-as attest-api-call
command. - The Blocky Attestation Service returns a TA signed with the enclave application's private key.
- The User calls the
processAttestedAPICallClaims
function in the User Contract to process the TA and its attested data. - The User Contract invokes the Blocky Contract to verify that the TA was signed with the enclave application's private key. The
verify
function usesecrecover
and matches the recovered public key againstenclAppPubkey
. - The Blocky Contract returns the
claims
attested by the TA. - The User Contract processes the
claims
data.
Check out the video below to see the whole process!
You can also find the TA on the Base Mainnet at the following address: 0xA026aB454E1e2605337bEfc43B2062D560933BDD