文件名称:EncryptDectyptTool_Src

  • 所属分类:
  • 加密解密
  • 资源属性:
  • [C/C++] [源码]
  • 上传时间:
  • 2012-11-26
  • 文件大小:
  • 1.05mb
  • 下载次数:
  • 1次
  • 提 供 者:
  • 张**
  • 相关连接:
  • 下载说明:
  • 别用迅雷下载,失败请重下,重下不扣分!

介绍说明--下载内容均来自于网络,请自行研究使用

写了一个文件加解密工具(VC9+OPENSSL)

CA程序:

生成2个RSA密钥对,分别保存为PEM格式,密码保护私钥,文件名为“RSAPrivateKey.pem”和“RSAPublicKey.pem”。

加密:

将指定明文文件加密,密文件格式自已定义,要求文件内容用对称算法(3des)加密,对称密钥(KEY)为随机生成,随机密钥用“RSAPrivateKey.pem”的公钥加密后,存放在密文文件头内(KEY1);对明文文件做摘要计算(HASH),将计算结果用“RSAPublicKey.pem”的私钥加密后(SIGN),放到密文文件头内;文件头内有明文的原始长度信息。

解密:

将密文文件解密成明文文件,流程与加密相反,先用“RSAPrivateKey.pem”私钥解密(KEY1)数据,得出随机密钥(KEY);用随机密钥对密文解密,得到明文文件;对明文文件进行摘要计算,得出HASH1;用“RSAPublicKey.pem”公钥解密SIGN,得出HASH2;HASH1与HASH2做对比,相同表示解密成功,不同表示解密失败。

密文文件头内可以保存原始加密人的信息以及解密人的信息,这样可以快速判断解密者是否有权限解密该密文文件,如果有权限则进行解密过程,否则直接提示没有权限解密。

-To write a file encryption and decryption tool (VC9+ OPENSSL)

CA procedures:

Generates two RSA key pairs, respectively, save for the PEM format, password-protected private key, the file named "RSAPrivateKey.pem" and "RSAPublicKey.pem".

Encryption:

The specified plaintext file encryption, secret self-definition file formats require the document to use symmetric algorithms (3des) encryption, symmetric key (KEY) is randomly generated, random key to use "RSAPrivateKey.pem" public key encryption, stored in the ciphertext header inside (KEY1) summary of the calculation of the plaintext file to do (HASH), the calculation results with the "RSAPublicKey.pem" private key encryption (SIGN), into ciphertext in the file header file header if there is express The original length of the message.

Decryption:

Decrypt the ciphertext into a plaintext file documents, processes and encrypt the contrary, the first to use "RSAPrivateKey.pem" decrypt the private key (KEY1) data, derived random k
(系统自动生成,下载前可以参看下载内容)

下载文件列表

EncryptDectyptTool\EncryptDectyptTool.aps

..................\EncryptDectyptTool.cpp

..................\EncryptDectyptTool.h

..................\EncryptDectyptTool.rc

..................\EncryptDectyptTool.vcproj

..................\EncryptDectyptTool.vcproj.HitIt-Pc.HitIt.user

..................\EncryptDectyptTool.vcproj.HITIT_.HitIt.user

..................\EncryptDectyptToolDlg.cpp

..................\EncryptDectyptToolDlg.h

..................\FileHead.h

..................\openssl\bin\libeay32.dll

..................\.......\...\openssl.exe

..................\.......\...\ssleay32.dll

..................\.......\bin

..................\.......\include\openssl\aes.h

..................\.......\.......\.......\applink.c

..................\.......\.......\.......\asn1.h

..................\.......\.......\.......\asn1t.h

..................\.......\.......\.......\asn1_mac.h

..................\.......\.......\.......\bio.h

..................\.......\.......\.......\blowfish.h

..................\.......\.......\.......\bn.h

..................\.......\.......\.......\buffer.h

..................\.......\.......\.......\cast.h

..................\.......\.......\.......\comp.h

..................\.......\.......\.......\conf.h

..................\.......\.......\.......\conf_api.h

..................\.......\.......\.......\crypto.h

..................\.......\.......\.......\des.h

..................\.......\.......\.......\des_old.h

..................\.......\.......\.......\dh.h

..................\.......\.......\.......\dsa.h

..................\.......\.......\.......\dso.h

..................\.......\.......\.......\dtls1.h

..................\.......\.......\.......\ebcdic.h

..................\.......\.......\.......\ec.h

..................\.......\.......\.......\ecdh.h

..................\.......\.......\.......\ecdsa.h

..................\.......\.......\.......\engine.h

..................\.......\.......\.......\err.h

..................\.......\.......\.......\evp.h

..................\.......\.......\.......\e_os2.h

..................\.......\.......\.......\hmac.h

..................\.......\.......\.......\idea.h

..................\.......\.......\.......\krb5_asn.h

..................\.......\.......\.......\kssl.h

..................\.......\.......\.......\lhash.h

..................\.......\.......\.......\md2.h

..................\.......\.......\.......\md4.h

..................\.......\.......\.......\md5.h

..................\.......\.......\.......\objects.h

..................\.......\.......\.......\obj_mac.h

..................\.......\.......\.......\ocsp.h

..................\.......\.......\.......\opensslconf.h

..................\.......\.......\.......\opensslv.h

..................\.......\.......\.......\ossl_typ.h

..................\.......\.......\.......\pem.h

..................\.......\.......\.......\pem2.h

..................\.......\.......\.......\pkcs12.h

..................\.......\.......\.......\pkcs7.h

..................\.......\.......\.......\pqueue.h

..................\.......\.......\.......\pq_compat.h

..................\.......\.......\.......\rand.h

..................\.......\.......\.......\rc2.h

..................\.......\.......\.......\rc4.h

..................\.......\.......\.......\ripemd.h

..................\.......\.......\.......\rsa.h

..................\.......\.......\.......\safestack.h

..................\.......\.......\.......\sha.h

..................\.......\.......\.......\ssl.h

..................\.......\.......\.......\ssl2.h

..................\.......\.......\.......\ssl23.h

..................\.......\.......\.......\ssl3.h

..................\.......\.......\.......\stack.h

..................\.......\.......\.......\store.h

..................\.......\.......\.......\symhacks.h

..................\.......\.......\.......\tls1.h

..................\.......\.......\.......\tmdiff.h

..................\.......\.......\.......\txt_db.h

..................\.......\.......\.......\ui.h

..................\.......\.......\.......\ui_compat.h

..................\.......\.......\.......\x509.h

.............

相关说明

  • 本站资源为会员上传分享交流与学习,如有侵犯您的权益,请联系我们删除.
  • 本站是交换下载平台,提供交流渠道,下载内容来自于网络,除下载问题外,其它问题请自行百度更多...
  • 请直接用浏览器下载本站内容,不要使用迅雷之类的下载软件,用WinRAR最新版进行解压.
  • 如果您发现内容无法下载,请稍后再次尝试;或者到消费记录里找到下载记录反馈给我们.
  • 下载后发现下载的内容跟说明不相乎,请到消费记录里找到下载记录反馈给我们,经确认后退回积分.
  • 如下载前有疑问,可以通过点击"提供者"的名字,查看对方的联系方式,联系对方咨询.

相关评论

暂无评论内容.

发表评论

*主  题:
*内  容:
*验 证 码:

源码中国 www.ymcn.org