![信息安全實(shí)驗(yàn)報(bào)告信息安全概論課程設(shè)計(jì).doc_第1頁](http://file.renrendoc.com/FileRoot1/2020-1/9/4d938a5d-1cce-4d8d-8916-d5a2e2fe876d/4d938a5d-1cce-4d8d-8916-d5a2e2fe876d1.gif)
![信息安全實(shí)驗(yàn)報(bào)告信息安全概論課程設(shè)計(jì).doc_第2頁](http://file.renrendoc.com/FileRoot1/2020-1/9/4d938a5d-1cce-4d8d-8916-d5a2e2fe876d/4d938a5d-1cce-4d8d-8916-d5a2e2fe876d2.gif)
![信息安全實(shí)驗(yàn)報(bào)告信息安全概論課程設(shè)計(jì).doc_第3頁](http://file.renrendoc.com/FileRoot1/2020-1/9/4d938a5d-1cce-4d8d-8916-d5a2e2fe876d/4d938a5d-1cce-4d8d-8916-d5a2e2fe876d3.gif)
![信息安全實(shí)驗(yàn)報(bào)告信息安全概論課程設(shè)計(jì).doc_第4頁](http://file.renrendoc.com/FileRoot1/2020-1/9/4d938a5d-1cce-4d8d-8916-d5a2e2fe876d/4d938a5d-1cce-4d8d-8916-d5a2e2fe876d4.gif)
![信息安全實(shí)驗(yàn)報(bào)告信息安全概論課程設(shè)計(jì).doc_第5頁](http://file.renrendoc.com/FileRoot1/2020-1/9/4d938a5d-1cce-4d8d-8916-d5a2e2fe876d/4d938a5d-1cce-4d8d-8916-d5a2e2fe876d5.gif)
已閱讀5頁,還剩8頁未讀, 繼續(xù)免費(fèi)閱讀
版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡介
鄭州輕工業(yè)學(xué)院課程設(shè)計(jì)報(bào)告名稱:信息安全概論指導(dǎo)教師:吉星、程立輝姓名:符豪學(xué)號:541307030112班級:網(wǎng)絡(luò)工程13-011. 目的 數(shù)據(jù)加密技術(shù)要求只有在指定的用戶或網(wǎng)絡(luò)下,才能解除密碼而獲得原來的數(shù)據(jù),這就需要給數(shù)據(jù)發(fā)送方和接受方以一些特殊的信息用于加解密,這就是所謂的密鑰。其密鑰的值是從大量的隨機(jī)數(shù)中選取的。按加密算法分為專用密鑰和公開密鑰兩種。數(shù)據(jù)加密技術(shù)是網(wǎng)絡(luò)中最基本的安全技術(shù),主要是通過對網(wǎng)絡(luò)中傳輸?shù)男畔⑦M(jìn)行數(shù)據(jù)加密來保障其安全性,這是一種主動安全防御策略,用很小的代價(jià)即可為信息提供相當(dāng)大的安全保護(hù)。2. 題目使用C#編程語言,進(jìn)行數(shù)據(jù)的加密與解密。系統(tǒng)基本功能描述如下:1、 實(shí)現(xiàn)DES算法加密與解密功能。2、 實(shí)現(xiàn)TripleDES算法加密與解密功能。3、 實(shí)現(xiàn)MD5算法加密功能。4、 實(shí)現(xiàn)RC2算法加密與解密功能。5、 實(shí)現(xiàn)TripleDES算法加密與解密功能。6、 實(shí)現(xiàn)RSA算法加密與解密功能。3. 功能描述使用該軟件在相應(yīng)的文本框中輸入明文,然后點(diǎn)擊加密就會立即轉(zhuǎn)化成相應(yīng)的密文,非常迅速和方便,而且操作簡單加流暢,非常好用。4. 需求分析加密軟件發(fā)展很快,目前最常見的是透明加密,透明加密是一種根據(jù)要求在操作系統(tǒng)層自動地對寫入存儲介質(zhì)的數(shù)據(jù)進(jìn)行加密的技術(shù)。透明加密軟件作為一種新的數(shù)據(jù)保密手段,自2005年上市以來,得到許多軟件公司特別是制造業(yè)軟件公司和傳統(tǒng)安全軟件公司的熱捧,也為廣大需要對敏感數(shù)據(jù)進(jìn)行保密的客戶帶來了希望。加密軟件上市以來,市場份額逐年上升,同時(shí),經(jīng)過幾年的實(shí)踐,客戶對軟件開發(fā)商提出了更多的要求。與加密軟件產(chǎn)品剛上市時(shí)前一兩年各軟件廠商各持一詞不同,經(jīng)過市場的幾番磨煉,客戶和廠商對透明加密軟件有了更加統(tǒng)一的認(rèn)識。5. 設(shè)計(jì)說明傳統(tǒng)的周邊防御,比如防火墻、入侵檢測和防病毒軟件,已經(jīng)不再能夠解決很多今天的數(shù)據(jù)保護(hù)問題。為了加強(qiáng)這些防御措施并且滿足短期相關(guān)規(guī)范的要求,許多公司對于數(shù)據(jù)安全紛紛采取了執(zhí)行多點(diǎn)產(chǎn)品的戰(zhàn)術(shù)性措施。這種片面的部署計(jì)劃確實(shí)可以為他們的數(shù)據(jù)提供一點(diǎn)點(diǎn)額外的保護(hù),但是在管理上花費(fèi)昂貴并且操作困難,這種做法并不能為未來的發(fā)展提供一個(gè)清晰的框架。加密是確保數(shù)據(jù)安全最重要的環(huán)節(jié)。必須確保數(shù)據(jù)加密而不是僅僅依賴一個(gè)防護(hù)基礎(chǔ)架構(gòu)。對數(shù)據(jù)進(jìn)行加密可以讓數(shù)據(jù)不論是在網(wǎng)絡(luò)中活動、在數(shù)據(jù)庫和電腦中靜止或者在工作站中被使用的時(shí)候都能防患于未然。6. 源代碼主窗體: using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;namespace WindowsFormsApplication1 public partial class Form1 : Form public Form1() InitializeComponent(); private void md5ToolStripMenuItem_Click(object sender, EventArgs e) md5 md51 = new md5(); md51.Show(); private void dES加密解密ToolStripMenuItem_Click(object sender, EventArgs e) des des1 = new des(); des1.Show(); private void rSA加密解密ToolStripMenuItem_Click(object sender, EventArgs e) rsa rsa1 = new rsa(); rsa1.Show(); private void 幫助ToolStripMenuItem_Click(object sender, EventArgs e) help h = new help(); h.Show(); Cryptography類:using System;using System.Security.Cryptography;using System.IO;using System.Text;using System.Globalization;using System.Xml.Linq;using System.Collections.Generic;namespace WindowsFormsApplication1 class Encrypter /DES默認(rèn)密鑰向量 private static byte DES_IV = 0x12, 0x34, 0x56, 0x78, 0x90, 0xAB, 0xCD, 0xEF ; public static string EncryptByMD5(string input) MD5 md5Hasher = MD5.Create(); byte data = md5Hasher.ComputeHash(Encoding.UTF8.GetBytes(input); StringBuilder sBuilder = new StringBuilder(); for (int i = 0; i data.Length; i+) sBuilder.Append(datai.ToString(x2); return sBuilder.ToString(); public static string EncryptByDES(string input, string key) byte inputBytes = Encoding.UTF8.GetBytes(input); byte keyBytes = ASCIIEncoding.UTF8.GetBytes(key); byte encryptBytes = EncryptByDES(inputBytes, keyBytes, keyBytes); using (DES des = new DESCryptoServiceProvider() using (MemoryStream ms = new MemoryStream() using (CryptoStream cs = new CryptoStream(ms, des.CreateEncryptor(), CryptoStreamMode.Write) using (StreamWriter writer = new StreamWriter(cs) writer.Write(inputBytes); string result = Convert.ToBase64String(encryptBytes); return result; public static byte EncryptByDES(byte inputBytes, byte key, byte IV) DES des = new DESCryptoServiceProvider(); des.Key = key; des.IV = IV; string result = string.Empty; using (MemoryStream ms = new MemoryStream() using (CryptoStream cs = new CryptoStream(ms, des.CreateEncryptor(), CryptoStreamMode.Write) cs.Write(inputBytes, 0, inputBytes.Length); return ms.ToArray(); public static string DecryptByDES(string input, string key) byte inputBytes = Convert.FromBase64String(input); byte keyBytes = ASCIIEncoding.UTF8.GetBytes(key); byte resultBytes = DecryptByDES(inputBytes, keyBytes, keyBytes); string result = Encoding.UTF8.GetString(resultBytes); return result; public static byte DecryptByDES(byte inputBytes, byte key, byte iv) DESCryptoServiceProvider des = new DESCryptoServiceProvider(); des.Key = key; des.IV = iv; using (MemoryStream ms = new MemoryStream(inputBytes) using (CryptoStream cs = new CryptoStream(ms, des.CreateDecryptor(), CryptoStreamMode.Read) using (StreamReader reader = new StreamReader(cs) string result = reader.ReadToEnd(); return Encoding.UTF8.GetBytes(result); public static string EncryptString(string input, string sKey) byte data = Encoding.UTF8.GetBytes(input); using (DESCryptoServiceProvider des = new DESCryptoServiceProvider() des.Key = ASCIIEncoding.ASCII.GetBytes(sKey); des.IV = ASCIIEncoding.ASCII.GetBytes(sKey); ICryptoTransform desencrypt = des.CreateEncryptor(); byte result = desencrypt.TransformFinalBlock(data, 0, data.Length); return BitConverter.ToString(result); public static string DecryptString(string input, string sKey) string sInput = input.Split(-.ToCharArray(); byte data = new bytesInput.Length; for (int i = 0; i sInput.Length; i+) datai = byte.Parse(sInputi, NumberStyles.HexNumber); using (DESCryptoServiceProvider des = new DESCryptoServiceProvider() des.Key = ASCIIEncoding.ASCII.GetBytes(sKey); des.IV = ASCIIEncoding.ASCII.GetBytes(sKey); ICryptoTransform desencrypt = des.CreateDecryptor(); byte result = desencrypt.TransformFinalBlock(data, 0, data.Length); return Encoding.UTF8.GetString(result); public static string EncryptByRSA(string plaintext, string publicKey) UnicodeEncoding ByteConverter = new UnicodeEncoding(); byte dataToEncrypt = ByteConverter.GetBytes(plaintext); using (RSACryptoServiceProvider RSA = new RSACryptoServiceProvider() RSA.FromXmlString(publicKey); byte encryptedData = RSA.Encrypt(dataToEncrypt, false); return Convert.ToBase64String(encryptedData); public static string DecryptByRSA(string ciphertext, string privateKey) UnicodeEncoding byteConverter = new UnicodeEncoding(); using (RSACryptoServiceProvider RSA = new RSACryptoServiceProvider() RSA.FromXmlString(privateKey); byte encryptedData = Convert.FromBase64String(ciphertext); byte decryptedData = RSA.Decrypt(encryptedData, false); return byteConverter.GetString(decryptedData); public static string HashAndSignString(string plaintext, string privateKey) UnicodeEncoding ByteConverter = new UnicodeEncoding(); byte dataToEncrypt = ByteConverter.GetBytes(plaintext); using (RSACryptoServiceProvider RSAalg = new RSACryptoServiceProvider() RSAalg.FromXmlString(privateKey); /使用SHA1進(jìn)行摘要算法,生成簽名 byte encryptedData = RSAalg.SignData(dataToEncrypt, new SHA1CryptoServiceProvider(); return Convert.ToBase64String(encryptedData); public static bool VerifySigned(string plaintext, string SignedData, string publicKey) using (RSACryptoServiceProvider RSAalg = new RSACryptoServiceProvider() RSAalg.FromXmlString(publicKey); UnicodeEncoding ByteConverter = new UnicodeEncoding(); byte dataToVerifyBytes = ByteConverter.GetBytes(plaintext); byte signedDataBytes = Convert.FromBase64String(SignedData); return RSAalg.VerifyData(dataToVerifyBytes, new SHA1CryptoServiceProvider(), signedDataBytes); public static KeyValuePair CreateRSAKey() RSACryptoServiceProvider RSA = new RSACryptoServiceProvider(); string privateKey = RSA.ToXmlString(true); string publicKey = RSA.ToXmlString(false); return new KeyValuePair(publicKey, privateKey); public static byte GetBytes(string input) string sInput = input.Split(-.ToCharArray(); byte inputBytes = new bytesInput.Length; for (int i = 0; i sInput.Length; i+) inputBytesi = byte.Parse(sInputi, NumberStyles.HexNumber); return inputBytes; using System;using System.Collections.Gen
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- LY/T 3422-2024林產(chǎn)品檢驗(yàn)檢測能力驗(yàn)證規(guī)范
- 人教版七年級地理(下)《第七章我們鄰近的地區(qū)和國家》復(fù)習(xí)聽課評課記錄
- 滬科版數(shù)學(xué)七年級下冊《一元一次不等式的運(yùn)用》聽評課記錄1
- 滬教版數(shù)學(xué)八年級下冊23.2《事件的概率》聽評課記錄
- 粵教版道德與法治八年級下冊5.2《公民的權(quán)利和義務(wù)》聽課評課記錄1
- 湘教版數(shù)學(xué)九年級下冊4.2《概率及其計(jì)算》聽評課記錄3
- 北京課改版歷史七年級上冊第15課《東漢的興衰》聽課評課記錄
- 語文三年級聽評課記錄
- 《三國鼎立》聽課評課記錄1(新部編人教版七年級上冊歷史)
- 人教版八年級地理上冊《 2.2 氣候 》聽課評課記錄
- 房地產(chǎn)調(diào)控政策解讀
- 山東省濟(jì)寧市2025屆高三歷史一輪復(fù)習(xí)高考仿真試卷 含答案
- 五年級數(shù)學(xué)(小數(shù)乘法)計(jì)算題專項(xiàng)練習(xí)及答案
- 產(chǎn)前診斷室護(hù)理工作總結(jié)
- 2024-2025學(xué)年八年級數(shù)學(xué)人教版上冊寒假作業(yè)(綜合復(fù)習(xí)能力提升篇)(含答案)
- 2024年社會工作者(中級)-社會綜合能力考試歷年真題可打印
- 湖南省長郡中學(xué)2023-2024學(xué)年高二下學(xué)期寒假檢測(開學(xué)考試)物理 含解析
- 隱匿性陰莖的診療和治療課件
- 2022屆北京市東城區(qū)高三語文一模語文試卷講評課件
- 了不起的狐貍爸爸-全文打印
- JJG646-2006移液器檢定規(guī)程-(高清現(xiàn)行)
評論
0/150
提交評論