You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
961 B

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

## 文件安全传输
### 思路
##### 使用对称加密算法DES加密文件使用非对称加密算法RSA加密生成的DES密钥使用哈希函数MD5生成文件摘要并对摘要进行签名
### 过程
发送方A要将DES加密后的文件RSA加密后的DES密钥以及签名的结果打包发送给接收方BB解密验证。
#### **发送方A需要完成的任务**
1. 用des对消息进行加密加密后的内容存入文件
2. 用接受方B生成的公钥对生成的des密钥进行加密
3. 签名
#### **接受方B需要完成的任务**
1. 生成公私钥对,并存入文件中
2. RSA私钥解密出DES密钥
3. .用解密出的DES密钥解密加密文件
4. 用发送端的公钥解密签名得到文件摘要将自己收到的消息进行哈希MD5比较2个文件摘要
发送方和接收方两段代码des加解密代码rsa加解密代码MD5