I am in the process of evaluating whether Python is a suitable implementation choice for my program given the security requirements.
The input to my program is an set of encrypted (RSA) text files that describe some I/P that I want to keep secure. The encryption / decryption library and the private key are all accessed via SWIG wrappers to a C++ library. I envision that the Python code will call the library to decrypt the incoming source files.
Once decrypted, I will transform the I/P in some fashion and then write it out encrypted, once again using the SWIG wrapped C++ library for this function.
My program and the I/P will be distributed to customers, but the customers should not be able to examine the I/P. Only tools designated by the I/P author that have the private key should.
Can someone examine the data in its decrypted state as it flows through my program at run-time? Is there a way to protect my data in Python? Is a C++ implementation more secure than a Python one?
If your application contains the private key inside of it, then your data will never truly be safe from a motivated hacker (as they can step through the program to find it)...
Or they could run your app in a debugger, pause it after the files have been decoded in memory and then pull the data from memory.
Securing Data In A Python Program At Runtime