Scratchpad memories are often considered as a benefit to the memory capacity and the energy consumption of application-specific embedded systems. In these types of embedded systems, main memories are often vulnerable to external attacks such as bus snooping or memory extraction. Therefore it is desirable to guarantee the security of data in a main memory. Since scratchpad memories are managed by the software, it is possible to deploy encryption techniques by providing an encryption supporting compiler which is aware of scratchpad memories.
In this paper, we present an efficient compiler for Security Aware ScratchPad Memory (SA-SPM), which can ensure the security of main memories in SPM-based embedded systems. Our compiler is a first approach to support a full encryption of memory regions (i.e. stack, heap, code, and static variables) in a SPM-based system, which is difficult due to the conflict between encryption and memory allocation. We then propose a dual encryption mode that can reduce the bit flips in flip-sensitive memories such as non-volatile memories. We release our SA-SPM compiler as an open source for future utilization.
Yejia Di East China Normal University, Chongqing University, Liang Shi Chongqing University, Shuo-Han Chen Academia Sinica, Taipei, Jason Xue City University of Hong Kong, China, Edwin Sha Chongqing University