pub fn binding_message(
domain: &[u8],
role: Role,
handshake_hash: &[u8],
) -> Vec<u8> ⓘExpand description
Returns the message that a party must sign with its Aleo account key in order to bind that
identity to the Noise session identified by handshake_hash.
The handshake hash commits to every key and payload exchanged so far, so a signature over it is only valid for the one session it was produced in. This is what makes relaying impossible: an attacker that terminates two separate Noise sessions and forwards the payloads between them derives a different handshake hash on each side, so neither signature verifies.
domain separates the handshakes of different subprotocols (e.g. the BFT gateway and the
router), which a validator runs concurrently under the same Aleo key.