EXE中的文件加密 - 最佳实践。 [英] File encryption within EXE - best practice.

查看:75
本文介绍了EXE中的文件加密 - 最佳实践。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





在CodeProject中快速浏览一下但找不到我想要的东西。



Windows,.Net Winforms,加密。



我熟悉加密和解密数据和文件,不同级别和类型的加密我是代码来做到这一点。没问题。



我工作的最后一个地方,所有加密程序集都是公司内部的,程序集是用字符串加密进行模糊处理的。



我正在为我正在努力的新公司开发Winforms应用程序。我想在一个将出售给许多客户的应用程序中加密和解密文件。



因此现在的区别在于私钥和公钥都将嵌入Winforms应用程序或客户端计算机上的另一个程序集中以处理加密文件。



在这种情况下,您是否希望在某人的计算机上存储和加密文件中的某些数据?



我的想法是对任何程序集进行模糊处理和字符串加密,尽可能隐藏私钥。这些数据不是高度保密的,但最好是说文件是加密的。



对此事的任何想法都将不胜感激。或任何有关该主题讨论的指示。



谢谢



Julian



我的尝试:



搜索网页

搜索CodeProject

解决方案

这个CodeProject文章描述了如何进行自己的混淆,虽然它在C中,但是你可能会发现这些实用程序很有用: 二进制混淆 [ ^ ]



您可能还会找到 SecureString 有趣的课程: SecureString Class(System.Security) [ ^ ]


我会说密码保护的zip /压缩文件是最简单的(安全)选项。



您可以在内存中压缩/解压缩。


我使用了两个答案的组合。我正在使用.Net加密加密文件,然后对加密和混淆程序集进行字符串加密。我也使用ZIP选项来备份文件。我存储的数据不是非常敏感,如果是我会做一些不同的事情。



Julian


Hi,

Had a quick look around in CodeProject but couldn't find what I was after.

Windows, .Net Winforms, encryption.

I am familiar with encrypting and decrypting data and files, the different levels and types of encryption and I've code to do it. Not a problem.

The last place I worked at, all the encryption assemblies were internal to the company really and the assemblies were obfuscated with string encryption.

I'm developing a Winforms application in a new company I'm working for. I want to encrypt and decrypt a file, in an application that will be sold to many clients.

So the difference now is that both private and public keys will be embedded in the Winforms application or another assembly on the client computer to handle the encrypted file.

Is there a best practice for this scenario where you want to store and encrypt some data in a file on someone's computer?

My thought is to obfuscate and string encrypt any assemblies, hiding as best as possible the private key. The data isn't highly confidential, but it would be good to say that the file is encrypted.

Any thoughts on the matter would be greatly appreciated. Or any pointers to discussions on the subject.

Thanks

Julian

What I have tried:

Searching the net
Searching CodeProject

解决方案

This CodeProject article describes how to do your own obfuscation, it is in C though, but maybe you will find the utilities useful: Binary Obfuscation[^]

You might also find the SecureString class interesting: SecureString Class (System.Security)[^]


I would say that a password protected zip / compressed file is the simplest (secure) option.

You can compress / decompress in memory.


I used a combination of of both answers. I am encrypting the file with .Net encryption and then string encrypting and obfuscating the assemblies. I am also using the ZIP option to back up the file. The data I am storing is not super sensitive, if it was I would be doing something different.

Julian


这篇关于EXE中的文件加密 - 最佳实践。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆