CN107241183B - 用于aes和rsa混合算法硬件电路的可配置乘法装置 - Google Patents

用于aes和rsa混合算法硬件电路的可配置乘法装置 Download PDF

Info

Publication number
CN107241183B
CN107241183B CN201710395686.2A CN201710395686A CN107241183B CN 107241183 B CN107241183 B CN 107241183B CN 201710395686 A CN201710395686 A CN 201710395686A CN 107241183 B CN107241183 B CN 107241183B
Authority
CN
China
Prior art keywords
bit
domain
multiplication
double
rsa
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201710395686.2A
Other languages
English (en)
Other versions
CN107241183A (zh
Inventor
李冰
杨宇
高洲
顾巍
刘勇
沈克强
王刚
赵霞
董乾
张�林
陈帅
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Southeast University
Original Assignee
Southeast University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Southeast University filed Critical Southeast University
Priority to CN201710395686.2A priority Critical patent/CN107241183B/zh
Publication of CN107241183A publication Critical patent/CN107241183A/zh
Application granted granted Critical
Publication of CN107241183B publication Critical patent/CN107241183B/zh
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/06Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators
    • H04L9/0618Block ciphers, i.e. encrypting groups of characters of a plain text message using fixed encryption transformation
    • H04L9/0631Substitution permutation network [SPN], i.e. cipher composed of a number of stages or rounds each involving linear and nonlinear transformations, e.g. AES algorithms
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/30Public key, i.e. encryption algorithm being computationally infeasible to invert or user's encryption keys not requiring secrecy
    • H04L9/3006Public key, i.e. encryption algorithm being computationally infeasible to invert or user's encryption keys not requiring secrecy underlying computational problems or public-key parameters
    • H04L9/302Public key, i.e. encryption algorithm being computationally infeasible to invert or user's encryption keys not requiring secrecy underlying computational problems or public-key parameters involving the integer factorization problem, e.g. RSA or quadratic sieve [QS] schemes

Landscapes

  • Engineering & Computer Science (AREA)
  • Computing Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Complex Calculations (AREA)

Abstract

本发明公开了一种硬件实现可用于AES和RSA混合算法硬件电路的可配置乘法装置,属于密码算法硬件实现领域。和以往的基于普通乘法器的实现方案相比,该装置电路通过设计特殊的电路架构,采用了大量可配置电路,复用了面积比较大的乘法器和加法器,在额外消耗少量选择器的基础上,能够在一套运算电路中实现AES列混合和RSA乘法两种功能,比单独实现两种运算所消耗的电路面积和使用的逻辑要少。

Description

用于AES和RSA混合算法硬件电路的可配置乘法装置
技术领域
本发明涉及网络数据安全领域,具体属于密码算法硬件实现领域。
背景技术
AES(Advanced Encryption Standard,AES)密码算法,也被称为Rijndael算法,是由美国国家标准技术委员会(National Institute of Standards and Technology,NIST)于2001年提出,用于替代当时已经被攻破的DES(Data Encryption Standard,DES) 密码算法。AES是一种被广泛使用的对称密码算法,其加密和解密采用同一个密钥。
RSA(Rivest Shamir Adleman,RSA)算法于1977年由Ron Rivest,Adi Shamir和Leonard Adleman提出,并以三个人的名字命名。RSA是一种非对称密码算法,其加密和解密采用不同的密钥。
基于AES和RSA的混合密码算法,结合了AES和RSA两种密码的优点,现已被应用于互联网安全协议(Internet Protocol Security,IPSec)、应用于传输层的安全套接协议(Secure Sockets Layer,SSL)与传输层安全协议(Transport Layer Security, TLS)等网络安全协议中。
随着互联网技术的不断发展,对于网络安全的需求日益增强。基于AES和RSA算法的混合密码算法被广泛应用,对于两种算法的运算电路,如果简单的集成两种算法的专用电路,那将耗费比较多的电路面积和逻辑。
发明内容
为了减小AES和RSA混合密码算法电路模块的面积,本发明基于AES算法中的列混合运算和RSA算法中的乘法运算的共性,提出一种可用于AES和RSA混合算法硬件电路的可配置乘法装置,该装置电路既可实现AES算法的列混合运算,也可实现 RSA算法的64bit乘法运算,并且通过设计特殊的电路架构,大量复用两种运算所共同使用的乘法器和加法器,使得本发明所设计的电路要比单独实现两种运算的所消耗的电路面积和使用的逻辑要少。
本发明所采用的技术方案是:
一种用于AES和RSA混合算法硬件电路的可配置乘法装置,其特征在于包括乘法器阵列,加法器阵列和输入切换电路三部分;
本发明利用64个8bit双域乘法器(Dual-field Multiplier,DMUL),采用特殊的乘法器和加法器阵列,实现AES列混合运算和RSA64bit乘法运算。AES列混合运算是把输入128bit 数据看作一个4×4字节的矩阵,然后与一个固定的4×4的转换矩阵相乘,整个矩阵乘法一共要使用64个8bit有限域乘法器和16个有限域加法器。RSA64bit实数域乘法器可以根据乘法规则将其分拆为4个32bit乘法器和1个64bit加法器实现,而1个32bit乘法器可以分拆为4个16bit乘法器和1个32bit加法器实现,而1个16bit乘法器一样可以分拆为4 个8bit乘法器,这样1个RSA所用的64bit的复杂乘法器就被分拆为64个8bit乘法器、 16个32bit加法器、4个64bit加法器和1个128bit加法器组成的乘法器加法器阵列。可以看出,采用如上方案实现的两种运算电路,具有很多相同的逻辑。于是本发明基于支持有限域乘法和实数域乘法的双域乘法器和双域加法器(Dual-field Adder,DADD)构建的,复用了上述相同的逻辑,在同一套电路中实现了可配置的AES列混合和RSA64bit乘法。本发明所提出的装置包含三部分:输入切换电路,乘法器阵列和加法器阵列。
所述乘法器阵列,由64个8bit双域乘法器搭建而成,是本装置的核心电路,是AES的列混合和RSA的64bit乘法器所必须的电路结构,用于实现AES列混合或RSA64bit乘法所需的乘法操作;
所述加法器阵列,由16个32bit双域4-2压缩器和双域超前进位加法器、4个64bit双域4-2压缩器和双域超前进位加法器以及1个128bit双域4-2压缩器和双域超前进位加法器搭建而成,用于将乘法器阵列输出的64个乘法结果按AES列混合或RSA乘法规范组织相加,形成最后的AES列混合或RSA 64bit的乘法结果。
所述输入切换电路,由多个多路选择器构成,用于组织乘法装置的128bit输入数据,根据乘法装置的工作模式,按照AES列混合或RSA乘法的输入方式组织输入数据并提供给乘法器阵列。
具体地,所述的输入切换电路是将AES的列混合128bit输入接口和RSA 64bit乘法器两个64bit乘数共128bit的输入接口,与64个8bit双域乘法器合计1024bit的输入接口相对接,并可实现两种对接方案切换的电路。
和现有混合密码芯片中AES列混合和RSA乘法的实现方案相比,该装置内部大量采用了可配置电路,复用了消耗电路面积较大的乘法器和加法器,在一套运算电路中实现AES列混合和RSA乘法两种功能,使得本发明所设计的电路要比单独实现两种运算所消耗的电路面积和使用的逻辑要少。
附图说明
以下结合附图和具体实施方式来进一步说明。
图1为本发明的内部结构框图。
图2为本发明的内部所使用的8bit双域乘法器电路结构图。
具体实施方式
图1所示为本发明一种可用于AES和RSA混合算法硬件电路的可配置乘法装置的内部结构框图。该装置按照特殊的结构将乘法器和加法器组织组织搭建,实现可配置AES 列混合和RSA 64bit乘法运算。图中利用4个8bit双域乘法器、1个32bit双域4-2压缩器和1个32bit双域超前进位加法器实现了16bit双域乘法器;然后再以4个16bit 双域乘法器、1个64bit双域4-2压缩器和1个64bit双域超前进位加法器实现了32bit 双域乘法器;4个32bit双域乘法器、1个128bit双域4-2压缩器和1个128bit双域超前进位加法器实现了64bit双域乘法器。所以图中所示实现方案一共包括如下3部分: 1.64个8bit乘法器组成的乘法器阵列;2.16个32bit双域4-2压缩器和16个32bit双域超前进位加法器、4个64bit双域4-2压缩器和4个64bit双域超前进位加法器以及1 个128bit双域4-2压缩器和1个128bit双域超前进位加法器组成的加法器阵列;3.输入切换电路。
乘法器阵列是本装置的核心电路,AES的列混合和RSA的64bit乘法器所必须的电路结构。通过前文所述的方案,AES列混合和RSA乘法都需要64个8bit乘法器,两种运算的区别在于64个8bit双域乘法器的输入不同:实现AES列混合时,需要按照AES列混合矩阵乘法的规则将两个矩阵的元素输入到乘法器的乘数端口;而实现RSA乘法时,需要按照64bit乘法拆分为8bit乘法的拆分方案确定各个8bit双域乘法器的输入。将输入数据组织起来根据不同的模式导入乘法器阵列,这一功能在输入切换电路中实现。
图2所示为乘法器阵列中关键部件8bit双域乘法器的结构,该结构基于普通乘法器电路所修改而成,分两条链路实现有限域乘法和实数域乘法的部分积,然后使用双域4-2压缩器(图中4-2DCOM 16b)和双域超前进位加法器(图中DCLA 16b)求得最终的乘法结果。图2中“>>”为实数域乘2(即1bit左移)电路,“×2”为有限域乘2(即1bit左移再约简)电路。在进行乘法运算时,双域乘法器首先将8bit的输入乘数a按照实数域乘法规则连续进行8次移位操作,每次移位生成一个结果,共产生8个实数域移位结果;同时也按照有限域乘法规则连续进行8次移位约简操作,每次移位约简操作生成一个结果,共产生8个有限域移位约简结果。在计算出乘数a的8个实数域移位结果和有限域移位结果后,乘法器需要经过两次选择操作生成部分积:1.根据乘数b的值来生成乘法的部分积(乘数b的对应bit的数值为1则部分积为该移位结果,为0则部分积也为0);2.根据乘法器的工作模式,确定生成部分积时采用8个有限域移位约简结果还是8个实数域移位结果。这两个选择操作利用图中所示多路选择器实现。生成部分积后,在实数域乘法模式下,由双域4-2压缩器和双域超前进位加法器按照实数域乘法规则计算最终的实数域乘法结果,在有限域乘法模式下,则由双域4-2压缩器和双域超前进位加法器按照实数域乘法规则计算最终的有限域乘法结果。
输入切换电路是将AES的列混合128bit输入接口和RSA 64bit乘法器两个64bit乘数共 128bit的输入接口,与64个8bit双域乘法器合计1024bit的输入接口相对接的电路。AES 列混合的矩阵乘法和采用上述方案分拆后的RSA 64bit乘法,虽然都用到了64个8bit双域乘法器,但是在两种运算时每个8bit双域乘法器的乘数都不相同。输入切换电路内部包含多路选择器,使得在乘法装置配置为AES列混合工作模式时,输入切换电路将AES列混合的输入数据和转换矩阵中所有乘法参数都导入到64bit乘法器阵列输入端,而当乘法装置工作在RSA 64bit乘法模式时,输入切换电路将RSA乘法输入的两个64bit乘数,分拆并导入到乘法器阵列输入端。
加法器阵列将64个8bit乘法器输出的结果按照AES列混合或RSA 64bit乘法器的运算规范相加,形成最后的AES列混合或RSA64bit乘法的结果。加法器阵列中有两种结构的加法器:一种是双域4-2压缩器,将4个加数压缩为2个;一种是双域超前进位加法器,将双域4-2压缩器压缩后的2个输入相加为一个结果输出。
按照图1所示结构设计的可配置乘法装置,有两种模式,模式0为AES列混合模式,在电路装置列混合输入端配置128bit的列混合输入,然后在输出口输出128bit列混合输出。模式1为RSA 64bit乘法模式,在电路装置乘法输入端配置64bit乘数A和64bit乘数B,然后在输出口输出乘法器的输出。
以上是本发明的较佳实施例,凡依本发明技术方案所作的改变,所产生的功能作用未超出本发明技术方案的范围时,均属于本发明的保护范围。

Claims (2)

1.一种用于AES和RSA混合算法硬件电路的可配置乘法装置,其特征在于包括乘法器阵列,加法器阵列和输入切换电路三部分;
所述乘法器阵列,由64个8bit双域乘法器搭建而成,用于实现AES列混合或RSA64bit乘法所需的乘法操作;所述乘法器阵列利用4个8bit双域乘法器、1个32bit双域4-2压缩器和1个32bit双域超前进位加法器实现了16bit双域乘法器;然后再以4个16bit双域乘法器、1个64bit双域4-2压缩器和1个64bit双域超前进位加法器实现了32bit双域乘法器;4个32bit双域乘法器、1个128bit双域4-2压缩器和1个128bit双域超前进位加法器实现了64bit双域乘法器;
所述加法器阵列,由16个32bit双域4-2压缩器和双域超前进位加法器、4个64bit双域4-2压缩器和双域超前进位加法器以及1个128bit双域4-2压缩器和双域超前进位加法器搭建而成,用于将乘法器阵列输出的64个乘法结果按AES列混合或RSA乘法规范组织相加,形成最后的AES列混合或RSA64bit的乘法结果;
所述输入切换电路,由多个多路选择器构成,用于组织乘法装置的128bit输入数据,根据乘法装置的工作模式,按照AES列混合或RSA乘法的输入方式组织输入数据并提供给乘法器阵列;所述输入切换电路将AES的列混合128bit输入接口和RSA64bit乘法器两个64bit乘数共128bit的输入接口,与64个8bit双域乘法器合计1024bit的输入接口相对接,在乘法装置配置为AES列混合工作模式时,输入切换电路将AES列混合的输入数据和转换矩阵中所有乘法参数都导入到64bit乘法器阵列输入端,当乘法装置工作在RSA64bit乘法模式时,输入切换电路将RSA乘法输入的两个64bit乘数,分拆并导入到乘法器阵列输入端。
2.如权利要求1所述的用于AES和RSA混合算法硬件电路的可配置乘法装置,其特征在于,所述8bit双域乘法器分两条链路实现有限域乘法和实数域乘法的部分积,使用双域4-2压缩器和双域超前进位加法器求得最终的乘法结果。
CN201710395686.2A 2017-05-27 2017-05-27 用于aes和rsa混合算法硬件电路的可配置乘法装置 Active CN107241183B (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710395686.2A CN107241183B (zh) 2017-05-27 2017-05-27 用于aes和rsa混合算法硬件电路的可配置乘法装置

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710395686.2A CN107241183B (zh) 2017-05-27 2017-05-27 用于aes和rsa混合算法硬件电路的可配置乘法装置

Publications (2)

Publication Number Publication Date
CN107241183A CN107241183A (zh) 2017-10-10
CN107241183B true CN107241183B (zh) 2020-08-25

Family

ID=59984735

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710395686.2A Active CN107241183B (zh) 2017-05-27 2017-05-27 用于aes和rsa混合算法硬件电路的可配置乘法装置

Country Status (1)

Country Link
CN (1) CN107241183B (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110049013B (zh) * 2019-03-14 2021-04-06 广东工业大学 一种基于sm2和rsa加密算法的加解密系统及工作方法

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103793199A (zh) * 2014-01-24 2014-05-14 天津大学 一种支持双域的快速rsa密码协处理器
CN104020980A (zh) * 2008-04-28 2014-09-03 阿尔特拉公司 可配置的混合加法器电路
CN105099672A (zh) * 2015-08-04 2015-11-25 东南大学 混合加密方法及实现该方法的装置

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5070005B2 (ja) * 2007-11-01 2012-11-07 株式会社日立製作所 演算装置および演算方法ならびにコンピュータシステム

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104020980A (zh) * 2008-04-28 2014-09-03 阿尔特拉公司 可配置的混合加法器电路
CN103793199A (zh) * 2014-01-24 2014-05-14 天津大学 一种支持双域的快速rsa密码协处理器
CN105099672A (zh) * 2015-08-04 2015-11-25 东南大学 混合加密方法及实现该方法的装置

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
High throughput reconfigurable cryptographic processor;Gokhan Sayilar;《ACM International Conference on Computer-Aided Design》;20141231;全文 *
基于AES、RSA算法的多模混合加密系统设计;王瑞;《硕士学位论文》;20120430;全文 *
统一架构的 ECC 与 RSA 密码处理器;刘兵;《硕士学位论文》;20140831;全文 *

Also Published As

Publication number Publication date
CN107241183A (zh) 2017-10-10

Similar Documents

Publication Publication Date Title
Ghebleh et al. An image encryption scheme based on irregularly decimated chaotic maps
Rodríguez-Henríquez et al. Cryptographic algorithms on reconfigurable hardware
USRE44697E1 (en) Encryption processor with shared memory interconnect
EP3503460A1 (en) System and method for boolean masked arithmetic addition
Kounavis et al. Encrypting the internet
Güneysu Utilizing hard cores of modern FPGA devices for high-performance cryptography
KR100800468B1 (ko) 저전력 고속 동작을 위한 하드웨어 암호화/복호화 장치 및그 방법
Golic Techniques for random masking in hardware
Rajasekar et al. Design and implementation of power and area optimized AES architecture on FPGA for IoT application
Tan et al. High-speed modular multiplier for lattice-based cryptosystems
Hämäläinen et al. 6.78 gigabits per second implementation of the IDEA cryptographic algorithm
Chawla et al. FPGA implementation of an optimized 8-bit AES architecture: A masked S-Box and pipelined approach
CN107241183B (zh) 用于aes和rsa混合算法硬件电路的可配置乘法装置
Koteshwara et al. Performance comparison of AES-GCM-SIV and AES-GCM algorithms for authenticated encryption on FPGA platforms
US11569980B2 (en) Combined SBox and inverse SBox cryptography
Thangarajan et al. High speed and low power implementation of AES for wireless sensor networks
Ghosh et al. A robust GF (p) parallel arithmetic unit for public key cryptography
Wang et al. An ultra compact block cipher for serialized architecture implementations
Kanda et al. Vedic Multiplier-based International Data Encryption Algorithm Crypto-Core for Efficient Hardware Multiphase Encryption Design
Beuchat FPGA implementations of the RC6 block cipher
Nalini et al. Compact designs of subbytes and mixcolumn for aes
Ueno et al. High throughput/gate FN-based hardware architectures for AES-OTR
Selimis et al. Applying low power techniques in aes mixcolumn/invmixcolumn transformations
Järvinen Studies on high-speed hardware implementation of cryptographic algorithms
Tang et al. PFD—A flexible higher-order masking scheme

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant