Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Introduction

This document specifies the application layer of the Trezor-Host protocol (THP). For general information about the protocol, and lower protocol layers, see specification.md.

Application layer

The THP application layer has the following structure:

OffsetSizeField nameDescription
01session_idA single byte identifying the session.
12message_typeBig-endian encoded protobuf-message's type.
3varprotobuf_encoded_messageMessage encoded using protocol buffers v2.

Session vs. channel

THP Channel represents a single encrypted connection ("encrypted channel"). Each channel can contain multiple sessions. A (standard) session represents a single passphrase-wallet. Each session can have arbitrary passphrase (or none), there can be multiple sessions with the same passphrase.

Session

A new session is created by sending a ThpCreateNewSession with desired parameters to the Trezor.

Seedless sessions

Seedless sessions are a special kind of sessions. These sessions can be used for operations that do not require the seed to be derived - for instance management tasks. Only seedless sessions can be used on uninitialized devices.