1.0 KiB
1.0 KiB
Guardian Key Usage
Objective
- Describe how guardian keys are used and how message confusion is avoided.
Background
Message confusion could occur when a Guardian signs a message and an attacker replays that message elsewhere where it is interpreted as a different message type, which could lead to unintended behavior.
Overview
The Guardian Key is used to:
- Sign gossip messages
- heartbeat
- governor config and governor status
- observation request
- Sign Observations
- Version 1 VAAs
Detailed Design
Signing of gossip messages:
- Prepend the message type prefix to the payload
- Compute Keccak256Hash of the payload.
- Compute ethcrypto.Sign()
Signing of Observations:
- v1 VAA:
double-Keccak256(observation)
.
Rationale
- Gossip messages cannot be confused with other gossip messages because the message type prefix is prepended.
- Gossip messages cannot be confused with observations because observations utilize a double-Keccak256 and the payload is enforced to be
>=34
bytes.