Skip navigation

DSpace

機構典藏 DSpace 系統致力於保存各式數位資料(如:文字、圖片、PDF)並使其易於取用。

點此認識 DSpace
DSpace logo
English
中文
  • 瀏覽論文
    • 校院系所
    • 出版年
    • 作者
    • 標題
    • 關鍵字
    • 指導教授
  • 搜尋 TDR
  • 授權 Q&A
    • 我的頁面
    • 接受 E-mail 通知
    • 編輯個人資料
  1. NTU Theses and Dissertations Repository
  2. 電機資訊學院
  3. 資訊工程學系
請用此 Handle URI 來引用此文件: http://tdr.lib.ntu.edu.tw/jspui/handle/123456789/87731
完整後設資料紀錄
DC 欄位值語言
dc.contributor.advisor陳偉松zh_TW
dc.contributor.advisorTony Tanen
dc.contributor.author陳翰霆zh_TW
dc.contributor.authorHan-Ting Chenen
dc.date.accessioned2023-07-19T16:10:13Z-
dc.date.available2023-11-09-
dc.date.copyright2023-07-19-
dc.date.issued2023-
dc.date.submitted2023-06-17-
dc.identifier.citation[1] D. J. Bernstein and B.-Y. Yang. Fast constant-time gcd computation and modular in version. 2019(3):340–398, 2019. https://tches.iacr.org/index.php/TCHES/article/view/8298.
[2] p. c. Daniel J. Bernstein and P. Wuille. safegcd-bounds. https://github.com/sipa/safegcd-bounds, 2021.
[3] W. Decker, G.-M. Greuel, G. Pfister, and H. Schönemann. SINGULAR 4-3-0 — A computer algebra system for polynomial computations. http://www.singular.uni-kl.de, 2022.
[4] Y.-F. Fu, J. Liu, X. Shi, M.-H. Tsai, B.-Y. Wang, and B.-Y. Yang. Signed cryptographic program verification with typed cryptoline. In Proceedings of the 2019 ACM SIGSAC Conference on Computer and Communications Security, CCS ’19, page 1591–1606, New York, NY, USA, 2019. Association for Computing Machinery.
[5] P. L. Montgomery. Modular multiplication without trial division. Mathematics of Computation, 44:519–521, 1985.
[6] A. Niemetz, M. Preiner, and A. Biere. Boolector 2.0. J. Satisf. Boolean Model. Comput., 9(1):53–58, 2014.
-
dc.identifier.urihttp://tdr.lib.ntu.edu.tw/jspui/handle/123456789/87731-
dc.description.abstract我們使用形式驗證工具 Cryptoline 驗證兩個利用 Bernstein-Yang 演算法的模反元素程式,其中一個是目前以模數為 2^255-19 最快的 x86 實作。本論文提供了驗證此程式所用到的驗證細節與技巧。我們利用形式化方法驗證了此程式的正確性,也展現了一個形式驗證在證明密碼學系統的可信度上的應用。zh_TW
dc.description.abstractIn this thesis, we conducted formal verification using the Cryptoline tool on two x86 implementations of the Bernstein-Yang algorithm, both designed to operate in constant time. Notably, one of these implementations represents the current fastest constant time modular inversion implementation for prime modulus 2^255-19 on x86. Our study provides comprehensive details and verification techniques for verifying these assembly implementations. By formal methods, the correctness of these implementations is systematically demonstrated. The results of this study provide substantial evidence for the effectiveness of formal verification in ensuring the accuracy and reliability of cryptographic systems.en
dc.description.provenanceSubmitted by admin ntu (admin@lib.ntu.edu.tw) on 2023-07-19T16:10:13Z
No. of bitstreams: 0
en
dc.description.provenanceMade available in DSpace on 2023-07-19T16:10:13Z (GMT). No. of bitstreams: 0en
dc.description.tableofcontentsVerification Letter from the Oral Examination Committee i
Acknowledgements iii
摘要 v
Abstract vii
Contents ix
List of Figures xiii
List of Tables xv
Denotation xix
Chapter 1 Introduction 1
Chapter 2 Preliminary 3
2.1 Modular Inverse Algorithms . . . . . . . . . . . . . . . . . . . . . . 3
2.2 Original Bernstein-Yang Algorithm . . . . . . . . . . . . . . . . . . 4
2.2.1 Definition of 2-adic division steps . . . . . . . . . . . . . . . . . . 4
2.2.2 Iterations of 2-adic division steps . . . . . . . . . . . . . . . . . . . 5
2.2.3 Fast computation of iterations of 2-adic division steps . . . . . . . . 8
2.2.4 Fast modular inversion computation . . . . . . . . . . . . . . . . . 9
2.3 Improved Bernstein-Yang Algorithm . . . . . . . . . . . . . . . . . 11
Chapter 3 Introduction to Cryptoline 13
3.1 Why Formal Verification . . . . . . . . . . . . . . . . . . . . . . . . 13
3.2 What is CRYPTOLINE . . . . . . . . . . . . . . . . . . . . . . . . . . 14
3.2.1 Property . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
3.2.2 The structure of a CRYPTOLINE program . . . . . . . . . . . . . . . 18
3.2.3 CRYPTOLINE instructions . . . . . . . . . . . . . . . . . . . . . . . 19
3.3 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
3.3.1 Examples of modeling . . . . . . . . . . . . . . . . . . . . . . . . 23
3.3.2 CRYPTOLINE tricks . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
3.3.3 Verify an assembly program . . . . . . . . . . . . . . . . . . . . . 31
Chapter 4 Verifying a Simple Implementation 33
4.1 x86 25519 Implementation . . . . . . . . . . . . . . . . . . . . . . . 34
4.1.1 C implementation of fpinv25519.c . . . . . . . . . . . . . . . . . 34
4.2 Verifiy Simple Subroutines . . . . . . . . . . . . . . . . . . . . . . . 39
4.2.1 Verify modular addition . . . . . . . . . . . . . . . . . . . . . . . . 39
4.2.2 Verify conditional modular negation . . . . . . . . . . . . . . . . . 40
4.2.3 Verify signed multiplication with addition . . . . . . . . . . . . . . 40
4.2.4 Verify modular multiplication . . . . . . . . . . . . . . . . . . . . . 41
4.2.5 Verify signed multi-limb multiplication with addition . . . . . . . . 41
4.3 Verify 62 divstep iterations . . . . . . . . . . . . . . . . . . . . . . . 43
4.3.1 Pseudo code of the subroutine . . . . . . . . . . . . . . . . . . . . 43
4.3.2 Verify 1 divstep iteration . . . . . . . . . . . . . . . . . . . . . . . 44
4.3.3 Model the subroutine . . . . . . . . . . . . . . . . . . . . . . . . . 49
4.3.4 Verify signed multi-limb multiplication and shift . . . . . . . . . . . 51
4.3.5 Completeness of verification of the subroutine . . . . . . . . . . . . 52
4.4 Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
Chapter 5 Verifying a Fast Vectorized Implementation 55
5.1 Vectorized x86 25519 Implementation . . . . . . . . . . . . . . . . . 56
5.1.1 Outline of the assembly code . . . . . . . . . . . . . . . . . . . . . 57
5.2 Verify 20 divstep iterations . . . . . . . . . . . . . . . . . . . . . . . 62
5.2.1 An alternative definition of divstep . . . . . . . . . . . . . . . . . . 63
5.2.2 Verify each divstep iteration . . . . . . . . . . . . . . . . . . . . . 64
5.3 Verify vectorized update . . . . . . . . . . . . . . . . . . . . . . . . 67
5.3.1 Pseudo code of the subroutine . . . . . . . . . . . . . . . . . . . . 67
5.3.2 Computing in parallel . . . . . . . . . . . . . . . . . . . . . . . . . 71
5.3.3 Computing with Montgomery multiplication . . . . . . . . . . . . . 72
5.3.4 Verify signed shift right computed with unsigned shift right . . . . . 74
5.3.5 Use a proof from Coq . . . . . . . . . . . . . . . . . . . . . . . . . 75
5.3.6 Reduce the output range . . . . . . . . . . . . . . . . . . . . . . . . 76
5.4 Verify radix 2^30 number multiplication with reduction . . . . . . . . 78
5.5 Verify simple subroutines . . . . . . . . . . . . . . . . . . . . . . . 80
5.6 Interleaving instructions . . . . . . . . . . . . . . . . . . . . . . . . 82
5.7 Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
Chapter 6 Concluding Remarks 85
6.1 Time Consumption . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
6.2 The Verified Results . . . . . . . . . . . . . . . . . . . . . . . . . . 86
References 87
Appendix A — Proof 89
A.1 Proof about arithmetic precision . . . . . . . . . . . . . . . . . . . . 89
Appendix B — Table 91
B.1 Verification Time of the Simple Implementation . . . . . . . . . . . 91
B.2 Verification time of the Fast Vectorized Implementation . . . . . . . 92
-
dc.language.isoen-
dc.subject形式驗證zh_TW
dc.subjectCurve25519zh_TW
dc.subject密碼學實作zh_TW
dc.subject輾轉相除法zh_TW
dc.subject模反元素zh_TW
dc.subject模型檢測zh_TW
dc.subjectformal verificationen
dc.subjectmodel checkingen
dc.subjectmodular inversionen
dc.subjectgcden
dc.subjectcryptographic programsen
dc.subjectCurve25519en
dc.title快速常數時間模反元素演算法程式之形式驗證zh_TW
dc.titleFormal Verification of Fast Constant Time Modular Inverse Algorithm Implementationsen
dc.typeThesis-
dc.date.schoolyear111-2-
dc.description.degree碩士-
dc.contributor.coadvisor王柏堯zh_TW
dc.contributor.coadvisorBow-Yaw Wangen
dc.contributor.oralexamcommittee楊柏因;黃鐘揚zh_TW
dc.contributor.oralexamcommitteeBo-Yin Yang;Chung-Yang Huangen
dc.subject.keyword形式驗證,模型檢測,模反元素,輾轉相除法,密碼學實作,Curve25519,zh_TW
dc.subject.keywordformal verification,model checking,modular inversion,gcd,cryptographic programs,Curve25519,en
dc.relation.page92-
dc.identifier.doi10.6342/NTU202300852-
dc.rights.note同意授權(全球公開)-
dc.date.accepted2023-06-17-
dc.contributor.author-college電機資訊學院-
dc.contributor.author-dept資訊工程學系-
顯示於系所單位:資訊工程學系

文件中的檔案:
檔案 大小格式 
ntu-111-2.pdf887.57 kBAdobe PDF檢視/開啟
顯示文件簡單紀錄


系統中的文件,除了特別指名其著作權條款之外,均受到著作權保護,並且保留所有的權利。

社群連結
聯絡資訊
10617臺北市大安區羅斯福路四段1號
No.1 Sec.4, Roosevelt Rd., Taipei, Taiwan, R.O.C. 106
Tel: (02)33662353
Email: ntuetds@ntu.edu.tw
意見箱
相關連結
館藏目錄
國內圖書館整合查詢 MetaCat
臺大學術典藏 NTU Scholars
臺大圖書館數位典藏館
本站聲明
© NTU Library All Rights Reserved