I am in need of a a perl module written in C/C++, can not be written in Perl.
This module will use AES/Rijndael 128 or 256bit with a key(password) of my choice.
The password, I will byte encode into the C/C++ code before compiling and installing
the module on the server. So therefore the password is not possible to be read.
I have chosen AES/Rijndael for many reasons, if you suggest something else, please
let me know, I am all ears on this project. I understand that at some point it must
be decrypted into memory and executed, that is fine, just keeping the majority of
people out of my code is the goal here.
Self checking to make sure the code has not been code-level or binary-level tampered with.
Also, to keep people from just being able to call to the module, it needs a
secure way to make sure I have specifically allowed that perl script to call it.
I am thinking along the lines of an encrypted string (base64 or hex'd) that I place
into the calling perl script, that contains among random useless data, the name of
the script? maybe the /full/path/to/the/[url removed, login to view] also. Let me know what you think.
I was just searching google, and I came across "pENC", which is a perl module written in perl that takes your .pl script and encrypts it.
URL FOR pENC download: <[url removed, login to view]>
Simple to test out, just download the [url removed, login to view], un-tar it, and run the [url removed, login to view] script
it'll ask you for a file to encrypt, tell it "[url removed, login to view]", as it comes with a test script.
I do not like pENC thought, as its written in perl and writes to temporary file.
I do like the idea of how it requires a license code to execute the script also.
This module when called to execute the encrypted code, should take it in, very that
the calling perl script has been allowed to execute the encrypted code, and that
its self->tests are fine, then it should eval () the code in perl.
I should have a way via editing somefile.h (C/C++ header) to enable or disable showing
of the (eval error return) if there was errors during the run, if I have not enabled
"debugging" mode, then your C/C++ program should just exit and say there was an error.
If I have enabled the "debugging" mode, then it should exit and print the error.
Let me know any ideas, suggestions, etc.
1) Must be written in C/C++.
2) Must provide all source code and all libraries used.
3) Must compile on FreeBSD and Linux at the least.
4) Must be good, secure, non-memory leaking code.
5) Must be clean, easy to follow and easy to read code.