1. Trang chủ
  2. » Luận Văn - Báo Cáo

Bảo mật bitstream FPGA799

119 21 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Nội dung

BỘ GIÁO DỤC VÀ ĐÀO TẠO TRƯỜNG ĐẠI HỌC BÁCH KHOA HÀ NỘI TRẦN THANH BẢO MẬT BITSTREAM FPGA LUẬN ÁN TIẾN SĨ KỸ THUẬT ĐIỆN TỬ HÀ NỘI – 2014 BỘ GIÁO DỤC VÀ ĐÀO TẠO TRƯỜNG ĐẠI HỌC BÁCH KHOA HÀ NỘI TRẦN THANH BẢO MẬT BITSTREAM FPGA Chuyên ngành: Kỹ thuật điện tử Mã số: 62520203 LUẬN ÁN TIẾN SĨ KỸ THUẬT ĐIỆN TỬ Tập thể hướng dẫn khoa học: PGS TS Phạm Ngọc Nam TS Nguyễn Văn Cường HÀ NỘI - 2014 LỜI CAM ĐOAN Tôi xin cam đoan kết khoa học trình bày luận án thành nghiên cứu thân suốt thời gian làm nghiên cứu sinh chưa xuất công bố tác giả khác Các kết đạt xác trung thực Tác giả luận án Trần Thanh LỜI CẢM ƠN Trước hết, xin bày tỏ lời cảm ơn sâu sắc đến PGS TS Phạm Ngọc Nam TS Nguyễn Văn Cường trực ti ếp hướng dẫn khoa học hỗ trợ mặt để tơi hồn thành luận án sau bốn năm làm nghiên cứu Tôi bày tỏ lịng biết ơn đến Viện Điện tử-Viễn thơng Viện Đào tạo Sau Đại học, Trường Đại học Bách Khoa Hà Nội cho môi trường học t ập nghiên cứu bao gồm sở liệu, phương tiện nghiên cứu nơi làm việc đại tiện nghi Xin cảm ơn thành viên lab ESRC (Embedded System and Reconfigurable Computing Laboration), thư viện Tạ Quang Bửu giúp xây dựng hệ thống thử nghiệm cho luận án Xin cảm ơn tất anh chị em nghiên cứu sinh thuộc Viện Điện tử-Viễn thông chia sẻ kinh nghiệm quý báu học t ập, nghiên cứu, đăng Cùng vượt khó bước hồn thành đề tài nghiên cứu Cuối cùng, tơi dành nhữ ng lời cảm ơn yêu thương đến gia đình tơi: bố mẹ, anh chị đặc biệt vợ Sự động viên, giúp đỡ hi sinh họ động lực mạnh mẽ giúp tơi vượt qua khó khăn để hoàn thành luận án Xin chân thành cảm ơn! Hà Nội, ngày 10 tháng 12 năm 2014 Tác giả luận án Trần Thanh MỤC LỤC Lời cam đoan Lời cảm ơn MỤC LỤC i Danh mục từ viết tắt iv Danh mục thuật ngữ vii Danh mục hình viii Danh mục bảng ix MỞ ĐẦU Xu hướng ph|t triển v{ c|c ứng dụng rộng r~i công nghệ FPGA Tình hình nghiên cứu bảo mật giới v{ mục tiêu nghiên cứu luận |n Tổ chức nội dung luận |n CHƯƠNG LÝ THUYẾT VỀ BẢO MẬT, FPGA VÀ HỆ THỐNG NHÚNG 1.1 Bảo mật 1.1.1 C|c kh|i niệm v{ thuật ngữ 1.1.2 C|c tiêu chí đặc trưng hệ thống m~ mật 1.1.3 C|c thuật to|n m~ mật 1.1.3.1 Ph}n loại thuật to|n m~ mật 1.1.3.2 Độ an to{n c|c thuật to|n m~ mật 11 1.1.3.3 Thuật to|n m~ hóa khóa bí mật AES 13 1.1.3.4 Thuật to|n m~ hóa khóa cơng khai RSA 15 1.1.3.5 H{m băm bảo mật SHA 18 1.1.3.6 Sự kết hợp ba thuật to|n bảo mật hệ thống 22 1.2 FPGA 24 1.2.1 Giới thiệu 24 1.2.2 Các lĩnh vực ứng dụng FPGA 25 1.2.3 Cơng nghệ lập trình FPGA 25 1.2.3.1 Cơng nghệ lập trình dựa SRAM 25 1.2.3.2 Cơng nghệ lập trình dựa flash 27 1.2.3.3 Công nghệ lập trình dựa antifuse 27 1.2.4 Thiết kế v{ bảo mật hệ thống dựa SRAM-based FPGA 29 1.2.4.1 Quy trình thiết kế 29 1.2.4.2 Dữ liệu thiết kế v{ bảo mật thiết kế 30 1.3 Hệ thống nhúng 31 i 1.3.1 Giới thiệu 31 1.3.2 Các lĩnh vực ứng dụng hệ thống nhúng 33 1.3.3 C|c th|ch thức v{ bảo mật hệ thống nhúng 33 1.4 Bảo mật bitstream hệ thống nhúng cấu hình lại phần 34 1.4.1 Hệ thống cấu hình lại phần 34 1.4.1.1 Cấu hình lại phần động 36 1.4.1.2 C|c ưu điểm cấu hình lại phần 37 1.4.2 Nguy đe dọa bảo mật v{ tính cấp thiết bảo mật thiết kế hệ thống nhúng dựa FPGA 38 1.5 Kết luận chương 40 CHƯƠNG 41 FRAMEWORK VÀ GIAO THỨC CẬP NHẬT AN TOÀN TỪ XA 41 2.1 Xây dựng mô tả cấu trúc Framework 41 2.1.1 C|c th{nh phần phía nh{ cung cấp dịch vụ 43 2.1.2 C|c th{nh phần phía người dùng 44 2.1.3 Truyền thông hệ thống người dùng v{ nh{ cung cấp dịch vụ 45 2.2 Giao thức cập nhập 46 2.2.1 C|c giả định 47 2.2.2 Giao thức cập nhật từ xa an to{n 47 2.2.2.1 Thuật to|n - Thuật to|n bên phía người dùng FPGA 48 2.2.2.2 Thuật to|n - Thuật to|n bên phía m|y chủ nh{ cung cấp 50 2.2.3 Ph}n tích bảo mật 51 2.2.3.1 Tính bí mật v{ tính x|c thực 51 2.2.3.2 Gi| trị c|c tham số 52 2.2.3.3 Điểm giao thức 53 2.3 Giao thức trao đổi khóa 54 2.3.1 Giao thức trao đổi khóa qua trung t}m x|c thực 55 2.3.1.1 Thuật to|n - Thuật to|n bên phía nh{ thiết kế hệ thống 56 2.3.1.2 Thuật to|n – Thuật to|n bên phía nh{ cung cấp IP 56 2.3.1.3 Thuật to|n – Thuật to|n bên phía trung t}m x|c thực 56 2.3.2 Giao thức trao đổi khóa qua không qua trung t}m x|c thực 57 2.3.2.1 Thuật to|n 6: Thuật to|n bên phía nh{ tích hợp hệ thống 57 2.3.2.2 Thuật to|n 7: Thuật to|n bên phía nh{ cung cấp IP 58 2.3.2.3 Thuật to|n 8: Thuật to|n bên phía nh{ cung cấp dịch vụ 58 2.3.2.4 Thuật to|n 9: Thuật to|n bên phía người dùng 58 2.3.3 Ph}n tích bảo mật 58 2.4 Đánh giá so sánh với nghiên cứu liên quan 59 2.5 Kết luận chương 60 ii CHƯƠNG 61 NÂNG CAO HIỆU NĂNG VÀ TÍNH LINH HOẠT TRONG BẢO MẬT BITSTREAM CỦA HỆ THỐNG CẤU HÌNH LẠI ĐƯỢC TỪNG PHẦN DỰA TRÊN FPGA 61 3.1 Tối ưu hóa tài nguyên phần cứng 61 3.1.1 Tối ưu hóa t{i nguyên logic 61 3.1.1.1 Thực phần tĩnh 62 3.1.1.2 Thực c|c ph}n vùng cấu hình lại 63 3.1.1.3 Ph}n tích v{ đ|nh gi| kết 63 3.1.2 Tối ưu vùng nhớ lưu trữ 64 3.1.2.1 X}y dựng thuật to|n nén RLE m|y chủ cập nhật 65 3.1.2.2 X}y dựng thuật to|n giải nén RLE hệ thống nhúng 66 3.1.2.3 Đ|nh gi| kết 66 3.2 Nâng cao hiệu hệ thống 67 3.2.1 X}y dựng hệ thống 68 3.2.1.1 Mô tả hoạt động hệ thống 68 3.2.1.2 X}y dựng c|c khối chức 69 3.2.2 Thực v{ đ|nh gi| kết 70 3.3 Đánh giá so sánh với nghiên cứu liên quan 71 3.4 Kết luận chương 72 CHƯƠNG 74 MÔ HÌNH THỬ NGHIỆM HỆ THỐNG CẤU HÌNH LẠI ĐƯỢC TỪNG PHẦN DỰA TRÊN FPGA 74 4.1 Xây dựng hệ thống 74 4.1.1 C{i đặt hệ thống 74 4.1.2 Công cụ thực thiết kế 75 4.1.3 Thiết lập vi xử lý nhúng MicroBlaze v{ giao thức TCP/IP 78 4.1.4 X}y dựng hệ thống cấu hình lại phần 82 4.2 Kết đánh giá 83 4.2.1 Giải ph|p phần mềm 84 4.2.2 Giải m~ v{ x|c thực phần cứng 85 4.2.3 Giải ph|p kết hợp phần cứng v{ phần mềm 86 4.3 Kết luận chương 86 KẾT LUẬN VÀ HƯỚNG PHÁT TRIỂN 87 Đóng góp khoa học luận |n 87 Hướng ph|t triển thời gian tới 88 DANH MỤC CÁC CƠNG TRÌNH KHOA HỌC ĐÃ CÔNG BỐ CỦA LUẬN ÁN 89 TÀI LIỆU THAM KHẢO 91 PHỤ LỤC 99 iii Danh mục từ viết tắt 3DES Triple DES Thực DES ba lần AES Advanced Encryption Standard Tiêu chuẩn mã hóa tiên tiến AES-CBC AES-Cipher-block chaining Mã hóa AES dạng xâu chuỗi AES-GCM AES-Galois/Counter Mode Mã hóa AES dạng Galois/Counter AHDL Altera Hardware Description Language Ngôn ngữ miêu tả phần cứng Altera API Application Programming Interface Giao diện lập trình ứng dụng ASIC Application-Specific Integrated Circuit Vi mạch tích hợp chuyên dụng AXI Advanced eXtensible Interface Giao diện mở rộng tiên tiến CF CompactFlash Thẻ nhớ flash CLB Configurable Logic Block Khối logic cấu hình CMOS Complementary Metal-OxideSemiconductor Thuật ngữ loại công nghệ dùng để chế tạo vi mạch tích hợp CuM Client Update Manager Trình quản lý cập nhật máy trạm DCM Digital Clock Management Khối quản lý xung đồng hồ DDRAM Double Data Rate Random Access Memory Bộ nhớ truy cập ngẫu nhiên nhân đôi tốc độ DES Data Encryption Standard Tiêu chuẩn mã hóa liệu DHCP Dynamic Host Configuration Protocol Giao thức cấu hình địa động DIACAP Department of Defense Information Assurance Certification and Quy trình kiểm định chứng nhận đảm bảo thông DMA Direct Memory Access ố Khối truy cập nhớ trực tiếp DNS Domain Name Server Hệ thống phân dải tên miền Internet DSA Digital Signature Algorithm Thuật toán chữ ký số EDK Embedded Development KIT Bộ công cụ phát triển nhúng iv EEPROM Electrically Erasable Programmable Read-Only Memory Bộ nhớ đọc lập trình xóa điện EPROM Erasable Programmable Read Only Memory Bộ nhớ đọc lập trình xóa FIFO First In First Out Vào trước trước FIPS Federal Information Processing Standards Tiêu chuẩn xử lý thông tin liên bang (Mỹ) FPGA Field Programable Gate Array Mảng cổng lập trình chỗ FSMD Finite State Machine With Datapath Máy trạng thái hữu hạn với đường liệu GPIO General Purpose Input Output Các giao tiếp vào mục đích chung HDL Hardware Description Language Ngôn ngữ miêu tả phần cứng HMAC a keyed-Hash Message Authentication Code Mã xác thực tin HTTP Hypertext Transfer Protocol Giao thức truyền siêu văn HWICAP Hardware ICAP Cổng truy nhập cấu hình bên phần cứng IC Integrated Circuit Vi mạch tích hợp, mạch tổ hợ p ICAP Internal Configuration Access Port Cổng truy nhập cấu hình bên ICMP Internet Control Message Protocol Giao thức thông điệp điều khiển Internet IDEA International Data Encryption Algorithm Thuật tốn mã hóa liệu liên mạng IGMP Internet Group Message Protocol Giao thức thông điệp nhóm Internet IOB Input Output Block Khối vào IP Intellectual Property Lõi sở hữu trí tuệ ISE Integrated Software Environment Mơi trường phần mềm tích hợp Là cơng cụ Xilinx cung cấp cho nhà phát triển phân tích tổng hợp thiết kế HDL LUT Logic Look-up Table Bảng tra logic LwIP Light weight Internet protocol Giao thức Internet hạng nhẹ LZW Lempel - Zip and Welch Phương pháp nén LZW v MD5 Message-Digest algorithm Thuật toán băm MD5 MIPS Million instructions per second Triệu lệnh giây NIST National Institute of Standards and Technology Viện tiêu chuẩn công nghệ quốc gia Hoa Kỳ OEM Original Equipment Manufacturer Nhà sản xuất thiết bị gốc OTP One Time Programmable Lập trình lần PKC Public Key Cipher Mã hóa khóa cơng khai PLD Programmable logic Device Thiết bị logic khả trình RAD-HARD Radiation Hardening RC5 Rivest Cipher - Thuật toán mã hóa khối khóa đối xứng thiết kế Ronald Rivest RLE Run-Length Encoding Mã hóa độ dài loạt ROM Read-Only Memory Bộ nhớ đọc RSA Rivest, Shamir and Adleman algorithm Thuật tốn mã hóa cơng khai RTL Register Transfer Level Mạch tổ hợp mức ghi SDK Software Development KIT Bộ công cụ phát triển phần mềm Xilinx SHA Secure Hash Algorithm Thuật tốn băm an tồn SKC Secret Key Cipher Mã hóa khóa bí mật SRAM Static Random Access Memory Bộ nhớ truy cập ngẫu nhiên tĩnh SuM Server Update Manager Trình quản lý cập nhật máy chủ TCP/IP Transmission Control Protocol/Internet Protocol Giao thức điều khiển giao vận/Giao thức liên mạng UART Universal Asynchronous Receiver/Transmitter Bộ truyền nhận nối tiếp không đồng UDP User Datagram Protocol Giao thức gói liệu người dùng VHDL VHSIC Hardware Description Language Ngôn ngữ miêu tả phần cứng VHSIC VHSIC Very High Speed Integrated Circuit Mạch tích hợp tốc độ cao VLSI Very-large-scale integration Mạch tích hợp cao XPS Xilinx Platform Studio Bộ công cụ xây dựng phần cứng hệ thống nhúng Xilinx vi [15] L Yuan, G Qu, L Ghout, and A Bouridane, “VLSI Design IP Protection: Solutions, New Challenges, and Opportunities,” First NASA/ESA Conf Adapt Hardw Syst., pp 469–476, 2006 [16] W Liang, D Zhang, Z You, W Li, and H Osama, “A Survey of Techniques for VLSI IP Protection,” Inf Technol J., vol 12, no 12, pp 2324–2331, 2013 [17] T Kean, “Secure Configuration of Field Programmable Gate Arrays,” in Proceedings of the 11th International Conference on Field-Programmable Logic and Applications, 2001, pp 142–151 [18] L Bossuet, G Gogniat, and W Burleson, “Dynamically Configurable Security for SRAM FPGA Bitstreams,” in Proceedings of the 18th International Parallel and Distributed Processing Symposium (IPDPS’04), 2004, vol 00, no C, pp 146–154 [19] Y Hori, T Katashita, H Sakane, and K Toda, “Bitstream Protection in Dynamic Partial Reconfiguration Systems,” IEICE Trans Inf Syst., vol E96-D, no 11, pp 2333–2343, 2013 [20] G Gogniat, T Wolf, and W Burleson, “Reconfigurable Security Support for Embedded Systems,” in Proceedings of the 39th Annual Hawaii International Conference on System Sciences (HICSS’06), 2006, p 250a–250a [21] T Kean, “Cryptographic rights management of FPGA intellectual property cores,” in Proceedings of the 2002 ACM/SIGDA tenth international symposium on Fieldprogrammable gate arrays - FPGA ’02, 2002, pp 113–118 [22] J P Acle, M S Reorda, and M Violante, “Implementing a safe embedded computing system in SRAM-based FPGAs using IP cores: A case study based on the Altera NIOS-II soft processor,” 2011 IEEE Second Lat Am Symp Circuits Syst., pp 1–5, 2011 [23] R Maes, D Schellekens, and I Verbauwhede, “A Pay-per-Use Licensing Scheme for Hardware IP Cores in Recent SRAM-Based FPGAs,” IEEE Transactions on Information Forensics and Security, vol 7, no pp 98–108, 2012 [24] N C N Couture and K B K K B Kent, “Periodic licensing of FPGA based intellectual property,” in 2006 IEEE International Conference on Field Programmable Technology, 2006, pp 357–360 [25] W Adi, R Ernst, S Bassel, and A Hanoun, “VLSI design exchange with intellectual property protection in FPGA environment using both secret and publickey cryptography,” Emerg VLSI …, vol 00, pp 24–32, 2006 [26] T Guneysu, B Moller, and C Paar, “Dynamic Intellectual Property Protection for Reconfigurable Devices,” 2007 Int Conf Field-Programmable Technol., 2007 [27] J Castillo, P Huerta, and J I Martínez, “Secure IP downloading for SRAM FPGAs,” Microprocess Microsyst., vol 31, no 2, pp 77–86, 2007 92 [28] K Kepa, F Morgan, and K Kosciuszkiewicz, “IP protection in partially reconfigurable FPGAs,” in Field Programmable Logic and Applications, 2009 FPL 2009 International Conference on, 2009, pp 403–409 [29] K Kepa, F Morgan, K Kosciuszkiewicz, and T Surmacz, “SeReCon: A Secure Dynamic Partial Reconfiguration Controller,” 2008 IEEE Comput Soc Annu Symp VLSI, pp 292–297, 2008 [30] F Devic, L Torres, and B Badrignans, “Secure Protocol Implementation for Remote Bitstream Update Preventing Replay Attacks on FPGA,” in 2010 International Conference on Field Programmable Logic and Applications, 2010, pp 179–182 [31] S Drimer, “A protocol for secure remote updates of FPGA configurations,” Lect Notes Comput Sci., vol 5453, pp 50–61, 2009 [32] A Braeken, J Genoe, S Kubera, N Mentens, A Touhafi, I Verbauwhede, Y Verbelen, J Vliegen, and K Wouters, “Secure remote reconfiguration of an FPGAbased embedded system,” in 6th International Workshop on Reconfigurable Communication-Centric Systems-on-Chip (ReCoSoC), 2011, pp 1–6 [33] A K Jain, L Yuan, P R Pari, and G Qu, “Zero overhead watermarking technique for FPGA designs,” in Proceedings of the 13th ACM Great Lakes Symposium on VLSI - GLSVLSI ’03, 2003, pp 147–152 [34] J Zhang, Y Lin, Q Wu, and W Che, “Watermarking FPGA Bitfile for Intellectual Property Protection,” Radioengineering, pp 764–771, 2012 [35] L G Bertrand and L Bossuet, “Automatic low-cost IP watermarking technique based on output mark insertions,” Des Autom Embed Syst., vol 16, no 2, pp 71– 92, May 2012 [36] NIST., “SP800-12: An Introduction to Computer Security,” 1995 [37] W Stallings, Cryptography And Network Security: Principles and Practices, 5th ed Prentice Hall, 2006 [38] NIST., “FIPS 46-3: Data Encryption Standard (DES),” 2009 [39] R L Rivest, “The RC5 Encryption Algorithm,” in Proceedings of the Second International Workshop on Fast Software Encryption (FSE) 1994, 1994, pp 86–96 [40] B Schneier, “Description of a new variable-length key, 64-bit block cipher (Blowfish),” in Fast Software Encryption SE - 24, R Anderson, Ed Springer Berlin Heidelberg, 1994, pp 191–204 [41] NIST., “FIPS 197: Advanced Encryption Standard (AES),” 2001 [42] R L Rivest, A Shamir, and L Adleman, “A method for obtaining digital signatures and public-key cryptosystems,” Commun ACM, vol 21, no 2, pp 120–126, 1978 93 [43] NIST., “FIPS 186-3: Digital Signature Standard (DSS),” 2009 [44] R L Rivest, “RFC 1321: The MD5 Message-Digest Algorithm,” MIT Laboratory for Computer Science and RSA Data Security, Inc., 1992 [Online] Available: http://www.rfc-editor.org/rfc/rfc1321.txt [45] NIST., “FIPS 180-4: Secure Hash Standard (SHS),” 2012 [46] H W H Wang, B S B Sheng, C C Tan, and Q L Q Li, “Comparing Symmetric-key and Public-key Based Security Schemes in Sensor Networks: A Case Study of User Access Control,” in 2008 The 28th International Conference on Distributed Computing Systems, 2008 [47] Y Kumar, R Munjal, and H Sharma, “Comparison of Symmetric and Asymmetric Cryptography with Existing Vulnerabilities and Countermeasures,” Int J Comput Sci Manag Stud., vol 11, no 03, pp 60–63, 2011 [48] C K Gary, “An Overview of Cryptography,” 2014 [Online] Available: http://www.garykessler.net/library/crypto.html [49] M Whitman and H Mattord, Principles of Information Security, 4th ed Course Technology, 2012 [50] A Bogdanov, D Khovratovich, and C Rechberger, “Biclique Cryptanalysis of the Full AES,” Lect Notes Comput Sci., vol 7073, pp 344–371, 2011 [51] H Lynn, “National Policy on the Use of the Advanced Encryption Standard (AES) to Protect National Security Systems and National Security Information,” Retrieved 2011-02-15., 2003 [Online] Available: http://csrc.nist.gov/groups/ST/toolkit/documents/aes/CNSS15FS.pdf [52] R Kefa, “Implementing Secure RSA Cryptosystens Using Your Own Cryptographic JCE Provider,” J Aplpied Sci., vol 6, no 3, pp 482–510, 2006 [53] B Kaliski, “RFC 1319: The MD2 Message-Digest Algorithm,” Network Working Group, RSA Laboratories, 1992 [Online] Available: http://www.ietf.org/rfc/rfc1319.txt [54] R L Rivest, “RFC 1320: The MD4 Message-Digest Algorithm,” MIT Laboratory for Computer Science and RSA Data Security, Inc., 1992 [Online] Available: http://www.rfc-editor.org/rfc/rfc1320.txt [55] H Dobbertin, “Cryptanalysis of MD5 Compress,” in presented at the rump session of Eurocrypt’96, 1996, pp 5–6 [56] NIST., “FIPS 180-1: Secure Hash Standard,” 1995 [57] M Stevens, “New Collision Attacks on SHA-1 Based on Optimal Joint LocalCollision Analysis,” in Advances in Cryptology – EUROCRYPT 2013 SE - 15, vol 94 7881, T Johansson and P Nguyen, Eds Springer Berlin Heidelberg, 2013, pp 245– 261 [58] X Wang, Y Yin, and H Yu, “Finding Collisions in the Full SHA-1,” in Advances in Cryptology – CRYPTO 2005 SE - 2, vol 3621, V Shoup, Ed Springer Berlin Heidelberg, 2005, pp 17–36 [59] E Thompson, “MD5 Collisions and the Impact on Computer Forensics,” Digit Investig., vol 2, no 1, pp 36–40, Feb 2005 [60] X Wang, D Feng, X Lai, and H Yu, “Collisions for Hash Functions MD4, MD5, HAVAL-128 and RIPEMD,” in IACR Eprint archive, vol 5, 2004, pp 5–8 [61] J Song, R Poovendran, J Lee, and I T., “RFC 4493: The AES-CMAC Algorithm,” Network Working Group, 2006 [Online] Available: http://tools.ietf.org/html/rfc4493 [62] H Krawczyk, M Bellare, and R Canetti, “RFC 2104: HMAC: Keyed-Hashing for Message Authentication,” Network Working Group, 1997 [Online] Available: http://tools.ietf.org/html/rfc2104 [63] D L Perry, VHDL : Programming by Example, vol 452 McGraw-Hill, 2002, p 476 [64] V Pedroni, Circuit Design with VHDL MIT Press, 2004, p 376 [65] P Pong, FPGA prototyping by vhdl examples A Jonh Wiley & Sons, Inc., Publication, 2008, p 457 [66] P Pong, FPGA prototyping by verilog examples A Jonh Wiley & Sons, Inc., Publication, 2008, p 521 [67] S M Trimberger, D McCarty, and T Whitney, Field-programmable gate array technology Springer Science+Business Media, LLC, 1994, p 270 [68] U Farooq, Z Marrakchi, and H Mehrez, “FPGA Architectures: An Overview,” in Tree-based Heterogeneous FPGA Architectures, New York, NY: Springer New York, 2012, pp 7–48 [69] Xilinx, “UG190(V5.4): Virtex-5 FPGA User Guide,” 2012 [Online] Available: http://www.xilinx.com/support/documentation/user_guides/ug190.pdf [70] Altera, “Stratix III Device Handbook , Volume (V2.2),” 2011 [Online] Available: http://www.altera.com/literature/hb/stx3/stratix3_handbook.pdf [71] Microsemi Corporation, “ProASIC3 Flash Family FPGAs with Optional Soft ARM Support,” 2013 [Online] Available: http://www.actel.com/documents/PA3_DS.pdf [72] Microsemi Corporation, “Axcelerator Family FPGAs,” 2012 [Online] Available: http://www.actel.com/documents/AX_DS.pdf 95 [73] I Kuon, R Tessier, and J Rose, “FPGA Architecture: Survey and Challenges,” Found Trends® Electron Des Autom., vol 2, no 2, pp 135–253, 2007 [74] A Kuznetsov, “FPGA design flow overview,” 2011 [Online] Available: http://www.fpgacentral.com/docs/fpga-tutorial/fpga-design-flow-overview [75] J X Zheng and M Potkonjak, “Securing netlist-level FPGA design through exploiting process variation and degradation,” in Proceedings of the ACM/SIGDA international symposium on Field Programmable Gate Arrays - FPGA ’12, 2012, p 129 [76] M Schmid, D Ziener, and J Teich, “Netlist-level IP protection by watermarking for LUT-based FPGAs,” in 2008 International Conference on Field-Programmable Technology, 2008, pp 209–216 [77] R Kastner and T Huffmire, “Threats and Challenges in Reconfigurable Hardware Security,” in Proceedings of the International Conference on Engineering of Reconfigurable Systems and Algorithms (ERSA ’08), 2008, pp 334–345 [78] B Badrignans, R Elbaz, and L Torres, “Secure FPGA configuration architecture preventing system downgrade,” F Program Log Appl 2008 FPL 2008 Int Conf., pp 317–322, 2008 [79] M Peter, Embedded System Design: Embedded Systems Foundations of CyberPhysical Systems, 2nd ed Springer Science+Business Media, 2011, p 400 [80] I.Gonzalez and F.J Gomez-Arribas, “Ciphering algorithms in MicroBlaze-based embedded systems,” in IEEE Proceedings - Computers and Digital Techniques, 2006, pp 87–92 [81] T Huffmire, B Brotherton, R Kastner, T Levin, T D Nguyen, C Irvine, and T Sherwood, “Managing Security in FPGA-Based Embedded Systems,” IEEE Des Test Comput., vol 25, no 6, pp 590–598, №v 2008 [82] F Devic, L Torres, and B Badrignans, “Securing Boot of an Embedded Linux on FPGA,” in 2011 IEEE International Symposium on Parallel and Distributed Processing Workshops and Phd Forum, 2011, pp 189–195 [83] P Cotret, F Devic, G Gogniat, B Badrignans, and L Torres, “Security enhancements for FPGA-based MPSoCs: A boot-to-runtime protection flow for an embedded Linux-based system,” 7th Int Work Reconfigurable Commun Syst., vol 2012, pp 1–8, Jul 2012 [84] Xilinx Inc., “WP365(v.10): Solving Today‟s Design Security Concerns,” 2010 [85] A S D Ci, “DoD Instruction 8500.2, February 6, 2003,” no 8500, pp 1–102, 2003 [86] NIST., “FIPS 180-1: The Keyed-Hash Message Authentication Code,” no July, 2008 96 [87] S D C Radu Stefan, “Bitstream Compression Techniques for Virtex FPGAs,” Proc Int Conf F Program Log Appl., pp 323–328, 2008 [88] J Hwa, P Tulika, and M W Wong, “Configuration Bitstream Compression for Dynamically Reconfigurable FPGAs.” [89] L Haining and G Dawu, “An Authenticated Key Agreement Protocol Resistant to DOS Attack,” in Progress On Cryptography, Springer, 2004, pp 151–156 [90] W Diffie and M Hellman, “New directions in cryptography,” IEEE Trans Inf Theory, vol 22, no 6, pp 644–654, №v 1976 [91] S Deshpande, “Symmetric Key Management: A new approach,” Int J Eng Comput Sci., vol 1, no 3, pp 125–136, 2012 [92] D R Kuhn, V C Hu, W T Polk, and C Shu-Jen, “SP 800-32: Introduction to Public Key Technology and the Federal PKI Infrastructure,” National Institute of Standards and Technology, no February, pp 1–54, 2001 [93] K Park and H Kim, “Remote FPGA Reconfiguration Using MicroBlaze or PowerPC Processors,” Xilinx int., Application Note, 2006 [Online] Available: http://www.xilinx.com/support/documentation/application_notes/xapp441.pdf [94] Altera Corp., “Remote System Upgrades with Stratix III Devices,” Altera Corporation, 2010 [Online] Available: http://www.altera.com/literature/hb/stx3/stx3_siii51012.pdf [95] A Dandalis and V K Prasanna, “Configuration compression for FPGA-based embedded systems,” in Proceedings of the 2001 ACM/SIGDA ninth international symposium on Field programmable gate arrays - FPGA ’01, 2001, pp 173–182 [96] Xilinx Inc., “DS817: LogiCORE IP AXI HWICAP (v2.02.a),” 2012 [97] S.-W Seong and P Mishra, “Bitmask-Based Code Compression for Embedded Systems,” Comput Des Integr Circuits Syst IEEE Trans., vol 27, no 4, pp 673– 685, 2008 [98] W S Steven, The Scientist and Engineer’s Guide to: Digital Signal Processing, Second Edi California Technical Publishing, 1999, p 664 [99] D Michael, “Run Length Encoding (RLE) Discussion and Implementation,” 2010 [Online] Available: http://michael.dipperstein.com/rle/ [100] Xilinx Inc., “UG081: MicroBlaze Processor Reference Guide,” Xilinx int., Application Note, 2012 [Online] Available: http://www.xilinx.com/support/documentation/sw_manuals/xilinx14_2/mb_ref_guid e.pdf [101] Xilinx Inc., “DS759: LogiCORE IP AXI Ethernet (v3.01a),” Xilinx int., Application Note, 2012 [Online] Available: 97 http://www.xilinx.com/support/documentation/ip_documentation/axi_ethernet/v3_0 1_a/ds759_axi_ethernet.pdf [102] N Kavvadias, V Giannakopoulou, and K Masselos, “FSMD-Based Hardware Accelerators for FPGAs,” in Embedded System - Theory and Design Methodology, K Tanaka, Ed InTech, 2012, pp 143–166 [103] Xilinx Inc., “Xilinx DS844 LogiCORE IP AXI Master Burst (v1.00.a),” Product Specification, 2011 [Online] Available: http://www.xilinx.com/support/documentation/ip_documentation/axi_master_lite/v2 _00_a/ds836_axi_master_lite.pdf [104] Xilinx Inc., “ML605 Reference Design User Guide,” Xilinx int., Application Note, 2009 [Online] Available: http://www.xilinx.com/support/documentation/boards_and_kits/ug535.pdf [105] Digilent Inc., “AtlysTM Board Reference Manual,” Digilent Inc., 2013 [Online] Available: http://www.digilentinc.com/Data/Products/ATLYS/Atlys_rm_V2.pdf [106] Xilinx Inc., “Embedded System Tools Reference Manual,” EDK, 2012 [Online] Available: http://www.xilinx.com/support/documentation/sw_manuals/xilinx14_1/est_rm.pdf [107] Xilinx Inc., “Xilkernel,” Xilinx int., Application Note, 2006 [Online] Available: http://www.xilinx.com/ise/embedded/edk91i_docs/xilkernel_v3_00_a.pdf [108] Xilinx Inc., “EDK Concepts, Tools and Techniques,” Xilinx int., Application Note, 2012 [Online] Available: http://www.xilinx.com/support/documentation/sw_manuals/xilinx14_1/edk_ctt.pdf [Accessed: 25-Jun-2013] [109] Xilinx Inc., “PlanAhead User Guide,” Xilinx int., Application Note, 2012 [Online] Available: http://www.xilinx.com/support/documentation/sw_manuals/xilinx14_2/PlanAhead_ UserGuide.pdf [110] I O Levin, “AES-256 implementation,” GPL License, 2009 [Online] Available: http://www.literatecode.com/get/aes256.c [111] O Gay, “SHA-224/256/384/512 implementation,” BSD license, 2007 [Online] Available: http://www.ouah.org/ogay/sha2 [112] Y Hori, A Satoh, H Sakane, and K Toda, “Bitstream encryption and authentication with AES-GCM in dynamically reconfigurable systems,” in Field Programmable Logic and Applications, FPL 2008, International Conference on, 2008, pp 1–6 [113] OpenCores, “Crypto core.” [Online] Available: http://opencores.org/projects 98 PHỤ LỤC Code thuật toán băm SHA-512 (VHDL) ENTITY SHA_512_TOP IS PORT ( clk : in STD_LOGIC; rst : in STD_LOGIC; cs : in STD_LOGIC; iInit : in STD_LOGIC; result : out STD_LOGIC_VECTOR (511 downto 0); oVal : out STD_LOGIC ); END SHA_512_TOP; ARCHITECTURE Behavioral OF SHA_512_TOP IS SIGNAL done_block : STD_LOGIC; SIGNAL oInit : STD_LOGIC; SIGNAL oLoad : STD_LOGIC; SIGNAL oEnable_count : STD_LOGIC; SIGNAL iData : STD_LOGIC_VECTOR(63 DOWNTO 0); SIGNAL oDone : STD_LOGIC; SIGNAL oData : STD_LOGIC_VECTOR(63 DOWNTO 0); SIGNAL oResult : STD_LOGIC_VECTOR (511 downto 0) :=(others =>'0'); SIGNAL get_data : STD_LOGIC; BEGIN Inst_SHA_512_CONTROLLER: entity work.SHA_512_CONTROLLER PORT MAP( clk => clk, rst => rst, cs => cs, iInit => iInit, idone_block => done_block, oInit => oInit, oEnable_count => oEnable_count, oLoad => oLoad, oData => iData, get_data => get_data, oDone => oDone ); Inst_SHA_512_CORE: entity work.SHA_512_CORE PORT MAP( clk => clk, rst => rst, m => iData, init => oInit, ); iload ena md oval => oLoad, => oEnable_count, => oData, => done_block process (clk) begin if clk'event and clk = '1' then if get_data = '1' then oresult we, roundt => expandedKey, addr => addr, roundk => roundKey ); aes_transform : aes_transformation PORT MAP( clk => clk, reset => reset, dataIn => dataIn, roundKey => roundKey, addRoundKeySelect => addRoundKeySelect, loadRKey => loadRKey, dataBufferSelect => dataBufferSelect, loadData => loadData, shiftSubByteSelect => shiftSubByteSelect, loadSbox => loadSbox, mixColumnSelect => mixColumnSelect, loadMix => loadMix, dataOut => dataOut ); END STRUCT; Code thuật toán giải mã RSA (C) #include #include #include #include #include #include #include #include #include #ifdef cplusplus extern "C" { #endif #define TIMER_COUNTER_0 int mod (int m, int e, int n); // tinh C = m^e mod n // FILE *input, *output; int mem[37] = {2159,2412,2160,2185,2235,2923,1992,1759,2790,1486,1992,3000,1307,641,1992,524,27 90,641,3000,1992,597,3000,1307,2790,1992,3000,2790,1992,3165,1307,1486,1992,538,6 24,2906,368,47,1096}; u8 C[100]; int M[100]; u8 a[100]; int e = 17; int n = 3233; int d =2753; int i; int cycles; XTmrCtr XPS_Timer; Xuint32 IsrStatus; //================chuong trinh ma hoa-giai ma================= int main () { XStatus Status = XTmrCtr_Initialize(&XPS_Timer,XPAR_™RCTR_0_DEVICE_ID); XTmrCtr_SetResetValue(&XPS_Timer, 0, 0x00000000); XTmrCtr_Enable(XPAR_™RCTR_0_BASEADDR,XPAR_™RCTR_0_DEVIC E_ID); /* Ham enableIntr cho InterurpControl */ XIntc_EnableIntr( XPAR_XPS_INTC_0_BASEADDR, 0x1); XIntc_MasterEnable( XPAR_XPS_INTC_0_BASEADDR ); /* Ham enableIntr cho UART InterurpControl */ XIntc_EnableIntr(XPAR_RS232_UART_1_BASEADDR, XPAR_RS232_UART_1_INTERRUPT_MASK); XUartLite_EnableIntr(XPAR_RS232_UART_1_BASEADDR); /* Ham enableInterurp cho Microblaze */ microblaze_enable_interrupts(); XTmrCtr_Reset(&XPS_Timer, 0); XTmrCtr_Start(&XPS_Timer, 0); for(i=0;i>3)))>>((bit)&7)&(mask)) #define GetWORD(buf,bit,mask) ((*(WORD*)(((BYTE*)buf)+((bit)>>3)))>>((bit)&7)&(mask)) int GetBitCount(int n) { int nBitCount = 0; while(n) n >>= 1, nBitCount++; return nBitCount; } int BinarySearch(void* pValue, int nVlaueSize, void* pArray, int nCount) { int nIndex, nResult, nStart = 0, nEnd = nCount-1; while(nStart 0) nEnd = nIndex-1; else nStart = nIndex+1; } return -1; } bool CompressRunLength(BYTE *pSrc, int nSrcLen, BYTE *&pDes, int &nDesLen, int nBitsPerSample, void* nRuns, int nRunCount, int nRunSize) { pDes = (BYTE*)malloc(nSrcLen*2); memset(pDes, 0, nSrcLen*2); nDesLen = sizeof(DWORD); *(DWORD*)pDes = nSrcLen; *(pDes+nDesLen++) = nBitsPerSample; *(pDes+nDesLen++) = nRunCount; *(pDes+nDesLen++) = nRunSize; memcpy(pDes+nDesLen, nRuns, nRunCount*nRunSize); nDesLen += nRunCount*nRunSize; nDesLen 3)) |= nRunIndex >3)) |= nRunLength >3)) |= *(pSrc+nByte++)

Ngày đăng: 12/03/2022, 05:39

w