趙君
摘 要:與PC機相比,在手機上實現同樣的算法要求占用空間小、功耗低。高級加密標準(AES)的S盒設計采用查表方式,復雜度較高、消耗功率大,因此,將它用于手機中要對它進行優(yōu)化。本文提出優(yōu)化AES加密算法,將分組長度擴充至256位,增加分組長度能提高算法的安全性;在采用求逆運算的基礎上添加仿射變換,以運算代替查表操作,能減少存儲空間;將字替換、行移位、列混合合并在為成為一個運算步驟,其輸入數據為16位、輸出數據為64位,能提高運算效率。實驗結果表明,該算法既能大幅提升加密強度又能保持高運算效率。
關鍵詞:Android;AES;64位處理器;分組密碼
DOI:10.15938/j.jhust.2017.03.002
中圖分類號: TP305
文獻標志碼: A
文章編號: 1007-2683(2017)03-0008-05
Abstract:Algorithm implemented on the mobile phone is different from one on PC. It requires little storage space and low power consumption. Standard AES Sbox design uses look up table, and has high complexity and high power consumption, so it needs to be optimized when used in mobile phones. In our optimization AES encryption algorithm, the packet length is expanded to 256 bits, which would increase the security of our algorithm; look up table is replaced by adding the affine transformation based on inversion, which would reduce the storage space; operation is changed into 16bit input and 64bit output by merging the three steps, namely SubWords, ShiftRows, MixColumns and AddRoundKey, which would improve the operation efficiency of the algorithm. The experimental results show that our algorithm not only can greatly enhance the encryption strength, but also maintain high computing efficiency.
Keywords:android; AES; 64bit processor; block cipher
從表1中結果可以看出,如果采用查表方式將分組長度提升至256位,將消耗20MB存儲空間,資源消耗過大,無法實現。GAES算法采用運算代替查表,有效減少了存儲空間,但帶來運算速度的減慢。優(yōu)化AES算法通過對算法結構的優(yōu)化,使運算速度提升3倍左右,雖然此速度還是要比標準AES慢25%左右,但換來的是存儲空間的減少、加密強度的提升,此范圍是可以接受的。如果將分組長度繼續(xù)增大,則運算量太大,無法實現。
5 結 論
本文針對64位處理器的Android操作系統(tǒng),對標準AES算法進行優(yōu)化,提出分組長度為256位的優(yōu)化AES加密算法。利用GAES算法存儲空間小,低功耗的特點,使用其S盒的構造方法。并在此基礎上對算法結構做出相應優(yōu)化,使其在64位處理器上的運算速度得到提升。最后通過試驗驗證其執(zhí)行速度比標準AES下降25%左右,這是因為分組長度增加必然帶來運算數據量的增大。但是以此代價換來存儲空間的減少,密碼強度的大幅提升,是可以接受的。
參 考 文 獻:
[1] 駱子玉, 洪璇. AES 算法在多核的安卓平臺下的改進及應用[J]. 計算機應用與軟件, 2017, 34(1): 209-213.
[2] 李暉, 李鳳華, 曹進, 等. 移動互聯(lián)服務與隱私保護的研究進展[J]. 通信學報, 2014, .35(11): 1-11.
[3] 伍均璽. 網絡通信中的加密技術應用[J]. 網絡安全技術與應用, 2015(1): 47-50.
[4] 鐘衛(wèi)東, 孟慶全, 張帥偉, 等. 基于秘密共享的AES的S盒實現與優(yōu)化[J]. 工程科學與技術, 2017, 49(1): 191-196.
[5] 張偉, 高俊雄, 王耘波, 等. 一種優(yōu)化的AES算法及其FPGA實現[J]. 計算機與數字工程, 2017, 45(3): 502-505.
[6] CHO J, SOEKAMTOPUTRA S, CHOI K, et al. Power Dissipation and Area Comparison of 512bit and 1024bit Key AES[J]. Computers & Mathematics with Applications, 2013, 65(9): 1378-1383.
[7] 張詩永, 陳恭亮, 范磊, 等. GAES算法[J]. 密碼學報, 2014,1(2):187-199.
[8] CUI J, HUANG L, ZHONG H, et al. An Improved AES Sbox and Its Performance Analysis[J]. International Journal of Innovative Computing, Information and Control, 2011, 7(5): 2291-2302.
[9] 趙軍, 基于Android平臺加密算法的研究與實現[D]. 南京理工大學, 2012.
(編輯:王 萍)