Encryption
TEE key exchange, ECDH shared secret derivation, and AES-GCM calldata encryption
Overview
Encryption Flow
Client Seismic Node (TEE)
------ ------------------
1. Generate ephemeral secp256k1 keypair
(ephemeral_sk, ephemeral_pk)
2. Fetch TEE public key ----RPC----->
seismic_getTeePublicKey()
<----RPC----- tee_pubkey
3. ECDH(ephemeral_sk, tee_pubkey)
= shared_point
4. Derive AES key from shared_point
aes_key = KDF(shared_point)
5. For each transaction:
a. Build AAD from tx context
(sender, chain_id, nonce, to, value, seismic_elements)
b. Generate encryption nonce (12 bytes)
c. AES-GCM-encrypt(calldata, aes_key, nonce, AAD)
d. Send encrypted tx ----RPC----->
e. Derive same shared_point
ECDH(tee_sk, ephemeral_pk)
f. Derive same AES key
g. Rebuild AAD from tx
h. AES-GCM-decrypt(ciphertext)
i. Execute with plaintext calldata
6. For seismic_call responses:
<----RPC----- encrypted_response
a. AES-GCM-decrypt(response, aes_key, nonce, AAD)
b. Return plaintext resultKey Generation
Ephemeral Keypair
TEE Public Key
ECDH Shared Secret
AES-GCM Encryption
Key Derivation
Encryption Parameters
Parameter
Size
Description
Encryption Operation
Decryption Operation
Additional Authenticated Data (AAD)
AAD Composition
Field
Type
Description
AAD Construction
Response Decryption
Provider Comparison
Encryption Capability
SeismicSignedProvider
SeismicUnsignedProvider
Security Properties
Forward Secrecy
Nonce Uniqueness
Authentication
Key Separation
Examples
Inspecting TEE Public Key
Signed Provider with Automatic Encryption
Notes
See Also
Last updated

