Skip to main content

validate_message_structure

Function validate_message_structure 

Source
pub fn validate_message_structure(msg: &Message) -> Result<()>
Expand description

Validate structural integrity of a peer-to-peer message.

Validates:

  1. Signature is not empty / all-zero (rejects Signature::Empty and zero-filled Ed25519).
  2. Sender DID (msg.from) is well-formed.

This helper is intentionally not named verify: it does not authenticate the signature. Use verify_message for Ed25519 verification.