萬偉
摘 要: DES網(wǎng)絡(luò)加密算法在對(duì)數(shù)據(jù)加解密過程中,存在密鑰短和運(yùn)算時(shí)間慢的弊端,受到攻擊時(shí)容易被破解,安全性低。為此,提出基于DES和Feistel的網(wǎng)絡(luò)加密算法。參考DES算法以及Feistel加密算法,將DES加密算法中的56位密鑰擴(kuò)展處理后得到128位密鑰后分割成4輪,采用32位密鑰改造算法對(duì)各輪密鑰實(shí)施處理得到子密鑰,對(duì)各輪中的32位明文和子密鑰異或運(yùn)算,依據(jù)運(yùn)算結(jié)果采用Feistel加密算法進(jìn)行輪函數(shù)運(yùn)算,得到網(wǎng)絡(luò)數(shù)據(jù)加密結(jié)果。將加密時(shí)密文的輸出作為解密時(shí)的輸入,將加密信息恢復(fù)成為明文信息,實(shí)現(xiàn)網(wǎng)絡(luò)數(shù)據(jù)的解密。實(shí)驗(yàn)證明所提算法加密效率高,可有效抵抗對(duì)網(wǎng)絡(luò)節(jié)點(diǎn)發(fā)起的攻擊,安全性高。
關(guān)鍵詞: 網(wǎng)絡(luò)加密; 密鑰; 密文; 明文; 輪函數(shù); DES算法; Feistel算法
中圖分類號(hào): TN915.08?34; TP393 文獻(xiàn)標(biāo)識(shí)碼: A 文章編號(hào): 1004?373X(2018)20?0028?05
Abstract: The DES network encryption algorithm has the disadvantages of short key and slow operation during the process of data encryption and decryption, and is easy to be cracked and has low security when being attacked. Therefore, a network encryption algorithm based on the DES algorithm and Feistel algorithm is proposed. By referring to the DES algorithm and Feistel encryption algorithm, extension processing of the 56?bit key in the DES encryption algorithm is conducted to obtain the 128?bit key which is then divided into four rounds. The 32?bit key transformation algorithm is adopted to process each round of the key, so as to obtain subkeys. XOR operations are conducted for the 32?bit plaintext and subkey in each round. The Feistel encryption algorithm is adopted to perform round function operation according to the calculation results, so as to obtain the encryption result of network data. The ciphertext output of encryption is taken as the input of decryption, so as to restore the encrypted information to plaintext information and realize network data decryption. The experimental results show that the proposed algorithm has high encryption efficiency, can effectively resist attacks initiated by network nodes, and has high security.
Keywords: network encryption; key; ciphertext; plaintext; round function; DES algorithm; Feistel algorithm
21世紀(jì)是一個(gè)信息化的時(shí)代,承載信息即是數(shù)據(jù),數(shù)據(jù)的傳遞構(gòu)建了信息的交流。網(wǎng)絡(luò)中的數(shù)據(jù)都是經(jīng)介質(zhì)實(shí)施傳遞,導(dǎo)致網(wǎng)絡(luò)數(shù)據(jù)經(jīng)常會(huì)受到各種惡意或無意的攻擊,因此,網(wǎng)絡(luò)數(shù)據(jù)的安全性非常重要。計(jì)算機(jī)病毒、其他方法的數(shù)據(jù)采集、中斷、修改等都會(huì)讓網(wǎng)絡(luò)數(shù)據(jù)的傳遞受到影響,網(wǎng)絡(luò)加密技術(shù)可有效保護(hù)網(wǎng)絡(luò)數(shù)據(jù)信息,通過加密算法可以實(shí)現(xiàn)數(shù)據(jù)信息的安全傳遞[1]。在信息安全領(lǐng)域中,基于分組密碼的研究是學(xué)者分析的重點(diǎn)內(nèi)容,同時(shí)也獲得了一些成就。傳統(tǒng)網(wǎng)絡(luò)在網(wǎng)絡(luò)節(jié)點(diǎn)傳遞數(shù)據(jù)時(shí),節(jié)點(diǎn)的更新時(shí)間較長(zhǎng)[2],易產(chǎn)生網(wǎng)絡(luò)無新密鑰保護(hù)的階段,采用網(wǎng)絡(luò)加密技術(shù)可有效保護(hù)數(shù)據(jù)信息,采用DES網(wǎng)絡(luò)加密算法時(shí),其密鑰較短,運(yùn)算時(shí)間長(zhǎng),受到攻擊時(shí)易被破解,數(shù)據(jù)信息便會(huì)泄漏[3]。因此,提出基于DES和Feistel的網(wǎng)絡(luò)加密算法,提高網(wǎng)絡(luò)加密效率和安全性。
1.1 DES加密算法
DES加密的具體過程如圖1所示。加密方案主要由明文和密鑰組成,DES加密算法的明文和密鑰長(zhǎng)度分別為64位和56位。明文處理主要分成三個(gè)步驟:第一步,通過初始置換(IP)將64位網(wǎng)絡(luò)數(shù)據(jù)明文進(jìn)行處理后重新排列;第二步,通過同一函數(shù)處理16輪置換和代換,輸入網(wǎng)絡(luò)數(shù)據(jù)明文和密鑰的函數(shù)即是最后一輪迭代后得到的64位輸出,預(yù)輸出則是通過將該64位輸出的左半部分和右半部分互換得到[4];第三步,與初始置換(IP)互逆的逆初始置換(IP?1)處理預(yù)輸出得到64位的網(wǎng)絡(luò)數(shù)據(jù)密文。
利用56位網(wǎng)絡(luò)數(shù)據(jù)密鑰進(jìn)行加密的過程用圖1的右半邊進(jìn)行描述,密鑰通過置換后再經(jīng)過循環(huán)左移和其他置換得到各子密鑰[Ki],各輪的迭代加密均使用[Ki]。在置換函數(shù)相同的條件下,重復(fù)迭代的子密鑰會(huì)導(dǎo)致獲取的子密鑰并不一樣。