1. Phil Roth
  2. PowerBuilder
  3. Friday, 02 August 2019

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
0
Votes
Undo

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.
  1. Friday, 2 August 2019
  2. PowerBuilder
  3. # 1
Chris Pollach Accepted Answer Pending Moderation
0
Votes
Undo

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.
  1. Friday, 2 August 2019
  2. PowerBuilder
  3. # 2
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.