Design and Implementation of SMS4 on Java Card

Dawei Zhang · 2009

SMS4 is the first national standard of cryptographic algorithm in China. It is a block cipher with 128 bits key. Because SMS4 is a relatively new algorithm, there are no hardware accelerators specific to it on smartcards and it is not a standard algorithm in Java Card specification until now. In this paper, SMS4 was designed and implemented on Java Card. At first, we designed the architecture and hierarchy of Java Card APIs for SMS4. Two layers structure was given. The basic cipher was implemented in native code and APIs was designed by Java. Secondly, the key interface and key builder class were implemented based on factory pattern. Thirdly, the encryption/decryption algorithm was implemented by SMS4Cipher class based on adapter pattern. At last, we designed the test applets based on our APIs and run them on SLE66CLX800PE hardware emulator. The test results show that the implementation of SMS4 is proven applicable on JavaCard with average encryption/decryption time about 0.68 ms at system clock 30 MHz.

Read the paper · More papers on PaperTik