Hello, I previously asked what the error "CryptoPP::Exception caught: BER decode error" means and was told the following:
"That error means you're trying to decode a public or private key that is not formated correctly." I was hired by some company to fix about 200 hours of PHP code, something I am really good at, but this does not work after the company switched from one server to another (FreeBSD). I am going to ask this company to hire a specialist, but before I do that I wanted to know if someone knows the answer to this. I opened up the private key which used to decrypt credit cards on the other server without a glitch, it looks like this " -----BEGIN CERTIFICATE REQUEST----- 680 random characters (lines end at 64 character mark, 11 lines) -----END CERTIFICATE REQUEST----- " The name of the compiled program (based on test.cpp) that creates the keys is ewrt (ewrt.cpp was compiled). I tried running the command "./ewrt -g" to create the keys, but when I try to use them to encrypt decrypt it does not work. I am using the same code that successfully encrypts with a public/private key that exists which gives the error above. I also noticed that the private key is not in the same format as the original one that I described above, the private key is only 1 line. I found the following help in the class file ewrt.cpp ewrt - <1. parameter>= <2. parm>=.... where switches are: h - gives this usage information g - interactive key generation e - RSA encoding d - RSA decoding parameters are: pubkey_file privkey_file randseed_str examples: ewrt -g - for key pair generation cat t1.txt | ewrt -e pubkey_file=p1.key randseed_str=krix > t1.encrypted cat t1.encrypted | ewrt -d privkey_file=p2.key > t1.decrypted I am not trying to do something I do not know about (not willingly), this company would rather not let someone else into their system, but they may have to get this done. Merrick
