Due to limited available memory (of the order of Kilobytes) on embedded devices (such as smart cards), we undertake an approach of partitioning the whole program when it does not fit in the memory. The program partitions are downloaded from the server on demand into the embedded device just before execution. We devise a method of partitioning the code and data of the program such that no information regarding the control flow behavior of the program is leaked out. This property is called tamper resistance and it is very important for secure embedded devices such as smart cards which could hold sensitive information and/or carry out critical computation such as financial transactions. A preliminary solution to this problem was proposed in our earlier work [1]. This work proposes a new and more comprehensive solution to the problem. First, we propose a new policy which is based on keeping nothing in terms of partitions on the smart card. This policy is unlike the one in previous work which mandated keeping partitions in memory to which control flow was guaranteed to return. Based on this new policy, a new partitioning algorithm is proposed for minimal safe partitions which reduces their memory requirements over previous work. The drawback of this new policy is however lower execution speed due to frequent communication encountered. In order to not significantly degrade performance, we propose caching frequently executed functions on the smart card without violation of tamper resistance. A framework is designed to determine the set of functions to be cached in conjunction with specific minimal safe partitions. Further reduction in memory requirements is achieved due to the data partitioning.The decrease in memory footprint over the previous method is 27% for code memory and 32.4% for data memory on average. The speed-up over the old method is quite significant when applied to whole programs in large benchmarks (500 times on average). The conclusion is that previous method [1] is not suitable as a whole program partitioning strategy whereas the new proposed method is a viable solution.
[1]
Siva Sai Yerubandi,et al.
Differential Power Analysis
,
2002
.
[2]
Thomas S. Messerges,et al.
Investigations of Power Analysis Attacks on Smartcards
,
1999,
Smartcard.
[3]
Markus G. Kuhn,et al.
Tamper resistance: a cautionary note
,
1996
.
[4]
Monica S. Lam,et al.
Efficient context-sensitive pointer analysis for C programs
,
1995,
PLDI '95.
[5]
Christian S. Collberg,et al.
A Taxonomy of Obfuscating Transformations
,
1997
.
[6]
Richard J. Lipton,et al.
On the Importance of Checking Cryptographic Protocols for Faults (Extended Abstract)
,
1997,
EUROCRYPT.
[7]
David Aucsmith,et al.
Tamper Resistant Software: An Implementation
,
1996,
Information Hiding.
[8]
Bjarne Steensgaard,et al.
Points-to analysis in almost linear time
,
1996,
POPL '96.
[9]
Trevor Mudge,et al.
MiBench: A free, commercially representative embedded benchmark suite
,
2001
.
[10]
Jacques Stern,et al.
Probing Attacks on Tamper-Resistant Devices
,
1999,
CHES.
[11]
M. Kuhn,et al.
The Advanced Computing Systems Association Design Principles for Tamper-resistant Smartcard Processors Design Principles for Tamper-resistant Smartcard Processors
,
2022
.
[12]
Paul C. Kocher,et al.
Timing Attacks on Implementations of Diffie-Hellman, RSA, DSS, and Other Systems
,
1996,
CRYPTO.
[13]
Tao Zhang,et al.
Leakage-proof program partitioning
,
2002,
CASES '02.