Data transfer over the network, from one device to another, takes place through multiple layers of the protocol stack. The Open Systems Interconnection (OSI) model standardized by ISO has seven layers in the protocol stack, working in collaboration to transfer data from one point to another. Data travels from application layer to physical layer on the sender side and vice versa on the receiver side.
Layers of OSI model
The data link layer is further divided into two sublayers:
In case of OPTIGA™ Trust M, the OSI layers used in the protocol stack are application, presentation (optional), transport, network, data link, and physical layers. The data flow from application layer to physical layer is shown in Figure 1.
Figure 1 OPTIGA™ protocol stack
API calls are used to establish the communication and data flow between these layers as shown in Figure 2. See Host library documentation.
Figure 2 APIs used through different layers
On the host MCU, when an application is started, an I2C communication starts between the host and OPTIGA™. This initializes all other layers serially. For example, if the application requires reading data from OPTIGA™, the command to read data flows from presentation layer to physical layer on the host side. Once the physical layer of OPTIGA™ receives the command, buffer is loaded with appropriate data and the upper layer is notified by a callback function. Similarly, all other layers notify their upper layers through an associated callback function.
Layers of OPTIGA™ stack with respect to I2C communication:
Figure 3 Command APDU
Figure 4 Response APDU
Figure 5 Definition of PCTR in presentation layer
The security control (SCTR) byte controls the security services of the presentation layer. This helps in establishing a secure channel (Handshake), protected and transparent communication for the application layer, managing the session context and sending alert messages. Bits 0-1 of SCTR define the type of protection, bits 2-4 define the type of message that is sent and bits 5-7 define the protocol that is used (see Figure 6).
|
Figure 6 Definition of SCTR
Figure 7 Definition of PCTR in transport layer
A frame starts with the frame type including the frame number (FCTR) followed by the packet length (LEN) and the packet data. After the packet data, a 2-byte checksum (FCS) is added to the end.
Figure 8 Data frame structure
Figure 9 Definition of FCTR
Figure 10 Definition of I2C state
For more details on each layer and protocol stack, see the IFX I2C Protocol and OPTIGAä Trust M solution reference manual.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
We use cookies and similar technologies (also from third parties) to collect your device and browser information for a better understanding on how you use our online offerings. This enables us to optimize and personalize your experience with Infineon and to provide you with additional services and information based on your individual profile. Details are available in our privacy policy where you can also change your preferences on cookies at any time.
By technically required cookies we mean cookies without those the technical provision of the online service cannot be ensured. These include e.g. cookies supporting essential services like a smooth reproduction of video or audio footage. So called ‘functional cookies’ are also assigned belonging to this category. Functional cookies store information in order to provide you comfortable use of our online services (e.g. language selection). The legal basis for the processing of personal data by means of cookies of this category is Infineon’s legitimate interest. This includes, among other things, the interest in having a professional external presentation as well as an optimal balancing of the loads on the server due to technical reasons.
By performance and marketing cookies we mean cookies which are technically not required. We use performance and marketing cookies only if you have given us your prior consent. With such cookies, we collect information about how users interact with our website and which pages have been visited. This helps us to understand user activity on our website on an aggregated as well as on a personal level to provide you relevant content and services.