Help all,

 

I am trying to use an openssl script on an AIX box to produce and encrypted packet. This packet will have to be

decrypted by a C# program. I am having any luck in getting the C# program to decrypt the packet encrypted by

the AIX script.

 

The Openssl.org documentation states that “all block ciphers normally use PKCS#5 padding”. The options

that I have in C# are ANSIX923,ISO10126,NONE,PKCS7,ZEROS. Is this my problem. Can I change the

default padding in openssl.

 

Any code anyone has that can help me do this roundtrip between openssl and C# would be appreciated.

 

Below are my scripts, the successfull decryption was done of course by the openssl script not a C# program..

 

thanks

grs

 

 

echo HELLO|openssl enc -a -salt -S 3031323334353637 -iv 31464F4C4C455431 -des3 -

K 31323334466F6C6C657426265472696D6461746131323334 -out flnk_encrypt/grs_encrypt.txt

 

Encrypted and Encoded Packet following

2yjq5YMovrE=

 

Length Encrypted Packet = 13

 

openssl enc -d -a -salt -S 3031323334353637 -iv 31464F4C4C455431 -des3 -K 313233

34466F6C6C657426265472696D6461746131323334 -in flnk_encrypt/grs_encrypt.txt

2yjq5YMovrE=

 

Packet was decrypted to following

HELLO

 

Length Decrypted Packet = 6

X.PKT        = HELLO

Length X.PKT = 5

 

 

 

 

Reply via email to