ATmega644 Smart-Card
Static Public Attributes | Static Private Attributes | List of all members
Protocol Struct Reference

Some definitions of the protocol used for communication between the SmartCard & Terminal. More...

#include <protocol.h>

Collaboration diagram for Protocol:
Collaboration graph

Static Public Attributes

static constexpr byte_t ATR_SEQ [] = {TS, T0, TA1, TD1}
 Answer-to-reset sequence, send at the start.
 
static constexpr uint8_t ATR_LENGTH = 4
 Length of the Answer-to-reset sequence.
 
static constexpr byte_t DATA_IN_HEADER [] = {CLA, INS_DATA_IN, P1, P2, P3}
 T=0 protocol header for incoming data to be decrypted.
 
static constexpr byte_t DATA_OUT_HEADER [] = {CLA, INS_DATA_OUT, P1, P2, P3}
 T=0 protocol header for decrypted outgoing data.
 
static constexpr uint8_t HEADER_LENGTH = 5
 Length of the T=0 protocol headers.
 
static constexpr byte_t ACK_DATA_IN = INS_DATA_IN ^ 0xff
 Acknowledge byte for instruction 0x10.
 
static constexpr byte_t ACK_DATA_OUT = INS_DATA_OUT
 Acknowledge byte for instruction 0xc0.
 
static constexpr byte_t RESPONSE_DECRYPTED [] = {0x61, 0x10}
 Response that is sent after the data to decrypt has been received.
 
static constexpr byte_t RESPONSE_DATA_OUT [] = {0x9d, 0x00}
 Response after sending the decrypted data.
 
static constexpr uint8_t RESPONSE_LENGTH = 2
 Response length.
 

Static Private Attributes

static constexpr byte_t TS = 0x3b
 
static constexpr byte_t T0 = 0x90
 
static constexpr byte_t TA1 = 0x11
 
static constexpr byte_t TD1 = 0x00
 
static constexpr byte_t CLA = 0x88
 
static constexpr byte_t INS_DATA_IN = 0x10
 
static constexpr byte_t INS_DATA_OUT = 0xc0
 
static constexpr byte_t P1 = 0x00
 
static constexpr byte_t P2 = 0x00
 
static constexpr byte_t P3 = 0x10
 

Detailed Description

Some definitions of the protocol used for communication between the SmartCard & Terminal.

Authors
Philipp Karg (phili.nosp@m.pp.k.nosp@m.arg@t.nosp@m.um.d.nosp@m.e)
Date
09.06.2022

The documentation for this struct was generated from the following file: