APP下载

一种抗攻击的网络加密算法研究

2018-10-24万伟

现代电子技术 2018年20期
关键词:明文密文密钥

万伟

摘 要: DES网络加密算法在对数据加解密过程中,存在密钥短和运算时间慢的弊端,受到攻击时容易被破解,安全性低。为此,提出基于DES和Feistel的网络加密算法。参考DES算法以及Feistel加密算法,将DES加密算法中的56位密钥扩展处理后得到128位密钥后分割成4轮,采用32位密钥改造算法对各轮密钥实施处理得到子密钥,对各轮中的32位明文和子密钥异或运算,依据运算结果采用Feistel加密算法进行轮函数运算,得到网络数据加密结果。将加密时密文的输出作为解密时的输入,将加密信息恢复成为明文信息,实现网络数据的解密。实验证明所提算法加密效率高,可有效抵抗对网络节点发起的攻击,安全性高。

关键词: 网络加密; 密钥; 密文; 明文; 轮函数; DES算法; Feistel算法

中图分类号: TN915.08?34; TP393 文献标识码: A 文章编号: 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

0 引 言

21世纪是一个信息化的时代,承载信息即是数据,数据的传递构建了信息的交流。网络中的数据都是经介质实施传递,导致网络数据经常会受到各种恶意或无意的攻击,因此,网络数据的安全性非常重要。计算机病毒、其他方法的数据采集、中断、修改等都会让网络数据的传递受到影响,网络加密技术可有效保护网络数据信息,通过加密算法可以实现数据信息的安全传递[1]。在信息安全领域中,基于分组密码的研究是学者分析的重点内容,同时也获得了一些成就。传统网络在网络节点传递数据时,节点的更新时间较长[2],易产生网络无新密钥保护的阶段,采用网络加密技术可有效保护数据信息,采用DES网络加密算法时,其密钥较短,运算时间长,受到攻击时易被破解,数据信息便会泄漏[3]。因此,提出基于DES和Feistel的网络加密算法,提高网络加密效率和安全性。

1 基于DES和Feistel的网络加密算法

1.1 DES加密算法

DES加密的具体过程如图1所示。加密方案主要由明文和密钥组成,DES加密算法的明文和密钥长度分别为64位和56位。明文处理主要分成三个步骤:第一步,通过初始置换(IP)将64位网络数据明文进行处理后重新排列;第二步,通过同一函数处理16轮置换和代换,输入网络数据明文和密钥的函数即是最后一轮迭代后得到的64位输出,预输出则是通过将该64位输出的左半部分和右半部分互换得到[4];第三步,与初始置换(IP)互逆的逆初始置换(IP?1)处理预输出得到64位的网络数据密文。

利用56位网络数据密钥进行加密的过程用图1的右半边进行描述,密钥通过置换后再经过循环左移和其他置换得到各子密钥[Ki],各轮的迭代加密均使用[Ki]。在置换函数相同的条件下,重复迭代的子密钥会导致获取的子密钥并不一样。

猜你喜欢

明文密文密钥
探索企业创新密钥
一种针对格基后量子密码的能量侧信道分析框架
一种支持动态更新的可排名密文搜索方案
基于模糊数学的通信网络密文信息差错恢复
密码系统中密钥的状态与保护*
一种对称密钥的密钥管理方法及系统
奇怪的处罚
基于ECC的智能家居密钥管理机制的实现
奇怪的处罚