Capicom decryption on Linux
I have a database encrypted with Windows CAPICOM library with RC4. After PHP script works fine on windows server.
...
$oCapiCapi = new COM("CAPICOM.EncryptedData");
$oCapiCapi -> Algorithm = 1;
$oCapiCapi -> Algorithm -> KeyLength = 3;
$oCapiCapi -> SetSecret('OURveRYSecretKey');
...
$oCapiCapi -> Decrypt($orsd[1]);
$Decrypted = $oCapiCapi -> Content;
...
I would like to decrypt the same database on a linux server. How can I do it? Can I decrypt data encrypted with CAPICOM?
Thanks.
a source to share
CAPICOM uses industry standard encryption algorithms such as 3DES. If you parse encrypted buffers yourself, you should be able to decode them in any language.
You can read more about CAPICOM buffers here: http://www.jensign.com/JavaScience/dotnet/DeriveBytes/index.html
If you are dealing with data from one source using only one cryptoalgorithm, you should greatly simplify the buffer parsing code.
a source to share
This looks like your best bet: http://sourceforge.net/projects/rc4crypt/
Obviously, if you want to make your application cross-platform, you should completely abandon COM (), but I understand if this is not in your control at the moment.
a source to share