file-type

北京理工大学密码学作业:HASH与MAC实战解析

4星 · 超过85%的资源 | 下载需积分: 10 | 146KB | 更新于2025-05-31 | 13 浏览量 | 10 下载量 举报 收藏
download 立即下载
根据提供的文件信息,我们可以从中提取出以下知识点: ### 标题:“作业3 HASH & MAC” #### 知识点解释: - **Hash函数**:Hash函数是密码学中一种将任意长度的输入(称为预映像)通过散列算法转换成固定长度输出的算法,输出通常称为散列值或摘要。Hash函数需要满足一些重要特性,例如单向性、抗碰撞性、隐藏性和抗原像性等。 - **MAC**(消息认证码):是一种用于保证数据完整性与认证性的技术。它结合了密钥和消息数据来生成一个短的固定长度的值,用于验证数据的完整性和来源。 ### 描述:“一、课后习题 (9分)” #### 知识点解释: - **课后习题**:题目4.6、4.9、4.10、4.11、4.12说明学生需要完成书本中特定的练习题,这些题目可能涵盖Hash函数和MAC的相关知识。 - **伪造者概念**:提到的(1,1)和(1,2)伪造者概念可能是指在不同情况下攻击者能够如何伪造消息认证码的两种不同方法。这通常涉及到对加密算法和密钥的攻击策略。 - **选择性题目**:说明学生可以自由选择两个课后习题来回答,这可能是为了减轻学生负担而给出的灵活性。 ### 编程:“二、编程 (附加题 1分)” #### 知识点解释: - **MD5算法实现**:MD5是一种广泛使用的加密哈希函数,它将任何长度的数据输入,产生一个128位(16字节)的散列值。由于MD5设计上的缺陷,它已不再推荐用于安全应用中。 - **SHA-1算法实现**:SHA-1(安全散列算法1)是美国国家安全局设计,并由美国国家标准与技术研究院发布的加密哈希函数。虽然SHA-1比MD5更加安全,但它也存在安全性问题,目前也较少推荐使用。 - **修改密码算法库或自实现的HASH算法**:这部分要求学生对现有的密码算法库中的HASH算法进行修改,或者自己实现一个HASH算法,并且要求输出截断为原始输出的前8位,然后求解该算法的原像和碰撞问题。原像是指根据输出推导出原始输入的过程,碰撞是指找到两个不同的输入,它们具有相同的输出。 - **编程作业选择**:学生可以选择上述任何一个编程题目来完成,这同样体现了给予学生一定的选择自由度。 ### 标签:“北京理工大学 密码学” #### 知识点解释: - **北京理工大学**:这是国内著名的高等教育机构,其计算机科学与技术专业尤其在密码学领域有着深入的研究。 - **密码学课程**:这表明所给文件来自于北京理工大学关于密码学的课程作业,可能是本科生或研究生级别的课程。 ### 压缩包子文件的文件名称列表:“密码学作业.doc、SHA1算法” #### 知识点解释: - **密码学作业文档**:表明存在一个包含作业指导和相关材料的Word文档,名称为“密码学作业.doc”,它可能包含了作业的详细说明、相关理论背景和习题。 - **SHA1算法文件**:这可能是指包含了SHA-1算法详细信息、算法描述或实现指导的文件,名称为“SHA1算法”。这个文件是学生在实现SHA-1算法或了解其工作原理时需要参考的资料。 ### 综合应用: - 学生需要对Hash函数和MAC的工作原理有深入的理解,并能够应用这些知识来解决实际问题。 - 在编程实践方面,学生需要有能力使用C或C++语言来实现复杂的算法,并理解如何修改和测试这些算法。 - 学生也应具备批判性思维,能够评估不同算法的安全性,并对安全性有缺陷的算法进行分析和攻击。 - 此外,对于文件的命名和管理也有一定要求,学生需要根据提供的文件名称列表找到正确的文件来完成作业,这体现了对文件系统管理和信息检索能力的考察。

相关推荐

filetype
数据结构第16次作业,hash表 Spellchecking Prerequisites, Goals, and Outcomes Prerequisites: Students should have mastered the following prerequisite skills. • Hash Tables - Understanding of the concept of a recursive function • Inheritance - Enhancing an existing data structure through specialization Goals: This assignment is designed to reinforce the student's understanding of the use of hash tables as searchable containers. Outcomes: Students successfully completing this assignment would master the following outcomes. • Familiarize how to use hash tables, specifically hash sets Background Any word processing application will typically contain a spell check feature. Not only does this feature point out potentially misspelled words; it also suggests possible corrections. Description The program to be completed for this assessment is a spell checker. Below is a screen shot of the program in execution? The program begins by opening a word list text file, specified by a command line parameter. The program outputs an error message and terminates if it cannot open the specified word list text file. A sample word list text file (wordlist.txt) is given in the supplied wordlist.zip archive. After successfully opening the specified word list text file, the program then stores each word into a hash table. The program then opens a file to spell check. This user specifies this file through the command line. After opening this file, the program then compares each word in the file against the words stored in the hash table. The program considers a word to be misspelled if the word does not exist in the hash table. When this occurs, the program displays the line number the word appeared in, the word, and a list of possible corrections. The list of possible corrections for a misspelled word is generated using a simple algorithm. Any variation of a misspelled word that is itself a word (i.e. it is found in the word list file) is a possible correction. Your solution to this asses