Wolfgang Schölmberger
Member
Hi everybody,
Win 7,8,10
OE11.7
I'm dealing with a Docuware-archive and I have to encrypt a string with following conditions:
o Block Size = 128 Bits
o Cipher size = CBC (Cipher Block Chaining)
o Initialization vector (IV) = 128 bits
o Key length = 256 bits
o NO salt
o PKCS7 Padding
so I came up with the following code:
/*--------------------------------------------------------------------------------------------*/
SECURITY-POLICY:SYMMETRIC-ENCRYPTION-ALGORITHM = 'AES_CBC_256'.
SECURITY-POLICY:ENCRYPTION-SALT = ?. /* '?' --> NO salt-value is used */
SECURITY-POLICY:SYMMETRIC-ENCRYPTION-KEY = rawAES-key. /* this is a 32byte RAW-variable */
SECURITY-POLICY:SYMMETRIC-ENCRYPTION-IV = rawIV. /* this is a 16byte RAW-variable */
apart from that I don't know where to specify "Blocksize=128" I guess this code should be ok, but I get an encrypted string that is not accepted by Docuware.
So I started to look for solutions online and found a post in Progress Comunity 3 years ago, where somebody asked almost the same question. There was only 1 answer by David Abdala, who stated. "I have no sample, but most probably C# is using Microsoft encription libraries, which use an "inverse" order than OpenSSL. I had a similar issue using Windows encryption libraries in one end, and OpenSSL at the other end. "
My question is: can somebody confirm this ?
Does anybody happen to have a solution using the Microsoft-libraries from within OpenEdge and would be willing to share it ?
TIA, Wolf
Win 7,8,10
OE11.7
I'm dealing with a Docuware-archive and I have to encrypt a string with following conditions:
o Block Size = 128 Bits
o Cipher size = CBC (Cipher Block Chaining)
o Initialization vector (IV) = 128 bits
o Key length = 256 bits
o NO salt
o PKCS7 Padding
so I came up with the following code:
/*--------------------------------------------------------------------------------------------*/
SECURITY-POLICY:SYMMETRIC-ENCRYPTION-ALGORITHM = 'AES_CBC_256'.
SECURITY-POLICY:ENCRYPTION-SALT = ?. /* '?' --> NO salt-value is used */
SECURITY-POLICY:SYMMETRIC-ENCRYPTION-KEY = rawAES-key. /* this is a 32byte RAW-variable */
SECURITY-POLICY:SYMMETRIC-ENCRYPTION-IV = rawIV. /* this is a 16byte RAW-variable */
apart from that I don't know where to specify "Blocksize=128" I guess this code should be ok, but I get an encrypted string that is not accepted by Docuware.
So I started to look for solutions online and found a post in Progress Comunity 3 years ago, where somebody asked almost the same question. There was only 1 answer by David Abdala, who stated. "I have no sample, but most probably C# is using Microsoft encription libraries, which use an "inverse" order than OpenSSL. I had a similar issue using Windows encryption libraries in one end, and OpenSSL at the other end. "
My question is: can somebody confirm this ?
Does anybody happen to have a solution using the Microsoft-libraries from within OpenEdge and would be willing to share it ?
TIA, Wolf