信息安全系统实验报告材料信息安全系统概论课程设计

上传人:re****.1 文档编号:460789107 上传时间:2023-09-20 格式:DOC 页数:19 大小:398.50KB
返回 下载 相关 举报
信息安全系统实验报告材料信息安全系统概论课程设计_第1页
第1页 / 共19页
信息安全系统实验报告材料信息安全系统概论课程设计_第2页
第2页 / 共19页
信息安全系统实验报告材料信息安全系统概论课程设计_第3页
第3页 / 共19页
信息安全系统实验报告材料信息安全系统概论课程设计_第4页
第4页 / 共19页
信息安全系统实验报告材料信息安全系统概论课程设计_第5页
第5页 / 共19页
点击查看更多>>
资源描述

《信息安全系统实验报告材料信息安全系统概论课程设计》由会员分享,可在线阅读,更多相关《信息安全系统实验报告材料信息安全系统概论课程设计(19页珍藏版)》请在金锄头文库上搜索。

1、word某某轻工业学院课程设计报告名称:信息安全概论指导教师:吉星、程立辉某某:符豪学号:541307030112班级:网络工程13-011. 目的 数据加密技术要求只有在指定的用户或网络下,才能解除密码而获得原来的数据,这就需要给数据发送方和承受方以一些特殊的信息用于加解密,这就是所谓的密钥。其密钥的值是从大量的随机数中选取的。按加密算法分为专用密钥和公开密钥两种。数据加密技术是网络中最根本的安全技术,主要是通过对网络中传输的信息进展数据加密来保障其安全性,这是一种主动安全防御策略,用很小的代价即可为信息提供相当大的安全保护。2. 题目使用C#编程语言,进展数据的加密与解密。系统根本功能描述

2、如下:1、 实现DES算法加密与解密功能。2、 实现TripleDES算法加密与解密功能。3、 实现MD5算法加密功能。4、 实现RC2算法加密与解密功能。5、 实现TripleDES算法加密与解密功能。6、 实现RSA算法加密与解密功能。3. 功能描述使用该软件在相应的文本框中输入明文,然后点击加密就会立即转化成相应的密文,非常迅速和方便,而且操作简单加流畅,非常好用。4. 需求分析加密软件开展很快,目前最常见的是透明加密,透明加密是一种根据要求在操作系统层自动地对写入存储介质的数据进展加密的技术。透明加密软件作为一种新的数据某某手段,自2005年上市以来,得到许多软件公司特别是制造业软件公

3、司和传统安全软件公司的热捧,也为广阔需要对敏感数据进展某某的客户带来了希望。加密软件上市以来,市场份额逐年上升,同时,经过几年的实践,客户对软件开发商提出了更多的要求。与加密软件产品刚上市时前一两年各软件厂商各持一词不同,经过市场的几番磨炼,客户和厂商对透明加密软件有了更加统一的认识。5. 设计说明传统的周边防御,比如防火墙、入侵检测和防病毒软件,已经不再能够解决很多今天的数据保护问题。为了加强这些防御措施并且满足短期相关规X的要求,许多公司对于数据安全纷纷采取了执行多点产品的战术性措施。这种片面的部署计划确实可以为他们的数据提供一点点额外的保护,但是在管理上花费昂贵并且操作困难,这种做法并不

4、能为未来的开展提供一个清晰的框架。加密是确保数据安全最重要的环节。必须确保数据加密而不是仅仅依赖一个防护根底架构。对数据进展加密可以让数据不论是在网络中活动、在数据库和电脑中静止或者在工作站中被使用的时候都能防患于未然。6. 源代码主窗体:using System;using System.Collections.Generic;using System.ponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;namespa

5、ce WindowsFormsApplication1publicpartialclassForm1 : Form public Form1() Initializeponent(); privatevoid md5ToolStripMenuItem_Click(object sender, EventArgs e) md5 md51 = newmd5(); md51.Show(); privatevoid dES加密解密ToolStripMenuItem_Click(object sender, EventArgs e) des des1 = newdes(); des1.Show(); p

6、rivatevoid rSA加密解密ToolStripMenuItem_Click(object sender, EventArgs e) rsa rsa1 = newrsa(); rsa1.Show(); privatevoid 帮助ToolStripMenuItem_Click(object sender, EventArgs e) help h = newhelp(); h.Show(); Cryptography类:using System;using System.Security.Cryptography;using System.IO;using System.Text;usin

7、g System.Globalization;using System.Xml.Linq;using System.Collections.Generic;namespace WindowsFormsApplication1classEncrypter /DES默认密钥向量privatestaticbyte DES_IV = 0x12, 0x34, 0x56, 0x78, 0x90, 0xAB, 0xCD, 0xEF ;publicstaticstring EncryptByMD5(string input) MD5 md5Hasher = MD5.Create();byte data = m

8、d5Hasher.puteHash(Encoding.UTF8.GetBytes(input);StringBuilder sBuilder = newStringBuilder();for (int i = 0; i data.Length; i+) sBuilder.Append(datai.ToString(x2); return sBuilder.ToString(); publicstaticstring EncryptByDES(string input, string key) byte inputBytes = Encoding.UTF8.GetBytes(input); by

9、te keyBytes = ASCIIEncoding.UTF8.GetBytes(key);byte encryptBytes = EncryptByDES(inputBytes, keyBytes, keyBytes);using (DES des = newDESCryptoServiceProvider() using (MemoryStream ms = newMemoryStream() using (CryptoStream cs = newCryptoStream(ms, des.CreateEncryptor(), CryptoStreamMode.Write) using

10、(StreamWriter writer = newStreamWriter(cs) writer.Write(inputBytes); string result = Convert.ToBase64String(encryptBytes);return result; publicstaticbyte EncryptByDES(byte inputBytes, byte key, byte IV) DES des = newDESCryptoServiceProvider(); des.Key = key; des.IV = IV;string result = string.Empty;

11、using (MemoryStream ms = newMemoryStream() using (CryptoStream cs = newCryptoStream(ms, des.CreateEncryptor(), CryptoStreamMode.Write) cs.Write(inputBytes, 0, inputBytes.Length); return ms.ToArray(); publicstaticstring DecryptByDES(string input, string key) byte inputBytes = Convert.FromBase64String

12、(input);byte keyBytes = ASCIIEncoding.UTF8.GetBytes(key);byte resultBytes = DecryptByDES(inputBytes, keyBytes, keyBytes);string result = Encoding.UTF8.GetString(resultBytes);return result; publicstaticbyte DecryptByDES(byte inputBytes, byte key, byte iv) DESCryptoServiceProvider des = newDESCryptoSe

13、rviceProvider(); des.Key = key; des.IV = iv;using (MemoryStream ms = newMemoryStream(inputBytes) using (CryptoStream cs = newCryptoStream(ms, des.CreateDecryptor(), CryptoStreamMode.Read) using (StreamReader reader = newStreamReader(cs) string result = reader.ReadToEnd();returnEncoding.UTF8.GetBytes(result);

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 建筑/环境 > 施工组织

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号