可信计算中的非对称密码算法FPGA设计与实现

 2022-05-10 08:05

论文总字数:45339字

摘 要

随着计算机的普及和互联网技术的快速发展,信息安全的重要性不言而喻。根据我国组织制定的可信计算平台密码技术方案,为了推进以国内密码算法为基础的可信计算平台的发展,本文根据国家密码局发布的《SM2椭圆公钥密码算法》,研究实现了基于SM2的数字签名系统的FPGA硬件设计。

本文根据国密标准,选取标准中推荐的的安全曲线,在二元域下实现了符合标准的SM2数字签名技术。本文介绍了SM2数字签名等算法的理论基础,分析架构并进行模块化实现和仿真验证。其中针对数字签名系统的核心算法点乘运算采用占据耗时最短、速率最高的标准投影坐标系下的蒙哥马利算法,并通过预计算、调用四个模乘法器和一个模逆单元并行的方式加以优化,使得在密钥宽度为256比特的要求下,较同等设计提高11.78%。二元域中采用字级模乘运算仅需7个时钟周期即可完成一次运算,相比于串行模乘运算的259时钟周期的运算速率,效率大大提高,且避免全并行模乘的大面积电路占用。此外,本项目中控制器均在模块内部,加速模块运行速率。

本设计采用Verilog HDL硬件描述语言进行验证,并使用VIVADO软件进行仿真验证,证明本设计能够正确完成数字签名的的完整过程,并且可以达到4.198Mb/s 的数字签名速度要求。

关键词:TPM,SM2,SM3,数字签名,点乘,字级模乘

Abstract

With the popularization of computers and the rapid development of Internet technology, the importance of information security is self-evident. In order to promote the development of trusted computing platform based on domestic cryptographic algorithms, according to the scheme of cryptographic technology of trusted computing platform formulated by our organization, this paper studies and implements the hardware design of digital signature system based on SM2 in accordance with the SM2 elliptic public key cryptographic algorithm issued by the State Cryptographic Bureau.

According to the national secret standard, this paper chooses the safety curve of recommended in the standard, and implements the standard SM2 digital signature technology in the binary domain. This paper introduces the theoretical basis of SM2 digital signature and other algorithms, analyses the architecture and carries out modular implementation and simulation verification. The Montgomery algorithm in the standard projection coordinate system with the shortest occupancy time and the highest speed is adopted for the point multiplication operation of the digital signature system. The algorithm is optimized by predicting, calling four modular multipliers and one modular inversion unit in parallel, which makes the key width increase by 11.78% compared with the same design under the requirement of 256 bits. In binary domain, word-level modular multiplication only takes seven clock cycles to complete one operation. Compared with 259 clock cycles of serial modular multiplication, the efficiency is greatly improved, and the large area of circuit occupied by full parallel modular multiplication is avoided. In addition, in this project, the controllers are all inside the module to speed up the operation of the module.

Verilog HDL hardware description language is used to verify the design, and VIVADO software is used to verify the simulation. It proves that the design can correctly complete the complete process of digital signature, and can achieve the speed requirement of 4.198Mb/s digital signature.

Keywords: TPM, SM2, SM3, digital signature, Point multiplication, word-level modular multiplication

目 录

独创性声明 I

摘 要 II

Abstract III

第一章 绪论 1

1.1 课题背景和意义 1

1.2国内外研究成果、现状及发展 2

1.3研究内容与指标 3

1.3.1研究内容 3

1.3.2研究指标 3

1.4论文架构 4

第二章 理论基础知识介绍 5

2.1 有限域 5

2.1.1有限域概念 5

2.1.2二元域 5

2.2椭圆曲线 6

2.2.1椭圆曲线概念 6

2.2.2项目系统参数 7

2.3二元域上椭圆曲线的运算 8

2.3.1投影平面坐标系概念 8

2.3.2椭圆曲线的运算规则 8

2.4密码杂凑算法 9

2.4.1概述 9

2.4.2密码杂凑算法在数字签名中的使用 10

2.5数字签名算法 10

2.6 SM2运算层次架构 10

2.7本章小结 11

第三章 SM2数字签名系统架构与算法优化 12

3.1 SM2数字签名系统架构 12

3.2密码协议层算法 12

3.2.1 SM2数字签名密钥对生成算法 12

3.2.2 SM2数字签名生成和验证算法 13

3.2.3 SM2算法可行性证明 14

3.2.4 SM3密码杂凑算法 14

3.3椭圆曲线运算层 17

3.3.1坐标系选取 17

3.3.2点乘算法 17

3.3.3仿射平面坐标系下点加算法 20

3.4二元域运算层算法 21

3.4.1模加减 21

3.4.2模乘 21

3.4.3模平方 23

3.4.4模逆 25

3.5素域运算层算法 27

3.5.1模加减 27

3.5.2模乘 28

3.5.3模逆 28

3.6本章小结 29

第四章 SM2数字签名系统模块化设计与RTL实现 30

4.1 SM2数字签名系统设计 30

4.1.1设计方针 30

4.1.2系统架构 30

4.2密码协议层实现 31

4.2.1 SM2数字签名系统模块 31

4.2.2 SM3密码杂凑模块 34

4.3椭圆曲线层实现 35

4.3.1点乘模块 35

4.3.2仿射平面坐标系下点加模块 37

4.4二元域运算层实现 38

4.4.1模加 38

4.4.2模乘 38

4.4.3模平方 38

4.4.4模逆 39

4.5素域运算层实现 39

4.5.1素域模加减 39

4.5.2素域模乘 39

4.5.3素域模逆 40

4.6本章小结 40

第五章 仿真验证及分析 41

5.1二元域运算单元的功能验证 41

5.1.1模加模块 41

5.1.2模乘模块 41

5.1.3模平方模块 42

5.1.4模逆模块 42

5.2椭圆曲线层运算单元的功能验证 43

5.2.1点乘模块 43

5.2.2仿射平面坐标系下点加模块 43

5.3素域运算单元的功能验证 44

5.3.1模逆 44

5.4密码协议层运算单元的功能验证 45

5.4.1 SM3密码杂凑模块 45

5.4.2 SM2顶层模块密钥生成验证 45

5.4.3 SM2顶层模块数字签名生成验证 46

5.4.4 SM2顶层模块数字签名验证验证 47

5.5性能对比分析 47

5.6本章小结 48

第六章 总结与展望 49

6.1总结 49

6.2展望 49

参考文献 50

致 谢 52

第一章 绪论

1.1 课题背景和意义

这个世界迅速发展,信息技术改变了人们的生活和习惯,带给人们便利的同时,新的信息安全问题也如雨后春笋一般涌现。在当今,信息安全涉及广泛,每个国家的计算机网络都不可避免涉及信息安全问题。与此同时,随着社会信息化和数字化的发展普及,用户对信息安全和隐私保密的重要性认识在不断提高,电子商务近年来也愈发流行,超大量敏感信息在网络上的传输使得网络安全交易变得越来越重要。许多对称加密算法、非对称密码算法、散列算法因此得到产生和发展完善的动力源泉。

剩余内容已隐藏,请支付后下载全文,论文总字数:45339字

您需要先支付 80元 才能查看全部内容!立即支付

该课题毕业论文、开题报告、外文翻译、程序设计、图纸设计等资料可联系客服协助查找;