Decryption & Attestations
Theis_validsignature function verifies Ed25519 signatures for attested decryption results from the covalidator network.
On-Chain Verification
How Attestation Works
- Request decryption: Client requests decryption of a handle they have access to
- Covalidator processes: The covalidator network decrypts the value in a TEE
- Sign attestation: Covalidator signs
hash(handle + plaintext_value)with Ed25519 - Verify on-chain: Program verifies the signature using
is_validsignature
Verification Parameters
| Parameter | Description |
|---|---|
expected_count | Number of signatures expected in the instruction |
handles | Vector of handle bytes being verified |
plaintext_values | Vector of claimed plaintext values |
Account Requirements
The verification requires access to the instructions sysvar:The Ed25519 signature must be provided in a previous instruction in the same transaction. The
is_validsignature function verifies against the instructions sysvar.Client-Side Decryption
Decryption is initiated client-side using the JavaScript SDK. The SDK handles requesting decryption from the covalidator:ed25519Instructions from the result to build a verification transaction. See Attested Decrypt for details.
See the JavaScript SDK Attested Decrypt documentation for complete usage and examples.