Terminal Command Encryption for Smart Card Security
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Current security methods for exchanges between a terminal and an integrated circuit, such as smart cards, are insufficient in protecting against attacks that infer information from APDU headers, leading to vulnerabilities like blocking commands, replay attacks, and reverse engineering, which compromise the confidentiality and integrity of the system.
Innovation Solution
A data transmission method that encrypts command headers and encapsulates them within another command, masking both the command and its size, making it impossible for attackers to deduce the sequence of commands exchanged, while also adding obfuscation data and random elements to further obscure the information.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Ease of operation
If command headers are transmitted in clear text according to ISO 7816-4 protocol, then communication compatibility and ease of operation are improved, but security against inference attacks deteriorates
Solution Approach 1:
The patent creates a copy of the original APDU command structure with modified headers that mimic the appearance of legitimate commands. The terminal generates fake command headers that conform to ISO 7816-4 format but contain encrypted or random data, making it impossible for attackers to infer real command types from observed traffic while maintaining protocol compatibility
Solution Approach 2:
The patent transforms the command header parameters from their original meaningful format (CLA, INS, P1, P2, P3) into encrypted or randomized versions. The transformation preserves the structural parameters (5-byte header format) while changing the semantic content, allowing the terminal to maintain protocol compatibility while preventing inference attacks
2Productivity
If command sizes vary according to actual data needs, then communication efficiency is improved, but security against size-based inference attacks deteriorates
Solution Approach 1:
The patent applies preliminary padding to all commands to reach a predetermined minimum size before transmission. The terminal adds dummy data fields or padding bytes to ensure every command meets a minimum length threshold, preventing attackers from inferring command types based on size variations while maintaining efficient communication for actual data transfer
Solution Approach 2:
The patent modifies the size parameter of commands by adding padding data or using fixed-length data fields. The actual data size is preserved for processing efficiency, but the transmitted command size is standardized or randomized to prevent inference attacks based on packet length analysis
3Reliability
If authentication protocols are implemented to secure data exchanges, then data confidentiality is improved, but vulnerability to command-level inference attacks persists
Solution Approach 1:
The patent segments the APDU command structure into distinct parts: authenticatable data fields and unauthenticatable header fields. The authentication protocol protects the data payload while the header remains encrypted or randomized, creating a segmentation between security-critical and security-non-critical portions of the command structure
Solution Approach 2:
The patent introduces an intermediary encryption layer between the command header and the authentication mechanism. The header is encrypted or randomized before being processed by authentication protocols, acting as a mediator that prevents attackers from inferring command types even when authentication data is exposed
Data Source
Figure 1~2
Figure 3~4
Figure 5~6
AI summary
The invention relates to a data transmission method implemented between a terminal and an integrated circuit, said terminal and said integrated circuit communicating via a data transmission interface. According to the invention, the method comprises at least one iteration of the following steps, implemented by the terminal: - generation (10) of a command (CX) intended for said integrated circuit, said command comprising a command header; - encryption (20) of said command (CX), delivering an encrypted command (CC); - creation (30) of a second command (CY), said command comprising a command header and data, said data being constituted at least in part by said encrypted command (CC); - transmission (40) of said second command (CY) to said integrated circuit.