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/5308
完整後設資料紀錄
DC 欄位值語言
dc.contributor.advisor鄭振牟(Chen-Mou Cheng)
dc.contributor.authorPo-Hsiang Haoen
dc.contributor.author郝柏翔zh_TW
dc.date.accessioned2021-05-15T17:55:35Z-
dc.date.available2014-07-15
dc.date.available2021-05-15T17:55:35Z-
dc.date.copyright2014-07-15
dc.date.issued2014
dc.date.submitted2014-07-10
dc.identifier.citation[Axe12] Emil Axelsson. A generic abstract syntax model for embedded languages. In ACM SIGPLAN Notices, volume 47, pages 323–334. ACM, 2012.
[BCSS98] Per Bjesse, Koen Claessen, Mary Sheeran, and Satnam Singh. Lava: hardware design in haskell. In ACM SIGPLAN Notices, volume 34, pages 174–184. ACM, 1998.
[Che14] W.-H. Chen. A simplification tool for expressions over binary fields using max-sat solver. Master’s thesis, National Taiwan University, June 2014.
[CHH+] Y.-A. Chang, W.-C. Hong, M.-C. Hsiao, B.-Y. Yang, A.-Y. Wu, and C.-M. Cheng. Hydra: An energy-efficient programmable cryptographic coprocessor supporting elliptic-curve pairing over fields of large char- acteristics. To appear in the 9th International Workshop on Security (IWSEC 2014), Hirosaki, Japan, Aug. 2014.
[CKL+ 11] Manuel MT Chakravarty, Gabriele Keller, Sean Lee, Trevor L McDonell, and Vinod Grover. Accelerating haskell array codes with multicore gpus. In Proceedings of the sixth workshop on Declarative aspects of multicore programming, pages 3–14. ACM, 2011.
[DL12] Jintai Ding and Xiaodong Lin. A simple provably secure key exchange scheme based on the learning with errors problem. IACR Cryptology ePrint Archive, 2012:688, 2012.
[EFDM03] Conal Elliott, Sigbjorn Finne, and Oege De Moor. Compiling embedded languages. Journal of Functional Programming, 13(3):455–481, 2003.
[Gil09] Andy Gill. Type-safe observable sharing in haskell. In Proceedings of the 2nd ACM SIGPLAN symposium on Haskell, pages 117–128. ACM, 2009.
[Hug95] John Hughes. The design of a pretty-printing library. In Advanced Functional Programming, pages 53–96. Springer, 1995.
[Hut92] Graham Hutton. Higher-order functions for parsing. J. Funct. Program., 2(3):323–343, 1992.
[KO63] Anatolii Karatsuba and Yu Ofman. Multiplication of multidigit numbers on automata. In Soviet physics doklady, volume 7, page 595, 1963.
[LM99] Daan Leijen and Erik Meijer. Domain specific embedded compilers. In ACM Sigplan Notices, volume 35, pages 109–122. ACM, 1999.
[MCKL13] Trevor L McDonell, Manuel MT Chakravarty, Gabriele Keller, and Ben Lippmeier. Optimising purely functional gpu programs. In Proceedings of the 18th ACM SIGPLAN international conference on Functional programming, pages 49–60. ACM, 2013.
[MM10] Geoffrey Mainland and Greg Morrisett. Nikola: embedding compiled gpu functions in haskell. In ACM Sigplan Notices, volume 45, pages 67–78. ACM, 2010.
[Mon85] Peter L Montgomery. Modular multiplication without trial division. Mathematics of computation, 44(170):519–521, 1985.
[PNH02] Izzet Pembeci, Henrik Nilsson, and Gregory Hager. Functional reactive robotics: An exercise in principled integration of domain-specific languages. In Proceedings of the 4th ACM SIGPLAN international conference on Principles and practice of declarative programming, pages 168–179. ACM, 2002.
[SHH+13] Jie-Ren Shih, Yongbo Hu, Ming-Chun Hsiao, Ming-Shing Chen, Wen- Chung Shen, Bo-Yin Yang, An-Yeu Wu, and Chen-Mou Cheng. Securing m2m with post-quantum public-key cryptography. IEEE J. Emerg. Sel. Topics Circuits Syst., 3(1):106–116, 2013.
[Ver10] Frederik Vercauteren. Optimal pairings. Information Theory, IEEE Transactions on, 56(1):455–461, 2010.
[Yan13] S.-Y. Yang. Code generation for fast pseudo-mersenne prime field arithmetic on arm processors. Master’s thesis, National Taiwan University, July 2013.
dc.identifier.urihttp://tdr.lib.ntu.edu.tw/jspui/handle/123456789/5308-
dc.description.abstract實作密碼學系統時,常見許多多維代數結構間的運算。若要在較低階的組合語言上實作,必須轉換成基本元素的運算。運算數量龐大時,必須有自動化工具來輔助。此外,在低階語言上無法高階地描述系統或演算法,增加程式設計者的困難,以及出錯的可能性。
我們提出一個嵌於Haskell中的特定領域語言,讓程式設計者能以方便的語法和多維的代數結構,描述密碼演算法和系統。程式會被表示成樹狀的表示式,並且由編譯器自動展開代數結構的運算,轉成中間語言,再進行優化並產生目標語言。
編譯器結合了兩個優化器,並且實作了兩種目標語言,分別是Hydra處理器上的組合語言,以及C++,支援的代數結構有擴張體和矩陣。程式設計者也能加入自己所需的代數結構、優化或是目標語言。我們在此特定領域語言上實作了兩個應用:最佳配對和一個基於LWE的密鑰交換系統。
使用此特定領域語言實作密碼系統,可將數學演算法、優化和輸出語言各自獨立,節省重複的工作,並且程式設計者在實作時可把重點放在密碼系統高階的描述。
zh_TW
dc.description.abstractMultidimensional algebraic structures are common in the description of cryptographic systems. They have to be translated to computations between basic elements by automation before being implemented on low-level assembly languages. Besides, the programmer cannot write programs in a high-level way, which makes them more error-prone.
In this thesis, we propose a domain-specific language embedded in Haskell, so that the programmer can implement cryptographic systems in convenient syntax. The computations of algebraic structures will be expanded, supporting extension fields and matrices.
Our compiler is combined with two optimizers, and supports two target languages: Hydra assembly and C++. The programmer can add his own algebraic structures, optimizations, and target language as needed. We also implement two applications in this DSL: optimal pairing and a key exchange with LWE.
The algorithm description, optimizations and code generations is separated and independent. The programmer can focus on the high-level descriptions of the cryptographic systems.
en
dc.description.provenanceMade available in DSpace on 2021-05-15T17:55:35Z (GMT). No. of bitstreams: 1
ntu-103-R01921038-1.pdf: 1132750 bytes, checksum: 6b32646ab744f45dbf195d54620d8b0c (MD5)
Previous issue date: 2014
en
dc.description.tableofcontents1 Introduction 1
1.1 Embedded Domain-Specific Language.................. 2
1.2 Hydra ................................... 3
1.3 Contribution................................ 3
2 Overall Structure 5
3 Language Embedding 6
3.1 Expressions ................................ 6
3.1.1 Standard Mathematical Operators................ 7
3.1.2 Functions ............................. 7
3.2 Let-sharing ................................ 8
3.3 Control Flow ............................... 10
4 Algebraic Structure Expansion 11
4.1 ExtensionField .............................. 11
4.2 A Small Example............................. 11
4.3 Haskell For Maths............................. 12
4.3.1 BaseField............................. 13
4.3.2 Extension Field.......................... 13
4.4 For General Algebraic Structures .................... 15
5 Compiling Embedded Language 17
5.1 Intermediate Representation....................... 17
5.2 Expressions to IR............................. 18
5.2.1 Type Class ............................ 18
5.2.2 Default Implementation ..................... 18
5.2.3 Instance Example......................... 19
6 Optimizations and Code Generation 21
6.1 Common Subexpression Elimination .................. 21
6.2 Linear Register Allocation ........................ 21
6.3 Code Generation ............................. 22
6.3.1 Hydra ............................... 22
6.3.2 C++................................ 23
7 Applications 24
7.1 Pairing................................... 24
7.2 Key Exchange Protocol from LWE ................... 25
8 Summary 26
8.1 RelatedWork ............................... 26
8.2 Future Work................................ 26
Bibliography 28
dc.language.isoen
dc.title為高效率密碼工程設計之特定領域語言zh_TW
dc.titleA Domain-Specific Language for Efficient Cryptographic Engineeringen
dc.typeThesis
dc.date.schoolyear102-2
dc.description.degree碩士
dc.contributor.oralexamcommittee穆信成(Shin-Cheng Mu),楊柏因(Bo-Yin Yang),王柏堯(Bow-Yaw Wang),陳郁方(Yu-Fang Chen)
dc.subject.keyword密碼工程,特定領域語言,Haskell,Hydra處理器,編譯器優化,zh_TW
dc.subject.keywordcryptographic engineering,domain-specific language,Haskell,Hydra coprocessor,compiler optimizations,en
dc.relation.page30
dc.rights.note同意授權(全球公開)
dc.date.accepted2014-07-10
dc.contributor.author-college電機資訊學院zh_TW
dc.contributor.author-dept電機工程學研究所zh_TW
顯示於系所單位:電機工程學系

文件中的檔案:
檔案 大小格式 
ntu-103-1.pdf1.11 MBAdobe 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