Skip to content

[TSP] Don't send the entire TSP-signed message in the message content's signature field #599

@kevinaboos

Description

@kevinaboos

The TSP SDK's sign_anycast() function returns a single byte array that contains the TSP signature, header, and message payload all in one big contiguous chunk.
This is quite inefficient; ideally, we do not want to send the entire message content in the org.robius.tsp_signature field, because it is already included in the Matrix room message event content itself, meaning that the message payload actually gets sent twice.
The other problem with this is that there is a size limit on the content field, so adding large custom subfields is a nonstarter, which will happen for large messages like long text, images, files, etc.

Instead, we should separate out the TSP signature & header from the message payload itself, and include the non-payload bytes only in the content's org.robius.tsp_signature field.

Blocked on this issue from the TSP SDK. See that issue for more info.

Metadata

Metadata

Assignees

No one assigned

    Labels

    blockedBlocked on another issue or missing featuretspTrust Spanning Protocol

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions