As requested from a few members I’ve created a small library I called uCrypt that does just what the name implies it encrypts and decrypts files.
If you want to secure your files and have them encrypted in your game so that no one can use your assets without your “Secret Key” then uCrypt is for you
uCrypt has 3 small functions that will secure your files.
It’s very interesting…
For example I can encrypt a script, a texture, and so on…
But one file at once ???
(Sorry, I don’t know anything in encrypting !)
@p6r yes for now it is only one file at a time and it doesn’t matter on the file type that you encrypt.
I will be adding more features soon.
To do multiple files you can just loop through them I’ll add an example for that.
Encryption is good so that no one can open the file without knowing your encryption algorithm which is taken care of by uCrypt also they need to know you secret key.
@liverolA yes it’s free now you can download the demo and it’s all included.
I will create a zip file for it as well so you can just include the script file and dll soon.
Upcoming features encrypt variables so if you need to send them to a database, server, client etc it’s encrypted.
Also I will have a service that can store your key for you in two different security scenarios.
we store your key so you don’t have it locally included in your game anywhere.
we store 2 parts of the key so that you have double the security.
I’m a noob in encrypting. If i share an encrypted file and some1 else will download your demo, he can decrypt it and do whatever he wants, or i’m wrong?
People say on this forum it’s very easy to extract datas from unity.3d web files. With your system they can’t do that anymore ??? But we can play the game online without problem !?! Right ???
Yes… Like other ones I was very surprised to learn it’s so easy to extract datas.
Unity3D allows us to create web demos but it’s not fair if people can extract and steal all your work.
New release!!! Version 0.0.2:
Included in this release is the Unity script version / Javascript.
As well as the bug fix for the “internal compiler error” - I recompiled it to .Net 3.5
He hopefully can’t… Otherwise this would be totally broken ^^
But anyway all of you should be aware that this provides nothing but the most basic form of security. Encryption like that is practically useless for anything serious. I bet most of you are not working on such mega duper assets others are craving to have. If you don’t then you don’t need to encrypt, if you do, encryption won’t be enough LOL…
There is one thing you actually can do. Obfuscate your entire project with a good obfuscation tool and sophistically hide an encryption key or better many of those in there, using a source code impl of AES or something similar, so that no one can intercept the key easily with an API hooker… This will raise the bar to a level where someone needs to be REALLY dedicated to get your assets. But still, it is not impossible by any means and it will be done by someone if there is a need…
One thing, all I said above is only useful if you have a LARGE C# codebase (making obfuscation viable and giving you a lot of space to effectively hide information). Otherwise you are completely lost. Then there is not even the slightest chance that you can protect your assets against anyone but the most dumb hijacker.
I agree with ImogenPoot, its impossible to stop people from dissecting your project and stealing your work when it is in public domain. When you package your game, you must also package the key with it, and hide the key in there. Even storing the keys elsewhere have vulnerabiilities - it become easier actually because the hackers just have to monitor the packets going in and out and isolate the key packet.
heyo, pretty useful stuff. But I’m not quite sure where to begin. DecryptFile() is not returning anything, it writes decrypted file back to hard drive. How exactly I can use ucrypt?