I have an artificial intelligence project, it has trained neural networks (The neural networks are some classes and structs in my program). I’m serializing structs using System.Runtime.Serialization.Formatters.Binary.BinaryFormatter class.
When a user runs the program, it deserializes classes to get answer from neural networks. (nothing new needs to be serialized)
This is an artificial intelligence project, and not open-source. So, I don’t want to let anybody access my neural networks.
Should I encrypt serialized files? And how safe is it?
Will it prevent others to see variable on it?
Will other people can use my program to encrypt my encrypted files? how to prevent doing this?
Should you: only you can answer that; if misappropriation represents a real risk, then sure.
Appropriate encryption will prevent anyone without the keys getting easy access to any of the contents, so indeed – the contents will be opaque. However, there are two issues:
Re using the program to decrypt; that depends on where you keep the keys. If the keys are in the program itself, then even if obfuscated they are vulnerable.
For a full and accurate evaluation, contact a reputable IT security consultant.
I might also note that you might want to be cautious using
BinaryFormatter; it can be very brittle as you re-release you application.