1. Phil Roth
  2. PowerBuilder
  3. Friday, 2 August 2019 09:35 AM UTC

Hi, Is there an option to use RSA Asymmetric encryption with a 2048 key using

OAEP padding, as we want to generate an encrypted value of 256 chars, and using PB2017 R3 it is only generating 128 chars?

 

e.g

lblb_data = Blob(a_sPassword, EncodingANSI!)

// Generate the private key
lnv_CrypterObject.AsymmetricGenerateKey(RSA!, 2048, i_lblb_privKey, i_lblb_pubKey)

// Encrypt data using RSA
lblb_encrypt = lnv_CrypterObject.AsymmetricEncrypt(RSA!, lblb_data, i_lblb_pubKey)

 

Length of lblb_encrypt is 128, and our security requirements are for 256 chars

Phil Roth Accepted Answer Pending Moderation
  1. Friday, 2 August 2019 14:18 PM UTC
  2. PowerBuilder
  3. # 1

Thanks Chris,

but it's not the size of the clear text that I was referring to, but the encrypted output, which seems to be fixed at 128 bytes, and we were looking for RSA with OAEP padding to generate 256 bytes.

Looking at the documentation, I don't think this is possible with current cryptography options available in PB.

 

Regards

Phil

Comment
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Friday, 2 August 2019 14:09 PM UTC
  2. PowerBuilder
  3. # 2

Hi Phil;

   from the PB Help on the "AsymmetricEncrypt " command ...  A 2048-bit pubKey can encrypt a variable of up to 214 bytes.

Regards ... Chris

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.